C#窗体控制源代码
2006-05-23 21:34
387 查看
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace WinF
{
/// <summary>
/// Control 的摘要说明。
/// </summary>
public class ControlApp
{
///////////////////////////////////////////////////////////////////////////////////
private System.Windows.Forms.Form senderForm;
private string FilePath=System.AppDomain.CurrentDomain.BaseDirectory.ToString(); //窗体控件设置配置文件位置
private System.Windows.Forms.Control sender;//定义被操作的控件
private System.Windows.Forms.ContextMenu DeleCM=new ContextMenu();
public ControlApp(System.Windows.Forms.Form senderForm,string FilePath)
{
this.senderForm=senderForm;
this.FilePath=FilePath;
StartControl();
}
// public System.Windows.Forms.Form sender_Form()
// {
// get {return this.senderForm;}
// }
#region///鼠标状态的枚举类型
/// </summary>
enum EnumMousePointPosition
{
MouseSizeNone = 0 ,//无
MouseSizeRight = 1 ,//拉伸右边框
MouseSizeLeft = 2 ,//拉伸左边框
MouseSizeBottom = 3 ,//拉伸下边框
MouseSizeTop = 4 ,//拉伸上边框
MouseSizeTopLeft = 5 ,//拉伸左上角
MouseSizeTopRight = 6 ,//拉伸右上角
MouseSizeBottomLeft = 7 ,//拉伸左下角
MouseSizeBottomRight = 8 ,//拉伸右下角
MouseDrag = 9 ,//鼠标拖动
}
#endregion
#region 右键菜单绑定(用于删除控件)
private void BindMenu()
{
System.Windows.Forms.MenuItem DeleItem=new MenuItem();
DeleItem.Text="删除";
DeleItem.Click+=new EventHandler(Control_Delete);
System.Windows.Forms.MenuItem AddItem=new MenuItem();
AddItem.Text="恢复";
AddItem.Click+=new EventHandler(Control_Delete);
DeleCM.MenuItems.Add(0,DeleItem);
DeleCM.MenuItems.Add(1,AddItem);
}
#endregion
Point p,p1;//定义被操作控件的位置
EnumMousePointPosition m_MousePointPosition=new EnumMousePointPosition(); //被操作控件当前的鼠标操作状态
public void Control_MouseMove(object Sender, System.Windows.Forms.MouseEventArgs e)
{
sender=(System.Windows.Forms.Control)Sender;
if(e.Button==MouseButtons.Left)
{
switch(m_MousePointPosition)
{
case EnumMousePointPosition.MouseDrag:
sender.Location = new Point(sender.Left + e.X - p.X, sender.Top + e.Y - p.Y);
break;
case EnumMousePointPosition.MouseSizeBottom:
sender.Size = new Size(sender.Width, sender.Height + e.Y - p1.Y);
p1 = new Point(e.X, e.Y) ; //'记录光标拖动的当前点
break;
case EnumMousePointPosition.MouseSizeBottomRight:
sender.Size = new Size(sender.Width + e.X - p1.X, sender.Height + e.Y - p1.Y);
p1 = new Point(e.X, e.Y);
break;
case EnumMousePointPosition.MouseSizeRight:
sender.Size = new Size(sender.Width + e.X - p1.X, sender.Height);
p1 = new Point(e.X, e.Y);
break;
case EnumMousePointPosition.MouseSizeTop:
sender.Location = new Point(sender.Left, sender.Top + (e.Y - p.Y));
sender.Size = new Size(sender.Width, sender.Height - (e.Y - p.Y));
break;
case EnumMousePointPosition.MouseSizeLeft:
sender.Location = new Point(sender.Left + e.X - p.X, sender.Top);
sender.Size = new Size(sender.Width - (e.X - p.X), sender.Height);
break;
case EnumMousePointPosition.MouseSizeBottomLeft:
sender.Location = new Point(sender.Left + e.X - p.X, sender.Top);
sender.Size = new Size(sender.Width - (e.X - p.X), sender.Height + e.Y - p1.Y);
p1 = new Point(e.X, e.Y);
break;
case EnumMousePointPosition.MouseSizeTopRight:
sender.Location = new Point(sender.Left, sender.Top + (e.Y - p.Y));
sender.Size = new Size(sender.Width + (e.X - p1.X), sender.Height - (e.Y - p.Y));
p1 = new Point(e.X, e.Y);
break;
case EnumMousePointPosition.MouseSizeTopLeft:
sender.Location = new Point(sender.Left + e.X - p.X, sender.Top + (e.Y - p.Y));
sender.Size = new Size(sender.Width - (e.X - p.X), sender.Height - (e.Y - p.Y));
break;
}
}
else
{
m_MousePointPosition=ReEMPP(sender.Size,e);
switch( m_MousePointPosition ) //改变光标
{
case EnumMousePointPosition.MouseSizeNone:
sender.Cursor = Cursors.Arrow ; //箭头
break;
case EnumMousePointPosition.MouseDrag:
sender.Cursor = Cursors.SizeAll ; //四方向
break;
case EnumMousePointPosition.MouseSizeBottom:
sender.Cursor = Cursors.SizeNS ; //南北
break;
case EnumMousePointPosition.MouseSizeTop:
sender.Cursor = Cursors.SizeNS ; //南北
break;
case EnumMousePointPosition.MouseSizeLeft:
sender.Cursor = Cursors.SizeWE ; //东西
break;
case EnumMousePointPosition.MouseSizeRight:
sender.Cursor = Cursors.SizeWE ; //东西
break;
case EnumMousePointPosition.MouseSizeBottomLeft:
sender.Cursor = Cursors.SizeNESW ; //东北到南西
break;
case EnumMousePointPosition.MouseSizeBottomRight:
sender.Cursor = Cursors.SizeNWSE ; //东南到西北
break;
case EnumMousePointPosition.MouseSizeTopLeft:
sender.Cursor = Cursors.SizeNWSE ; //东南到西北
break;
case EnumMousePointPosition.MouseSizeTopRight:
sender.Cursor = Cursors.SizeNESW ; //东北到南西
break;
}
}
}
public void Control_MouseLeave(object Sender, System.EventArgs e)
{
sender=(System.Windows.Forms.Control)Sender;
if(sender.ContextMenu!=null) //卸载右键菜单
{
// sender.ContextMenu.Dispose();
}
m_MousePointPosition = EnumMousePointPosition.MouseSizeNone;
SetSenderBG(Color.White);//控件不再被控制时背景色为白色
sender.Cursor = Cursors.Arrow;
}
public void Control_MouseDown(object Sender, System.Windows.Forms.MouseEventArgs e)
{
sender=(System.Windows.Forms.Control)Sender;
if(sender.ContextMenu==null) //绑定右键菜单
{
if(DeleCM.MenuItems.Count==0)
{
BindMenu();
}
sender.ContextMenu=DeleCM;
}
SetSenderBG(Color.Yellow);//设定当前被操作控件的背景为黄色
p=new Point(e.X,e.Y);
p1=new Point(e.X,e.Y);
}
#region 控件删除事件的执行过程
public void Control_Delete(object Sender, System.EventArgs e)
{
System.Windows.Forms.MenuItem it=(System.Windows.Forms.MenuItem)Sender;
switch(it.Text)
{
case "删除":
sender.Visible=false;
break;
case "恢复":
sender.Visible=true;
sender.BackColor=Color.White;//
break;
}
}
#endregion
#region 设定控件背景色
private void SetSenderBG(Color ColorValue) //设置控件背景色
{
if(sender.BackColor!=Color.Red)
{
sender.BackColor=ColorValue;
}
}
#endregion
private static EnumMousePointPosition ReEMPP(System.Drawing.Size size, System.Windows.Forms.MouseEventArgs e)
{
int Band = 10;
if( e.X >= -1 * Band && e.X <= size.Width && e.Y >= -1 * Band && e.Y <= size.Height)
{
if (e.X < Band )
{
if (e.Y < Band )
{
return EnumMousePointPosition.MouseSizeTopLeft;
}
else
{
if(e.Y >( -1 * Band+size.Height))
return EnumMousePointPosition.MouseSizeBottomLeft;
else
return EnumMousePointPosition.MouseSizeLeft;
}
}
if (e.X > -1 * Band + size.Width )
{
if (e.Y < Band )
return EnumMousePointPosition.MouseSizeTopRight;
else if (e.Y > -1 * Band + size.Height)
return EnumMousePointPosition.MouseSizeBottomRight;
else
return EnumMousePointPosition.MouseSizeRight;
}
else
{
if (e.Y < Band)
return EnumMousePointPosition.MouseSizeTop;
else if (e.Y > -1 * Band + size.Height)
return EnumMousePointPosition.MouseSizeBottom;
else
return EnumMousePointPosition.MouseDrag;
}
}
else
{
return EnumMousePointPosition.MouseSizeNone;
}
}
#region //调整删除的控件是否可见
public void DisDeleted(bool flag)
{
foreach (Control ct in senderForm.Controls)
{
if(ct.Visible)
{
if(!flag)
{
if(ct.BackColor==Color.Red)
{
ct.Visible=false;
}
}
}
else
{
if(flag)
{
ct.Visible=true;
ct.BackColor=Color.Red;
}
}
}
}
#endregion
public void StartControl()//初始化设置
{
foreach (Control ct in senderForm.Controls)
{
ct.MouseMove+=new MouseEventHandler(Control_MouseMove);
ct.MouseLeave+=new EventHandler(Control_MouseLeave);
ct.MouseDown+=new MouseEventHandler(Control_MouseDown);
}
senderForm.BackColor=Color.SkyBlue;
}
private void databind()
{
try
{
DataSet DS_Control=new DataSet();
DS_Control.ReadXml(FilePath+"//FormControl.xml");
DataView dv=new DataView(DS_Control.Tables["ControlTB"]);
foreach (Control ct in this.Controls)
{
foreach(DataRowView drv in dv)
{
if(drv["ControlID"].ToString()==ct.Name)
{
ct.Width=int.Parse(drv["Width"].ToString());
ct.Height=int.Parse(drv["Height"].ToString());
Point p=new Point(int.Parse(drv["LocationX"].ToString()),int.Parse(drv["LocationY"].ToString()));
ct.Location=p;
ct.Visible=bool.Parse(drv["Visible"].ToString());
}
}
}
}
catch(Exception e)
{
MessageBox.Show(e.ToString());
}
}
#region //结束设置
public void EndControl()
{
SaveData();
foreach (Control ct in senderForm.Controls)
{
ct.MouseMove-=new MouseEventHandler(Control_MouseMove);
ct.MouseLeave-=new EventHandler(Control_MouseLeave);
ct.MouseDown-=new MouseEventHandler(Control_MouseDown);
}
senderForm.BackColor=Color.Snow;
DisDeleted(false);
}
#endregion
#region //参数保存过程
private void SaveData()
{
if(System.IO.Directory.Exists(FilePath))
{
System.IO.Directory.CreateDirectory(FilePath);
}
DataSet DS_Control=new DataSet();
DataTable dt =new DataTable();
dt.TableName="ControlTB";
DataRow dr;
try
{
dt.Columns.Add(new DataColumn("FormID", typeof(Int32)));
dt.Columns.Add(new DataColumn("ControlID", typeof(string)));
dt.Columns.Add(new DataColumn("Width", typeof(Int32)));
dt.Columns.Add(new DataColumn("Height", typeof(Int32)));
dt.Columns.Add(new DataColumn("LocationX", typeof(Int32)));
dt.Columns.Add(new DataColumn("LocationY", typeof(Int32)));
dt.Columns.Add(new DataColumn("Visible", typeof(bool)));
dt.Columns.Add(new DataColumn("ModiDateTime", typeof(DateTime)));
}
catch(Exception e)
{
MessageBox.Show(e.ToString());
}
foreach (Control ct in sender.Controls)
{
dr = dt.NewRow();
dr[0] = 123;
dr[1] = ct.Name;
dr[2] = ct.Width;
dr[3] =ct.Height;
dr[4]=ct.Location.X;
dr[5]=ct.Location.Y;
dr[6]=ct.Visible;
dr[7]=DateTime.Now;
dt.Rows.Add(dr);
}
DS_Control.Tables.Add(dt);
DS_Control.WriteXml(FilePath+"//FormControl.xml");
DS_Control.Dispose();
}
#endregion
////////////////////////////////////////////////////////////////////////////
}
}
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace WinF
{
/// <summary>
/// Control 的摘要说明。
/// </summary>
public class ControlApp
{
///////////////////////////////////////////////////////////////////////////////////
private System.Windows.Forms.Form senderForm;
private string FilePath=System.AppDomain.CurrentDomain.BaseDirectory.ToString(); //窗体控件设置配置文件位置
private System.Windows.Forms.Control sender;//定义被操作的控件
private System.Windows.Forms.ContextMenu DeleCM=new ContextMenu();
public ControlApp(System.Windows.Forms.Form senderForm,string FilePath)
{
this.senderForm=senderForm;
this.FilePath=FilePath;
StartControl();
}
// public System.Windows.Forms.Form sender_Form()
// {
// get {return this.senderForm;}
// }
#region///鼠标状态的枚举类型
/// </summary>
enum EnumMousePointPosition
{
MouseSizeNone = 0 ,//无
MouseSizeRight = 1 ,//拉伸右边框
MouseSizeLeft = 2 ,//拉伸左边框
MouseSizeBottom = 3 ,//拉伸下边框
MouseSizeTop = 4 ,//拉伸上边框
MouseSizeTopLeft = 5 ,//拉伸左上角
MouseSizeTopRight = 6 ,//拉伸右上角
MouseSizeBottomLeft = 7 ,//拉伸左下角
MouseSizeBottomRight = 8 ,//拉伸右下角
MouseDrag = 9 ,//鼠标拖动
}
#endregion
#region 右键菜单绑定(用于删除控件)
private void BindMenu()
{
System.Windows.Forms.MenuItem DeleItem=new MenuItem();
DeleItem.Text="删除";
DeleItem.Click+=new EventHandler(Control_Delete);
System.Windows.Forms.MenuItem AddItem=new MenuItem();
AddItem.Text="恢复";
AddItem.Click+=new EventHandler(Control_Delete);
DeleCM.MenuItems.Add(0,DeleItem);
DeleCM.MenuItems.Add(1,AddItem);
}
#endregion
Point p,p1;//定义被操作控件的位置
EnumMousePointPosition m_MousePointPosition=new EnumMousePointPosition(); //被操作控件当前的鼠标操作状态
public void Control_MouseMove(object Sender, System.Windows.Forms.MouseEventArgs e)
{
sender=(System.Windows.Forms.Control)Sender;
if(e.Button==MouseButtons.Left)
{
switch(m_MousePointPosition)
{
case EnumMousePointPosition.MouseDrag:
sender.Location = new Point(sender.Left + e.X - p.X, sender.Top + e.Y - p.Y);
break;
case EnumMousePointPosition.MouseSizeBottom:
sender.Size = new Size(sender.Width, sender.Height + e.Y - p1.Y);
p1 = new Point(e.X, e.Y) ; //'记录光标拖动的当前点
break;
case EnumMousePointPosition.MouseSizeBottomRight:
sender.Size = new Size(sender.Width + e.X - p1.X, sender.Height + e.Y - p1.Y);
p1 = new Point(e.X, e.Y);
break;
case EnumMousePointPosition.MouseSizeRight:
sender.Size = new Size(sender.Width + e.X - p1.X, sender.Height);
p1 = new Point(e.X, e.Y);
break;
case EnumMousePointPosition.MouseSizeTop:
sender.Location = new Point(sender.Left, sender.Top + (e.Y - p.Y));
sender.Size = new Size(sender.Width, sender.Height - (e.Y - p.Y));
break;
case EnumMousePointPosition.MouseSizeLeft:
sender.Location = new Point(sender.Left + e.X - p.X, sender.Top);
sender.Size = new Size(sender.Width - (e.X - p.X), sender.Height);
break;
case EnumMousePointPosition.MouseSizeBottomLeft:
sender.Location = new Point(sender.Left + e.X - p.X, sender.Top);
sender.Size = new Size(sender.Width - (e.X - p.X), sender.Height + e.Y - p1.Y);
p1 = new Point(e.X, e.Y);
break;
case EnumMousePointPosition.MouseSizeTopRight:
sender.Location = new Point(sender.Left, sender.Top + (e.Y - p.Y));
sender.Size = new Size(sender.Width + (e.X - p1.X), sender.Height - (e.Y - p.Y));
p1 = new Point(e.X, e.Y);
break;
case EnumMousePointPosition.MouseSizeTopLeft:
sender.Location = new Point(sender.Left + e.X - p.X, sender.Top + (e.Y - p.Y));
sender.Size = new Size(sender.Width - (e.X - p.X), sender.Height - (e.Y - p.Y));
break;
}
}
else
{
m_MousePointPosition=ReEMPP(sender.Size,e);
switch( m_MousePointPosition ) //改变光标
{
case EnumMousePointPosition.MouseSizeNone:
sender.Cursor = Cursors.Arrow ; //箭头
break;
case EnumMousePointPosition.MouseDrag:
sender.Cursor = Cursors.SizeAll ; //四方向
break;
case EnumMousePointPosition.MouseSizeBottom:
sender.Cursor = Cursors.SizeNS ; //南北
break;
case EnumMousePointPosition.MouseSizeTop:
sender.Cursor = Cursors.SizeNS ; //南北
break;
case EnumMousePointPosition.MouseSizeLeft:
sender.Cursor = Cursors.SizeWE ; //东西
break;
case EnumMousePointPosition.MouseSizeRight:
sender.Cursor = Cursors.SizeWE ; //东西
break;
case EnumMousePointPosition.MouseSizeBottomLeft:
sender.Cursor = Cursors.SizeNESW ; //东北到南西
break;
case EnumMousePointPosition.MouseSizeBottomRight:
sender.Cursor = Cursors.SizeNWSE ; //东南到西北
break;
case EnumMousePointPosition.MouseSizeTopLeft:
sender.Cursor = Cursors.SizeNWSE ; //东南到西北
break;
case EnumMousePointPosition.MouseSizeTopRight:
sender.Cursor = Cursors.SizeNESW ; //东北到南西
break;
}
}
}
public void Control_MouseLeave(object Sender, System.EventArgs e)
{
sender=(System.Windows.Forms.Control)Sender;
if(sender.ContextMenu!=null) //卸载右键菜单
{
// sender.ContextMenu.Dispose();
}
m_MousePointPosition = EnumMousePointPosition.MouseSizeNone;
SetSenderBG(Color.White);//控件不再被控制时背景色为白色
sender.Cursor = Cursors.Arrow;
}
public void Control_MouseDown(object Sender, System.Windows.Forms.MouseEventArgs e)
{
sender=(System.Windows.Forms.Control)Sender;
if(sender.ContextMenu==null) //绑定右键菜单
{
if(DeleCM.MenuItems.Count==0)
{
BindMenu();
}
sender.ContextMenu=DeleCM;
}
SetSenderBG(Color.Yellow);//设定当前被操作控件的背景为黄色
p=new Point(e.X,e.Y);
p1=new Point(e.X,e.Y);
}
#region 控件删除事件的执行过程
public void Control_Delete(object Sender, System.EventArgs e)
{
System.Windows.Forms.MenuItem it=(System.Windows.Forms.MenuItem)Sender;
switch(it.Text)
{
case "删除":
sender.Visible=false;
break;
case "恢复":
sender.Visible=true;
sender.BackColor=Color.White;//
break;
}
}
#endregion
#region 设定控件背景色
private void SetSenderBG(Color ColorValue) //设置控件背景色
{
if(sender.BackColor!=Color.Red)
{
sender.BackColor=ColorValue;
}
}
#endregion
private static EnumMousePointPosition ReEMPP(System.Drawing.Size size, System.Windows.Forms.MouseEventArgs e)
{
int Band = 10;
if( e.X >= -1 * Band && e.X <= size.Width && e.Y >= -1 * Band && e.Y <= size.Height)
{
if (e.X < Band )
{
if (e.Y < Band )
{
return EnumMousePointPosition.MouseSizeTopLeft;
}
else
{
if(e.Y >( -1 * Band+size.Height))
return EnumMousePointPosition.MouseSizeBottomLeft;
else
return EnumMousePointPosition.MouseSizeLeft;
}
}
if (e.X > -1 * Band + size.Width )
{
if (e.Y < Band )
return EnumMousePointPosition.MouseSizeTopRight;
else if (e.Y > -1 * Band + size.Height)
return EnumMousePointPosition.MouseSizeBottomRight;
else
return EnumMousePointPosition.MouseSizeRight;
}
else
{
if (e.Y < Band)
return EnumMousePointPosition.MouseSizeTop;
else if (e.Y > -1 * Band + size.Height)
return EnumMousePointPosition.MouseSizeBottom;
else
return EnumMousePointPosition.MouseDrag;
}
}
else
{
return EnumMousePointPosition.MouseSizeNone;
}
}
#region //调整删除的控件是否可见
public void DisDeleted(bool flag)
{
foreach (Control ct in senderForm.Controls)
{
if(ct.Visible)
{
if(!flag)
{
if(ct.BackColor==Color.Red)
{
ct.Visible=false;
}
}
}
else
{
if(flag)
{
ct.Visible=true;
ct.BackColor=Color.Red;
}
}
}
}
#endregion
public void StartControl()//初始化设置
{
foreach (Control ct in senderForm.Controls)
{
ct.MouseMove+=new MouseEventHandler(Control_MouseMove);
ct.MouseLeave+=new EventHandler(Control_MouseLeave);
ct.MouseDown+=new MouseEventHandler(Control_MouseDown);
}
senderForm.BackColor=Color.SkyBlue;
}
private void databind()
{
try
{
DataSet DS_Control=new DataSet();
DS_Control.ReadXml(FilePath+"//FormControl.xml");
DataView dv=new DataView(DS_Control.Tables["ControlTB"]);
foreach (Control ct in this.Controls)
{
foreach(DataRowView drv in dv)
{
if(drv["ControlID"].ToString()==ct.Name)
{
ct.Width=int.Parse(drv["Width"].ToString());
ct.Height=int.Parse(drv["Height"].ToString());
Point p=new Point(int.Parse(drv["LocationX"].ToString()),int.Parse(drv["LocationY"].ToString()));
ct.Location=p;
ct.Visible=bool.Parse(drv["Visible"].ToString());
}
}
}
}
catch(Exception e)
{
MessageBox.Show(e.ToString());
}
}
#region //结束设置
public void EndControl()
{
SaveData();
foreach (Control ct in senderForm.Controls)
{
ct.MouseMove-=new MouseEventHandler(Control_MouseMove);
ct.MouseLeave-=new EventHandler(Control_MouseLeave);
ct.MouseDown-=new MouseEventHandler(Control_MouseDown);
}
senderForm.BackColor=Color.Snow;
DisDeleted(false);
}
#endregion
#region //参数保存过程
private void SaveData()
{
if(System.IO.Directory.Exists(FilePath))
{
System.IO.Directory.CreateDirectory(FilePath);
}
DataSet DS_Control=new DataSet();
DataTable dt =new DataTable();
dt.TableName="ControlTB";
DataRow dr;
try
{
dt.Columns.Add(new DataColumn("FormID", typeof(Int32)));
dt.Columns.Add(new DataColumn("ControlID", typeof(string)));
dt.Columns.Add(new DataColumn("Width", typeof(Int32)));
dt.Columns.Add(new DataColumn("Height", typeof(Int32)));
dt.Columns.Add(new DataColumn("LocationX", typeof(Int32)));
dt.Columns.Add(new DataColumn("LocationY", typeof(Int32)));
dt.Columns.Add(new DataColumn("Visible", typeof(bool)));
dt.Columns.Add(new DataColumn("ModiDateTime", typeof(DateTime)));
}
catch(Exception e)
{
MessageBox.Show(e.ToString());
}
foreach (Control ct in sender.Controls)
{
dr = dt.NewRow();
dr[0] = 123;
dr[1] = ct.Name;
dr[2] = ct.Width;
dr[3] =ct.Height;
dr[4]=ct.Location.X;
dr[5]=ct.Location.Y;
dr[6]=ct.Visible;
dr[7]=DateTime.Now;
dt.Rows.Add(dr);
}
DS_Control.Tables.Add(dt);
DS_Control.WriteXml(FilePath+"//FormControl.xml");
DS_Control.Dispose();
}
#endregion
////////////////////////////////////////////////////////////////////////////
}
}
相关文章推荐
- C#跨窗体控制
- [易学原创]C# 数据操作窗体实现增/删/改/查(图)(源代码)
- C# 窗体应用程序 之 单选按钮的实现 源代码
- c#中如何控制模态子窗体中的进度条
- C#源代码—在windows窗体中添加一个名为lblShow的Lable控件
- VS.NET 2005(C#)的C/S程序中MDI子窗体控制其父窗体
- 开源:ICanSeeYou远程控制软件(所有C#源代码)
- C# 通过WinAPI 实现不同窗体间的相互控制
- c#中跨线程调用windows窗体控件 .我们在做winform应用的时候,大部分情况下都会碰到使用多线程控制界面上控件信息的问题。然而我们并不能用传统方法来做这个问题,下面我将详细的介绍。
- C#中windows窗体中的互相通信,控制问题
- C# 控制窗体系统菜单
- c++转换c# 窗体的无缝控制——————socketv5代理测试
- C#简单远程控制制作源代码程序以及思路(客户端)
- C# 实现子窗体控制父窗体的方法
- C#中使用Windows API控制阿里旺旺自动登录 的程序源代码
- C#可调用API接口来获取窗口句柄,发送消息控制其余程序窗体大小
- C#源代码—在windows窗体中添加一个名为lblShow的Lable控件4,创建可变字符串,字符串转换为字符型
- C# 跨线程 跨窗体 子线程在窗体外类中控制主窗体控件
- 用C#调用Windows API和其它进程通信及C# 获得另外一程序 句柄 后控制该程序 控制其透明 窗体大小
- C# API 应用(跨进程控制别的窗体的TreeView节点的展开与点击)