一个类似于VS工具现在遇到的一些问题 控件软件vsexe 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 private void pbBtn_MouseUp(object sender, MouseEventArgs e) { if (this.create_Btn) { Button button1 = null; button1 = new Button(); button1.Width = 80; button1.Height = 35; button1.Name = "Button" + BtnCount; button1.AutoSize = true; button1.Text = "Button" + BtnCount; button1.Location = new Point(e.X -108, e.Y+30); button1.MouseDown += new System.Windows.Forms.MouseEventHandler(Button_MouseDown); button1.MouseMove += new System.Windows.Forms.MouseEventHandler(Button_MouseMove); button1.MouseUp += new System.Windows.Forms.MouseEventHandler(Button_MouseUp); button1.MouseLeave +=new System.EventHandler(MyMouseLeave); button1.Enter += new System.EventHandler(BtnEnter); button1.KeyDown += new KeyEventHandler(MykeyDown); button1.KeyUp += new KeyEventHandler(MykeyUp); button1.Cursor = System.Windows.Forms.Cursors.Default; this.panel1.Controls.Add(button1); this.listbtn.Add(button1); this.create_Btn = false; BtnCount++; this.PreventMantle(button1); this.comboBox1.Items.Add(button1.Text); //this.comboBox1.SelectedItem = button1.Text; this.comboBox1.SelectedItem = button1.Name; //属性绑定 this.propertyGrid1.SelectedObject = button1; //右键弹出复制粘贴窗体 button1.ContextMenuStrip = this.cmsCn; } }这是创建控件的代码 http://bbs.csdn.net/topics/110001177怎么置底或者置顶,可以参考一下,不一定行。至于控件的数据同步,其实你可以考虑一下提供事件和属性给客户自己编写的,当然应该不符合你们公司的要求。最后一个问题不懂,觉得想法很酷,看过你做的demo,挺好的。加油。 你的Anchor和Dock属性是干什么的? 制作一个引导程序,将用户脚本捆绑在程序后面,打包得到一个exe不过.net framework框架太大,如果你希望做搭建工具,使用vc++/delphi比较好。 你应该没看明白我说的,或者没看图片,就像图1一样,我要把groupBox置底,让button显示出来,并不是把控件放在哪个位置。Anchor和Dock我都知道的 做这个很吃力不讨好.如果非要做还是不要仿VS了.我这个未完成的100%仿VS一个工具箱就20万字代码了. 请教下使用vs2005连接远程数据库SQL2000的方法。 哪位大哥大姐有c#的教程 请问怎么用C#代码打开exe文件 谁有together for vs.net 2005的crack C#中给密码加密例子和命名空间 sendkeys为什么不能发空格? 这样一个文字类如何实现呢????? 在.NET中如何进行项目管理 如何区分是本地文件还是远程文件??? 在web中模拟TreeView c# SynchronizedCollection查找问题 郁闷了,怎么回事,大家帮看看!
{
if (this.create_Btn)
{
Button button1 = null;
button1 = new Button();
button1.Width = 80;
button1.Height = 35;
button1.Name = "Button" + BtnCount;
button1.AutoSize = true;
button1.Text = "Button" + BtnCount;
button1.Location = new Point(e.X -108, e.Y+30);
button1.MouseDown += new System.Windows.Forms.MouseEventHandler(Button_MouseDown);
button1.MouseMove += new System.Windows.Forms.MouseEventHandler(Button_MouseMove);
button1.MouseUp += new System.Windows.Forms.MouseEventHandler(Button_MouseUp);
button1.MouseLeave +=new System.EventHandler(MyMouseLeave);
button1.Enter += new System.EventHandler(BtnEnter);
button1.KeyDown += new KeyEventHandler(MykeyDown);
button1.KeyUp += new KeyEventHandler(MykeyUp);
button1.Cursor = System.Windows.Forms.Cursors.Default;
this.panel1.Controls.Add(button1);
this.listbtn.Add(button1);
this.create_Btn = false;
BtnCount++;
this.PreventMantle(button1);
this.comboBox1.Items.Add(button1.Text);
//this.comboBox1.SelectedItem = button1.Text;
this.comboBox1.SelectedItem = button1.Name;
//属性绑定
this.propertyGrid1.SelectedObject = button1;
//右键弹出复制粘贴窗体
button1.ContextMenuStrip = this.cmsCn;
}
}
这是创建控件的代码
怎么置底或者置顶,可以参考一下,不一定行。
至于控件的数据同步,其实你可以考虑一下提供事件和属性给客户自己编写的,当然应该不符合你们公司的要求。
最后一个问题不懂,觉得想法很酷,看过你做的demo,挺好的。加油。
不过.net framework框架太大,如果你希望做搭建工具,使用vc++/delphi比较好。