-
如何:在代码中模拟鼠标和键盘事件
2009-11-13 14:30:00如何:在代码中模拟鼠标和键盘事件Windows 窗体提供以编程方式模拟鼠标和键盘输入的几个选项。本主题提供这些选项的概述。...例如,下面的步骤阐释如何用代码模拟单击鼠标右键的事件。以编程方式单击鼠标右如何:在代码中模拟鼠标和键盘事件
Windows 窗体提供以编程方式模拟鼠标和键盘输入的几个选项。本主题提供这些选项的概述。
模拟鼠标输入模拟鼠标事件的最佳方法是调用引发要模拟的鼠标事件的 OnEventName 方法。此选项通常只在自定义控件和窗体中是可能的,因为引发事件的方法受保护,而且不能从控件或窗体外部访问。例如,下面的步骤阐释如何用代码模拟单击鼠标右键的事件。
以编程方式单击鼠标右键创建一个 Button 属性设置为 System.Windows.Forms.MouseButtons.Right 值的 MouseEventArgs。
将此 MouseEventArgs 用作参数调用 OnMouseClick 方法。
有关自定义控件的更多信息,请参见设计时开发 Windows 窗体控件。
还有其他模拟鼠标输入的方法。例如,可以通过编程方式设置一个表示通常通过鼠标输入设置的状态的控件属性(如 CheckBox 控件的 Checked 属性),或者您可以直接调用附加到要模拟的事件的委托。
模拟键盘输入虽然您可以通过使用上面讨论的鼠标输入策略来模拟键盘输入,但 Windows 窗体还提供了用于将键击发送到活动应用程序的 SendKeys 类。警告
如果您的应用程序打算用于可以使用各种键盘的国际使用,则使用 System.Windows.Forms.SendKeys.Send(System.String) 可能产生不可预知的结果,因而应当避免。
向同一应用程序发送键击
调用 SendKeys 类的 Send 或 SendWait 方法。应用程序的活动控件将接收指定的键击。下面的代码示例使用 Send 在用户双击窗体的图面时模拟按 Enter 键。此示例假定一个 Form,该窗体具有单个 Tab 键索引为 0 的 Button 控件。
C#
// Send a key to the button when the user double-clicks anywhere
// on the form.
private void Form1_DoubleClick(object sender, EventArgs e)
{
// Send the enter key to the button, which raises the click
// event for the button. This works because the tab stop of
// the button is 0.
SendKeys.Send("{ENTER}");
}
向另一个应用程序发送键击激活将接收键击的应用程序窗口,然后调用 Send 或 SendWait 方法。由于没有激活另一个应用程序的托管方法,因此必须使用本机 Windows 方法强制将焦点放在其他应用程序上。下面的代码示例使用平台调用来调用 FindWindow 和 SetForegroundWindow 方法,以激活计算器应用程序窗口,然后调用 SendWait 向计算器应用程序发出一系列计算。
C#
// Get a handle to an application window.
[DllImport("USER32.DLL")]
public static extern IntPtr FindWindow(string lpClassName,
string lpWindowName);// Activate an application window.
[DllImport("USER32.DLL")]
public static extern bool SetForegroundWindow(IntPtr hWnd);// Send a series of key presses to the Calculator application.
private void button1_Click(object sender, EventArgs e)
{
// Get a handle to the Calculator application. The window class
// and window name were obtained using the Spy++ tool.
IntPtr calculatorHandle = FindWindow("SciCalc", "Calculator");// Verify that Calculator is a running process.
if (calculatorHandle == IntPtr.Zero)
{
MessageBox.Show("Calculator is not running.");
return;
}// Make Calculator the foreground application and send it
// a set of calculations.
SetForegroundWindow(calculatorHandle);
SendKeys.SendWait("111");
SendKeys.SendWait("*");
SendKeys.SendWait("11");
SendKeys.SendWait("=");
}
示例下面的代码示例是前面代码示例的完整应用。
C#
using System;
using System.Runtime.InteropServices;
using System.Drawing;
using System.Windows.Forms;namespace SimulateKeyPress
{
class Form1 : Form
{
private Button button1 = new Button();[STAThread]
public static void Main()
{
Application.EnableVisualStyles();
Application.Run(new Form1());
}public Form1()
{
button1.Location = new Point(10, 10);
button1.TabIndex = 0;
button1.Text = "Click to automate Calculator";
button1.AutoSize = true;
button1.Click += new EventHandler(button1_Click);this.DoubleClick += new EventHandler(Form1_DoubleClick);
this.Controls.Add(button1);
}// Get a handle to an application window.
[DllImport("USER32.DLL")]
public static extern IntPtr FindWindow(string lpClassName,
string lpWindowName);// Activate an application window.
[DllImport("USER32.DLL")]
public static extern bool SetForegroundWindow(IntPtr hWnd);// Send a series of key presses to the Calculator application.
private void button1_Click(object sender, EventArgs e)
{
// Get a handle to the Calculator application. The window class
// and window name were obtained using the Spy++ tool.
IntPtr calculatorHandle = FindWindow("SciCalc", "Calculator");// Verify that Calculator is a running process.
if (calculatorHandle == IntPtr.Zero)
{
MessageBox.Show("Calculator is not running.");
return;
}// Make Calculator the foreground application and send it
// a set of calculations.
SetForegroundWindow(calculatorHandle);
SendKeys.SendWait("111");
SendKeys.SendWait("*");
SendKeys.SendWait("11");
SendKeys.SendWait("=");
}// Send a key to the button when the user double-clicks anywhere
// on the form.
private void Form1_DoubleClick(object sender, EventArgs e)
{
// Send the enter key to the button, which raises the click
// event for the button. This works because the tab stop of
// the button is 0.
SendKeys.Send("{ENTER}");
}
}
}
编译代码此示例需要:
对 System、System.Drawing、System.Runtime.InteropServices 和 System.Windows.Forms 命名空间的引用。
-
在Panel控件中添加新的窗体(C#,winform开发)
2012-10-23 10:09:43开始是想到的设置思路很简单,主窗体(如上图),右边放置一个...在按钮的单击事件中加入下面的代码: private void button1_Click(object sender, EventArgs e) { ChildForm child = new ChildForm(); this.panel1.开始是想到的设置思路很简单,主窗体(如上图),右边放置一个Panel控件.
然后根据单击的按钮将子窗体显示在Panel控件上.
在按钮的单击事件中加入下面的代码:
private void button1_Click(object sender, EventArgs e)
{ChildForm child = new ChildForm();
this.panel1.Controls.Add(child);
child.Show();
}运行程序
显示“不能将顶级控件添加到一个控件上”出现“不能将顶级控件添加到一个控件上”错误怎么处理?
在代码中加入
child.TopLevel = false;OK.
新问题又出现了.我们不希望子窗体的标题和边筐也显示在父窗体中,再添加如下代码.
child.FormBorderStyle = FormBorderStyle.None;现在的感觉是不是舒服多了.
但是还隐藏着一个新问题.怎样动态设置子窗体的Size、Location等呢?
我希望在调整父窗体大小时,Panel1 中子窗体的大小也跟随动态自动调整 .
需要加入下面的事件
private void panel1_Resize(object sender, System.EventArgs e)
{
try
{
this.child.ClientSize = new System.Drawing.Size(panel1.Size.Width, panel1.Size.Height);
}
catch(System.Exception Er)
{
MessageBox.Show(Er.ToString());
}
}编译无错,执行时(Error: 未将对象引用设置到对象的实例)
但连续点了4个一样的错误提示确认后,程序却可以正常执行,并且form1调整窗体大小form2也可以随之响应了。
此计不行,又生一计.我们可以把子窗体当成一个控件,设置Dock属性不就行了吗?
赶快测试一下:
private void button1_Click(object sender, EventArgs e)
{ChildForm child = new ChildForm();
child.TopLevel = false;
child.Dock = System.Windows.Forms.DockStyle.Fill;
child.FormBorderStyle = FormBorderStyle.None;
//child.Parent = this.panel1;
this.panel1.Controls.Add(child);
child.Show();
} -
C#窗体间传值的第二种方法
2010-07-24 18:26:38在button1的单击事件中写入如下代码: form2 f2 = new form2(this); f2.ShowDialog(); 在窗体form2的窗体类中声明变量,并改写初始化构造函数如下: form1 form1; public form2(form1 f1) { Initia...刚刚发现C#窗体间传值的第二种方法,第一种是通过够造传值,这里就不讲了。下面贴点代码看看:
在button1的单击事件中写入如下代码:
form2 f2 = new form2(this);
f2.ShowDialog();
在窗体form2的窗体类中声明变量,并改写初始化构造函数如下:
form1 form1;
public form2(form1 f1)
{
InitializeComponent();
form1 = f1;
}
在button1的点击事件中写入如下代码:
form1.textBox1.text = this.textBox2.text;
运行即可实现传值。
注:textbox1的Modifiers(控件的可见性级别,即修饰符)应为:public ,internal,protected中之一,不能为private(私有)。
其中showDialog方法有一个重载,参数是模式化显示窗口的拥有窗口,这样定义后,在显示出来的窗口中可以通过窗体的owner属性来访问其拥有者窗口及其相关信息,从而实现传值。 -
C#窗体间传值
2010-08-14 17:17:00public Form2(string i) { *******; this.a=i; } Form1中 Form2 f=new Form2(b); 这样form1的值b就放到form2中了刚刚发现C#窗体间传值的第二种...下面贴点代码看看: 在button1的单击事件中写入如下代码: form2public Form2(string i)
{
*******;
this.a=i;
}
Form1中
Form2 f=new Form2(b);
这样form1的值b就放到form2中了
刚刚发现C#窗体间传值的第二种方法,第一种是通过够造传值,这里就不讲了。下面贴点代码看看:
在button1的单击事件中写入如下代码:
form2 f2 = new form2(this);
f2.ShowDialog();在窗体form2的窗体类中声明变量,并改写初始化构造函数如下:
form1 form1;
public form2(form1 f1)
{
InitializeComponent();
form1 = f1;
}在button1的点击事件中写入如下代码:
form1.textBox1.text = this.textBox2.text;
运行即可实现传值。注:textbox1的Modifiers(控件的可见性级别,即修饰符)应为:public ,internal,protected中之一,不能为private(私有)。
其中showDialog方法有一个重载,参数是模式化显示窗口的拥有窗口,这样定义后,在显示出来的窗口中可以通过窗体的owner属性来访问其拥有者窗口及其相关信息,从而实现传值。
主窗体Form1是一个ListBox,单击选中某列时,弹出窗体Form2,Form2中两个控件,一个是TextBox,显示选中的该列的文本,另一个是按钮,点击时将修改后的值回传,且在Form1中修改相应的列的文本,同时Form2关闭。
方法一:传值
最先想到的,Form2构造函数中接收一个string类型参数,即Form1中选中行的文本,将Form2的TextBox控件的Text设置为该string,即完成了Form1向Form2的传值。当Form2的AcceptChange按钮按下,需要修改Form1中ListBox中相应列的值,因此可以考虑同时将Form1中的ListBox控件当参数也传入Form2,所有修改工作都在Form2中完成,根据这个思路,Form2代码如下:
C#代码
publicpartial class Form2 : Form
{
private string text;
private ListBox lb;
private int index;
//构造函数接收三个参数:选中行文本,ListBox控件,选中行索引
public Form2(string text,ListBox lb,int index)
{
this.text = text;
this.lb = lb;
this.index = index;
InitializeComponent();
this.textBox1.Text = text;
}
private void btnChange_Click(object sender, EventArgs e)
{
string text = this.textBox1.Text;
this.lb.Items.RemoveAt(index);
this.lb.Items.Insert(index, text);
this.Close();
}
}publicpartial class Form2 : Form
{
private string text;
private ListBox lb;
private int index;//构造函数接收三个参数:选中行文本,ListBox控件,选中行索引
public Form2(string text,ListBox lb,int index)
{
this.text = text;
this.lb = lb;
this.index = index;
InitializeComponent();
this.textBox1.Text = text;
}private void btnChange_Click(object sender, EventArgs e)
{string text = this.textBox1.Text;
this.lb.Items.RemoveAt(index);
this.lb.Items.Insert(index, text);
this.Close();
}
}
Form1中new窗体2时这么写:C#代码
public partial class Form1 :Form
{
int index = 0;
string text = null;
public Form1()
{
InitializeComponent();
}
private void listBox1_SelectedIndexChanged(object sender, EventArgse)
{
if (this.listBox1.SelectedItem != null)
{
text = this.listBox1.SelectedItem.ToString();
index = this.listBox1.SelectedIndex;
//构造Form2同时传递参数
Form2 form2 = new Form2(text, listBox1, index);
form2.ShowDialog();
}
}public partial class Form1 :Form
{
int index = 0;
string text = null;
public Form1()
{
InitializeComponent();
}private void listBox1_SelectedIndexChanged(object sender, EventArgse)
{
if (this.listBox1.SelectedItem != null)
{
text = this.listBox1.SelectedItem.ToString();
index = this.listBox1.SelectedIndex;//构造Form2同时传递参数
Form2 form2 = new Form2(text, listBox1, index);
form2.ShowDialog();
}
}
OK,方法一的解决方法就是这样,好处是直观,需要什么就传什么,缺点也是显而易见的,如果窗体1中需要修改的是一百个控件,难道构造的时候还传100个参数进去?况且如果其他窗体仍然需要弹Form2,那Form2就废了,只能供窗体1使用,除非写重载的构造函数,不利于代码的复用,继续看下一个方法。
方法二:继承
这个方法我试了很多次,继承的确可以做,但是麻烦不说,还不方便,因此个人认为如果为了互相操作数据而使用继承,是不合适的,但既然是个方法,就扔出来看看,实际作用≈0。
Form2:
C#代码
//声明Form2继承于Form1
public partial classForm2 : Form1
{
publicint index;
public ListBox lb;
public Form2(string text)
{
//将继承过来的listBox设置为不可见
this.listBox1.Visible=false;
InitializeComponent();
this.textBox1.Text = text;
}
private void btnChange_Click(object sender, EventArgs e)
{
string text = this.textBox1.Text;
this.lb.Items.RemoveAt(index);
this.lb.Items.Insert(index,text);
this.Close();
}
}//声明Form2继承于Form1
public partial classForm2 : Form1
{
publicint index;public ListBox lb;
public Form2(string text)
{//将继承过来的listBox设置为不可见
this.listBox1.Visible=false;
InitializeComponent();
this.textBox1.Text = text;
}
private void btnChange_Click(object sender, EventArgs e)
{
string text = this.textBox1.Text;
this.lb.Items.RemoveAt(index);
this.lb.Items.Insert(index,text);
this.Close();}
}
Form1:
C#代码
public partial class Form1 :Form
{
public int index = 0;
public string text = null;
public Form1()
{
InitializeComponent();
}
private void listBox1_SelectedIndexChanged(object sender, EventArgse)
{
if (this.listBox1.SelectedItem != null)
{
text = this.listBox1.SelectedItem.ToString();
index = this.listBox1.SelectedIndex;
Form2 form2 = new Form2(text);
//构造完Form2后,为Form2中各参数赋值
form2.lb =this.listBox1;
form2.index = index;
form2.Show();
}
}
}public partial class Form1 :Form
{
public int index = 0;
public string text = null;
public Form1()
{
InitializeComponent();
}private void listBox1_SelectedIndexChanged(object sender, EventArgse)
{
if (this.listBox1.SelectedItem != null)
{
text = this.listBox1.SelectedItem.ToString();
index = this.listBox1.SelectedIndex;
Form2 form2 = new Form2(text);//构造完Form2后,为Form2中各参数赋值
form2.lb =this.listBox1;
form2.index = index;
form2.Show();
}
}
}
这里有几点问题需要注意,Form2中各属性需要哪种赋值方法?从Java过度来的都知道,Java继承中在子类中使用关键字super可以访问基类中公有的方法及参数,而C#中super换成了base,那是不是意味着我们可以在Form2中这么为参数赋值呢?
C#代码
this.lb=base.listBox1;
this.index=base.index;
this.lb=base.listBox1;
this.index=base.index;
OK,第二种写法没问题,可以保存index值,但是对ListBox控件,这么赋值就会出问题,通过测试我发现,base.listBox1指向的,是子类继承过来的listBox1对象,并不是基类自己的listBox1对象。因此我们猜测,那base.index值是不是也是指向子类的index呢?测试一下发现的确是这样,因此this.index=base.index等于没写,去掉照样可以用,因为index一样被Form2继承过来了,因此我们可以了解到,C#中的窗体继承,通过base.控件是无法操作基类控件的。
方法三:事件回调
既然C#有事件这个东西,为啥不用呢,而且事件在窗体通信方面,有着更为方便的作用,我们知道事件实际上就是状态的捕获,在最后我会举一个捕获状态的例子,先看数据互相操作的例子。
Form2:
C#代码
//定义一个需要string类型参数的委托
publicdelegate void MyDelegate(string text);
public partial class Form2 :Form1
{
//定义该委托的事件
public event MyDelegate MyEvent;
public Form2(string text)
{
InitializeComponent();
this.textBox1.Text = text;
}
private void btnChange_Click(object sender, EventArgs e)
{
//触发事件,并将修改后的文本回传
MyEvent(this.textBox1.Text);
this.Close();
}
}//定义一个需要string类型参数的委托
publicdelegate void MyDelegate(string text);
public partial class Form2 :Form1
{//定义该委托的事件
public event MyDelegate MyEvent;
public Form2(string text)
{
InitializeComponent();
this.textBox1.Text = text;
}
private void btnChange_Click(object sender, EventArgs e)
{//触发事件,并将修改后的文本回传
MyEvent(this.textBox1.Text);
this.Close();
}
}
Form1:
C#代码
public partial class Form1 :Form
{
public int index = 0;
public string text = null;
public Form1()
{
InitializeComponent();
}
private void listBox1_SelectedIndexChanged(object sender, EventArgse)
{
if (this.listBox1.SelectedItem != null)
{
text = this.listBox1.SelectedItem.ToString();
index = this.listBox1.SelectedIndex;
Form2 form2 = new Form2(text);
//注册form2_MyEvent方法的MyEvent事件
form2.MyEvent += new MyDelegate(form2_MyEvent);
form2.Show();
}
}
//处理
void form2_MyEvent(string text)
{
this.listBox1.Items.RemoveAt(index);
this.listBox1.Items.Insert(index, text);
}
}如果窗体A是B new出来的或则B是A new出来的 可以用以下方法:
在窗体A中:
public delegate void weituo(); //声明一个委托
public event weituo shuaxin;//声明一个事件并在你那个按钮单击事件中:
shuaxin();
便可以了!在B窗体中:
A formA = new A();
formA.shuaxin += new A.weituo(fangfa);
formA.Show();这里面fangfa就是你用来修改label的方法(回调函数)
void fangfa()
{
//你自己写的刷新代码!
}注意:formA.shuaxin += new A.weituo(fangfa);这句在输入完+=之后按2下Tab便可以自动生成方法(也就是上面的fangfa())名字是系统自动命名可以改就是了!
Form1 下的Button下的的
Form2 f2 = new Form2();
f2.GetId(textBox1 .Text );
this.Hide();
f2.Show();
Form2 的代码:
public Form2()
{
InitializeComponent();
}
public void GetId(string id)
{
textBox1.Text = id;
}
2.Session
此方式不仅可以将值传递到下一个页面,还可以将值交叉传递到多个页面,直到把Session变量的值Remove,变量才会消失;缺点是Session变量是存储在服务器端的,消耗服务器端的内存使用,客户端通过ID传回到服务器短检索Session变量值,由于Session存在TimeOut的问题,所以对客户的操作会产生影响!如果服务器端的内存不足时,可能引起Session的崩溃!所以在大的系统里不建议使用这个!
Default1:Session["a"] = b;
Default2:string C = Convert.ToString(Session["a"]); -
C#----如何让子窗体只显示一次
2018-03-06 11:04:39方法1:下面代码是在主窗体的菜单项单击事件中编写 private static DepartForm DF; //DepartForm 为子窗体 private void 部门管理ToolStripMenuItem_Click(object sender, EventArgs e) { if (DF == null || ... -
ASP.NET的网页代码模型及生命周期
2009-07-28 14:22:11代码隐藏页模型与单文件页模型不同的是,代码隐藏页模型将事物处理代码都存放在cs文件中,当ASP.NET网页运行的时候,ASP.NET类生成时会先处理cs文件中的代码,再处理.aspx页面中的代码。这种过程被成为代码分离。 ... -
c# 加密和解密相关代码
2011-09-06 11:04:59下面的代码 通过double.Parse 方法判断textBox1 文本框中的输入是否为数字。 double.Parse(textBox1.Text); 实例573 使用ROT13算法加密解密数据 光盘位置:光盘\MR\19\573 中级 趣味指数: 实 例说明 文件加密可以... -
c#下利用委托为动态控件添加响应事件
2017-04-11 09:01:09//将按钮的方法绑定到按钮的单击事件中b.Click是按钮的单击事件 form2.Show(); } } private static void Btn_Click(object sender, System.EventArgs e) { Button pb = (Button)sender;//将触发此事件的... -
ASP.NET精品课程+源代码
2009-01-05 20:15:51ASP.NET是一门技术性较强的应用型课程,通过突出实践教学不仅能够培养学生的操作技能,而且有利于学生形成全面的职业岗位素养,因此实践性教学是本课程教学中的一个必不可少的环节。 首先在学时上给予保证,我们采用... -
Visual C++ 2005入门经典--源代码及课后练习答案
2013-02-02 16:42:04该资料是《Visual C++ 2005入门经典》的源代码及课后练习答案 对应的书籍资料见: Visual C++ 2005入门经典 基本信息 原书名: Ivor Horton's Beginning Visual C++ 2005 原出版社: Wiley 作者: (美)Ivor Horton... -
Visual C++ 2008入门经典--源代码及课后练习答案
2013-02-02 16:13:25该资料是《Visual C++ 2008入门经典》的源代码及课后练习答案 对应的书籍资料见: Visual C++ 2008入门经典 基本信息 原书名: Ivor Horton's Beginning Visual C++ 2008 原出版社: Wrox 作者: (美)Ivor Horton ... -
2—1 VB6.0的集成开发环境
2009-12-30 17:48:58窗体是一个程序表现在外的界面、模块是程序内部使用的代码。当我们在“工程”菜单中单击“添加窗体”菜单后,“VB工程管理器”中就会显示出新添加的窗体。这也就是“VB工程管理器”的功能,它使我们从总体上把握... -
arcgisengine打开属性表
2020-11-01 17:24:15在主窗体的属性表单击事件中添加下面代码用了打开属性表: private void 显示属性表ToolStripMenuItem_Click(object sender, EventArgs e) { 属性表 atTable =null ; //窗体名称是属性表 if (atTable == null ||... -
Qt Creator 的安装和hello world 程序+其他程序的编写--不是一般的好
2011-01-28 17:02:085.右击登录按钮选择go to slot,再选择clicked(),然后进入其单击事件的槽 函数,写入一句 void loginDlg::on_loginBtn_clicked() { accept(); } 6.改写main.cpp: #include #include "widget.h" #include "logindlg... -
PLSQL Developer(免安装、汉化版,很好用的) 8.0.3.1510.rar
2012-01-25 22:56:29本人正在用的,很好用,是中文免安装版的,下面是详细介绍: PL/SQL Developer是一个集成开发环境,专门面向Oracle数据库存储程序单元的开发。如今,有越来越多的商业逻辑和应用逻辑转向了Oracle Server,因此,PL/... -
C# for CSDN 乱七八糟的看不懂
2012-06-03 15:40:47定义 数组是一种排列有序的数据结构,包含于数组中的变量被称为数组的元素, 它们都有相同的类型。 数组声明 int [] array1 = new int[5]; int [,,] array3 = new int[10,20,30]; int [] array1 = new int[] {1,2,4}... -
vc++ 应用源码包_1
2012-09-15 14:22:12利用Delphi的代码在VC中显示JPG图片,不使用动态连接库。 Mail_Report.zip 一个邮件报告程序。 SrcFirstProg.zip 解释了最基本的MFC程序流程。 tabcontrol_demo.zip tabcontrol_src.zip 自定义的标签控件对话框... -
vc++ 应用源码包_2
2012-09-15 14:27:40利用Delphi的代码在VC中显示JPG图片,不使用动态连接库。 Mail_Report.zip 一个邮件报告程序。 SrcFirstProg.zip 解释了最基本的MFC程序流程。 tabcontrol_demo.zip tabcontrol_src.zip 自定义的标签控件对话框... -
vc++ 应用源码包_6
2012-09-15 14:59:46利用Delphi的代码在VC中显示JPG图片,不使用动态连接库。 Mail_Report.zip 一个邮件报告程序。 SrcFirstProg.zip 解释了最基本的MFC程序流程。 tabcontrol_demo.zip tabcontrol_src.zip 自定义的标签控件对话框... -
vc++ 应用源码包_5
2012-09-15 14:45:16利用Delphi的代码在VC中显示JPG图片,不使用动态连接库。 Mail_Report.zip 一个邮件报告程序。 SrcFirstProg.zip 解释了最基本的MFC程序流程。 tabcontrol_demo.zip tabcontrol_src.zip 自定义的标签控件对话框... -
vc++ 应用源码包_4
2012-09-15 14:38:35利用Delphi的代码在VC中显示JPG图片,不使用动态连接库。 Mail_Report.zip 一个邮件报告程序。 SrcFirstProg.zip 解释了最基本的MFC程序流程。 tabcontrol_demo.zip tabcontrol_src.zip 自定义的标签控件对话框... -
vc++ 应用源码包_3
2012-09-15 14:33:15利用Delphi的代码在VC中显示JPG图片,不使用动态连接库。 Mail_Report.zip 一个邮件报告程序。 SrcFirstProg.zip 解释了最基本的MFC程序流程。 tabcontrol_demo.zip tabcontrol_src.zip 自定义的标签控件对话框... -
C#高级编程(第9版):C# 5.0 & .NET 4.5.1.[美]Christian Nagel(带详细书签) PDF 下载 高清 完整版
2017-12-26 14:02:25使用ASP.NET,可以编译页面中的代码,这些代码还可以使用.NET能识别的高级语言来编写,如C#或Visual Basic 2013。.NET现在还添加了对最新Web技术的重要支持,如Ajax和jQuery。 ● 高效的数据访问:一组.NET组件,... -
Visual C++ 2005 入门经典 详细书签版
2013-02-02 16:39:432.3.6 ISO/ANSI C++中的基本类型 49 2.3.7 字面值 50 2.3.8 定义数据类型的同义词 50 2.3.9 具有特定值集的变量 51 2.3.10 指定枚举常量的类型 52 2.4 基本的输入/输出操作 53 2.4.1 从键盘输入 53 ... -
Visual C++ 2008入门经典--详细书签版
2013-02-02 16:07:15◆ 使用标准模板库(stl)来组织和操作本地c++程序中的数据 ◆ c++程序调试技术.. ◆ 构造microsoft windows应用程序的技术以及每个应用程序的基本元素 ◆ 创建和使用常用控件构建应用程序的图形用户界面 ◆... -
堆栈窗体,每个窗体都是个单独的qwidget,方便编写自己的代码。 顶部鼠标右键菜单,可动态控制时间CPU+左上角面板+左下角面板+右上角面板+右下角面板的显示和隐藏,支持恢复默认布局。 工具栏可以放置多个小图标和...
-
Java小白求救啊!!!
2020-03-20 21:52:04监听鼠标单击事件(鼠标按下后松开才会被监听,按下不会被监听) * 3.mousePressed();监听鼠标按下去的事件(只要鼠标按下就会被监听) * 4.mouseEntered();监听鼠标移入游戏界面的事件 * 5.... -
JAVA通讯录 TXT文档分页问题
2017-01-02 11:24:30* 下面的find.next()是获取find对象中的值 然后赋值给 str 然后输出这个方法 * 其实就是循环输出it 对象中所有的值 */ while (find.hasNext()) { if (find.next().equals(Tname... -
Extjs4 tabpanel 一个页面关闭后再打开报错
2014-05-06 03:05:23'menuView treepanel[id="Clgl30000"]':{//查询 菜单树 添加单击事件 itemclick:function(tree,record,item,index,e,options){ var mainView=Ext.getCmp("centerpanel");//得到中间的 tabpanel ...