- 博客(1)
- 资源 (10)
- 收藏
- 关注
原创 如何实现窗体传值
我们经常会用到窗体之间的传值(C#),Form2里头的数据给Form1使用,本文讲解3种方法实现窗体直接的传值。 一、使用全局变量 具体办法,新建一个类,访问权限为public namespace WindowsFormsApp2 { public class Global { public static string StrMyString; ...
2019-11-17 17:45:36 250
Chinese_Chess.7z
private void InitChess(string chess_name, int row, int column, Bitmap bm, Player player, ChessClass type)
{
PictureBox chess_object = new PictureBox();
chess_object.BackColor = System.Drawing.Color.Transparent;
chess_object.BackgroundImage = bm;
chess_object.Location = new System.Drawing.Point(column * 57, row * 57);
chess_object.SizeMode = PictureBoxSizeMode.Normal;
chess_object.Name = chess_name;
chess_object.Size = new System.Drawing.Size(54, 54);
chess_object.Cursor = Cursors.Hand;
pictureBox1.Controls.Add(chess_object);
Chess c = new Chess(chess_name, player, type, chess_object);
ChessLocation[row, column] = c;
chess_object.Click += ChessSelect;
}
2020-02-03
经典游戏 2048 单机
学习着如何做2048,可以学到很多编程方法。
Public Class frmMain
Dim m_g As Graphics '不解释
Dim LINE_WIDTH As Integer = 5 '线宽
Dim LINE_MOVES As Integer '线宽调整数
Dim CELL_WIDTH As Integer = 50 '格子宽
Dim TOP_ As Integer = 120 '矩阵左上角纵坐标
Dim LEFT_ As Integer = 50 '矩阵左上角横坐标
Dim NUMBER_STRING_WIDTH As Integer = 15 '数字的大小
2014-04-01
发送邮件smtp
Imports System.Runtime.InteropServices
Imports System.Net.Mail.MailMessage
Imports System.Net.Mail
Public Class Form1
......................................
2013-06-30
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人