- 浏览: 871145 次
- 性别:
- 来自: 西安
文章分类
最新评论
-
qunhua1861:
我已做好准备,让您无可挑剔。白癜风常识http://www.4 ...
创业路上之谢谢王磊何公道丁凯李亚平黄小润张小兵 -
qunhua1861:
给我一份信任,还您一身健康。白癜风常识http://m.400 ...
创业路上之无尽感谢 -
qunhua1861:
以我真心、关心、耐心,换您放心、安心、舒心。<a hre ...
《博客园精华集》web标准分册第2论筛选结果文章列表 -
saieuler:
真的吗??
物理运动模拟引擎 -
saieuler:
每次都是学会了,过段时间又忘了
记录KMP算法,记录其经典之处。。。
所谓控件的选择,就是在设计器上某个控件被选中或者控件获得焦点(通过Tab调整控件焦点)的时候,在控件的四周显示出调整手柄。
如下图:
如上,通过控件的调整手柄,我们可以调整控件的宽度和高度。而实现这个调整手柄的关键点其实得益于vs2005控件的灵活性。因为这8个正方形的调整手柄其实就是8个控件。
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
所以我们本文的重点如下:
1、开发自定义的调整手柄控件,也就是这正方形控件;
2、组合这8个调整手柄控件,目标是使设计器上的控件与调整手柄完全解耦,调整手柄能够不做任何的修改就可以应用于所有的控件;
3、设计器上的控件与调整手柄的对应方法,也就是选择控件的时候,能够在控件周围显示调整手柄。
下面我们针对这3个重点,在前一篇《在容器上拖动鼠标增加控件》的基础上,实现控件的选择功能。
1、开发自定义的调整手柄控件:
这其实属于自定义控件开发的问题,你首先增加“用户控件”,把控件名命名为UISizeDot,把下面的代码直接拷贝进去就可以了,所以我不做过多的描述,这里直接把代码贴出来好了。
- [ToolboxItem(false)]
- publicpartialclassUISizeDot:Control
- {
- privatebool_movable;
- privatePenpen=newPen(Color.Black);
- publicUISizeDot()
- {
- InitializeComponent();
- SetStyle(ControlStyles.UserPaint,true);
- SetStyle(ControlStyles.AllPaintingInWmPaint,true);
- SetStyle(ControlStyles.OptimizedDoubleBuffer,true);
- this.TabStop=false;
- this._movable=true;
- }
- ///<summary>
- ///UISizeDot的边框颜色
- ///</summary>
- publicColorBorderColor
- {
- get{returnpen.Color;}
- set
- {
- this.pen=newPen(value);
- this.Refresh();
- }
- }
- protectedoverridevoidOnPaint(PaintEventArgspe)
- {
- //TODO:在此处添加自定义绘制代码
- //this.BackColor=Color.White;
- pe.Graphics.DrawRectangle(pen,0,0,this.Width-1,this.Height-1);
- //调用基类OnPaint
- base.OnPaint(pe);
- }
- publicboolMovable
- {
- get{returnthis._movable;}
- set{this._movable=value;}
- }
- }
2、组合这8个自定义调整手柄控件:
这个功能的目的就是,就是将这8个调整手柄控件组合起来,为了描述以及开发上的方便,我们使用一个控件数组UISizeDot[]_UISizeDot = new UISizeDot(8),我们约定从左上角按照顺时针方向到又下角分别_UISizeDot[0]~ _UISizeDot[7],其它的不用说了,看代码吧:
- publicenumENUM_UISizeMode
- {
- FixNone=0,//不固定
- FixLocation=1,//固定左上角,这时只能改变两边
- FixHeight=2,//固定高
- FixWidth=3,//固定宽
- FixBoth=4//长宽都固定
- }
- publicclassUISizeKnob
- {
- privateconstintDOT_WIDTH=7;//UISizeDot宽度
- privateconstintDOT_HEIGHT=7;//UISizeDot高度
- privateconstintDOT_SPACE=0;//UISizeDot与_Owner的距离
- privateconstintDOT_COUNT=8;//要显示的UISizeDot数
- privateSystem.Windows.Forms.Control_Owner;
- privateUISizeDot[]_UISizeDot;
- privateint_OldTop;
- privateint_OldLeft;
- privateint_NewTop;
- privateint_NewLeft;
- privateint_OldWidth;
- privateint_OldHeight;
- privateint_ClickAtX;
- privateint_ClickAtY;
- privateENUM_UISizeMode_UISizeMode;
- privatebool_BeginDrag;
- privateRectangle_OldRect;
- privateColor_DotColor=Color.White;//UISizeDot默认颜色为白色
- privateColor_DotBorderColor=Color.Black;//UISizeDot默认边框颜色为黑色
- publiceventSystem.Windows.Forms.MouseEventHandlerMouseDown=null;
- publiceventSystem.Windows.Forms.MouseEventHandlerMouseMove=null;
- publiceventSystem.Windows.Forms.MouseEventHandlerMouseUp=null;
- privateintj=0;
- privatebool_IsShow=false;
- publicUISizeKnob(System.Windows.Forms.Controlowner)
- {
- this._Owner=owner;
- this._NewTop=owner.Top;
- this._NewLeft=owner.Left;
- this._OldWidth=owner.Width;
- this._OldHeight=owner.Height;
- InitUISizeDots();
- }
- publicboolIsShow
- {
- get{returnthis._IsShow;}
- }
- publicColorDotColor
- {
- get{returnthis._DotColor;}
- set
- {
- this._DotColor=value;
- this._DotBorderColor=Color.FromArgb(Math.Abs(Convert.ToInt32(value.R)-255),Math.Abs(Convert.ToInt32(value.G)-255),Math.Abs(Convert.ToInt32(value.B)-255));
- }
- }
- ///<summary>
- ///注销
- ///</summary>
- publicvoidDispose()
- {
- for(inti=0;i<this._UISizeDot.Length;i++)
- {
- this._UISizeDot[i].Dispose();
- }
- }
- ///<summary>
- ///this._Owner的大小改变模式
- ///</summary>
- publicENUM_UISizeModeUISizeMode
- {
- get{returnthis._UISizeMode;}
- set{this._UISizeMode=value;}
- }
- privatevoidInitUISizeDots()
- {
- this._UISizeDot=newUISizeDot[DOT_COUNT];
- for(inti=0;i<DOT_COUNT;i++)
- {
- this._UISizeDot[i]=newUISizeDot();
- this._UISizeDot[i].Width=DOT_WIDTH;
- this._UISizeDot[i].Height=DOT_HEIGHT;
- this._UISizeDot[i].Visible=false;
- this._Owner.Parent.Controls.Add(this._UISizeDot[i]);
- this._UISizeDot[i].MouseDown+=newSystem.Windows.Forms.MouseEventHandler(this.UISizeDot_MouseDown);
- this._UISizeDot[i].MouseMove+=newSystem.Windows.Forms.MouseEventHandler(this.UISizeDot_MouseMove);
- this._UISizeDot[i].MouseUp+=newSystem.Windows.Forms.MouseEventHandler(this.UISizeDot_MouseUp);
- }
- this._UISizeDot[0].Cursor=System.Windows.Forms.Cursors.SizeNWSE;
- this._UISizeDot[1].Cursor=System.Windows.Forms.Cursors.SizeNS;
- this._UISizeDot[2].Cursor=System.Windows.Forms.Cursors.SizeNESW;
- this._UISizeDot[3].Cursor=System.Windows.Forms.Cursors.SizeWE;
- this._UISizeDot[4].Cursor=System.Windows.Forms.Cursors.SizeNWSE;
- this._UISizeDot[5].Cursor=System.Windows.Forms.Cursors.SizeNS;
- this._UISizeDot[6].Cursor=System.Windows.Forms.Cursors.SizeNESW;
- this._UISizeDot[7].Cursor=System.Windows.Forms.Cursors.SizeWE;
- SetUISizeDotsPosition();
- }
- publicvoidShowUISizeDots(boolshow)
- {
- this._IsShow=show;
- //2006-10-05:将此函数中所有的this._UISizeDot.Length全部替换成8
- if(show)
- {
- SetUISizeDotsPositionByMove(false);
- }
- else
- {
- this._Owner.Parent.SuspendLayout();
- for(inti=0;i<DOT_COUNT;i++)
- {
- this._UISizeDot[i].Visible=show;
- }
- this._Owner.Parent.ResumeLayout();
- return;
- }
- if(this._UISizeMode==ENUM_UISizeMode.FixNone)
- {
- for(inti=0;i<DOT_COUNT;i++)
- {
- this._UISizeDot[i].BorderColor=this._DotBorderColor;
- this._UISizeDot[i].BackColor=this._DotColor;
- this._UISizeDot[i].Visible=show;
- }
- }
- elseif(this._UISizeMode==ENUM_UISizeMode.FixLocation)
- {
- for(inti=0;i<DOT_COUNT;i++)
- {
- this._UISizeDot[i].BorderColor=this._DotBorderColor;
- this._UISizeDot[i].BackColor=this._DotColor;
- this._UISizeDot[i].Visible=show;
- }
- this._UISizeDot[0].BackColor=System.Drawing.Color.FromArgb(9,55,119);
- this._UISizeDot[0].Movable=false;
- this._UISizeDot[1].BackColor=System.Drawing.Color.FromArgb(9,55,119);
- this._UISizeDot[1].Movable=false;
- this._UISizeDot[2].BackColor=System.Drawing.Color.FromArgb(9,55,119);
- this._UISizeDot[2].Movable=false;
- this._UISizeDot[6].BackColor=System.Drawing.Color.FromArgb(9,55,119);
- this._UISizeDot[6].Movable=false;
- this._UISizeDot[7].BackColor=System.Drawing.Color.FromArgb(9,55,119);
- this._UISizeDot[7].Movable=false;
- }
- elseif(this._UISizeMode==ENUM_UISizeMode.FixHeight)
- {
- this._UISizeDot[0].Visible=false;
- this._UISizeDot[1].Visible=false;
- this._UISizeDot[2].Visible=false;
- this._UISizeDot[3].BorderColor=this._DotBorderColor;
- this._UISizeDot[3].BackColor=this._DotColor;
- this._UISizeDot[3].Refresh();
- this._UISizeDot[3].Visible=show;
- this._UISizeDot[4].Visible=false;
- this._UISizeDot[5].Visible=false;
- this._UISizeDot[6].Visible=false;
- this._UISizeDot[7].BorderColor=this._DotBorderColor;
- this._UISizeDot[7].BackColor=this._DotColor;
- this._UISizeDot[7].Refresh();
- this._UISizeDot[7].Visible=show;
- }
- elseif(this._UISizeMode==ENUM_UISizeMode.FixWidth)
- {
- this._UISizeDot[0].Visible=false;
- this._UISizeDot[1].BorderColor=this._DotBorderColor;
- this._UISizeDot[1].BackColor=this._DotColor;
- this._UISizeDot[1].Visible=show;
- this._UISizeDot[1].Refresh();
- this._UISizeDot[2].Visible=false;
- this._UISizeDot[3].Visible=false;
- this._UISizeDot[4].Visible=false;
- this._UISizeDot[5].BorderColor=this._DotBorderColor;
- this._UISizeDot[5].BackColor=this._DotColor;
- this._UISizeDot[5].Visible=show;
- this._UISizeDot[5].Refresh();
- this._UISizeDot[6].Visible=false;
- this._UISizeDot[7].Visible=false;
- }
- elseif(this._UISizeMode==ENUM_UISizeMode.FixBoth)
- {
- for(inti=0;i<DOT_COUNT;i++)
- {
- this._UISizeDot[i].BorderColor=this._DotBorderColor;
- this._UISizeDot[i].BackColor=System.Drawing.Color.FromArgb(9,55,119);
- this._UISizeDot[i].Movable=false;
- this._UISizeDot[i].Visible=show;
- }
- }
- }
- privatevoidSetUISizeDotsPosition()
- {
- intleft,width,height,top;
- left=this._Owner.Left;
- top=this._Owner.Top;
- width=this._Owner.Width;
- height=this._Owner.Height;
- this._UISizeDot[0].Location=newPoint(left-DOT_WIDTH-DOT_SPACE,top-DOT_HEIGHT-DOT_SPACE);
- this._UISizeDot[1].Location=newPoint(left+width/2-DOT_WIDTH/2,top-DOT_HEIGHT-DOT_SPACE);
- this._UISizeDot[2].Location=newPoint(left+width+DOT_SPACE,top-DOT_HEIGHT-DOT_SPACE);
- this._UISizeDot[3].Location=newPoint(left+width+DOT_SPACE,top+height/2-DOT_HEIGHT/2);
- this._UISizeDot[4].Location=newPoint(left+width+DOT_SPACE,top+height+DOT_SPACE);
- this._UISizeDot[5].Location=newPoint(left+width/2-DOT_WIDTH/2,top+height+DOT_SPACE);
- this._UISizeDot[6].Location=newPoint(left-DOT_WIDTH-DOT_SPACE,top+height+DOT_SPACE);
- this._UISizeDot[7].Location=newPoint(left-DOT_WIDTH-DOT_SPACE,top+height/2-DOT_HEIGHT/2);
- }
- privatevoidSetUISizeDotsPositionByMove(boolShow)
- {
- intleft,width,height,top;
- left=this._Owner.Left;
- top=this._Owner.Top;
- width=this._Owner.Width;
- height=this._Owner.Height;
- this._UISizeDot[0].Visible=Show;
- this._UISizeDot[1].Visible=Show;
- this._UISizeDot[2].Visible=Show;
- this._UISizeDot[3].Visible=Show;
- this._UISizeDot[4].Visible=Show;
- this._UISizeDot[5].Visible=Show;
- this._UISizeDot[6].Visible=Show;
- this._UISizeDot[7].Visible=Show;
- this._UISizeDot[0].BringToFront();
- this._UISizeDot[1].BringToFront();
- this._UISizeDot[2].BringToFront();
- this._UISizeDot[3].BringToFront();
- this._UISizeDot[4].BringToFront();
- this._UISizeDot[5].BringToFront();
- this._UISizeDot[6].BringToFront();
- this._UISizeDot[7].BringToFront();
- this._UISizeDot[0].Location=newPoint(left-DOT_WIDTH-DOT_SPACE,top-DOT_HEIGHT-DOT_SPACE);
- this._UISizeDot[1].Location=newPoint(left+width/2-DOT_WIDTH/2,top-DOT_HEIGHT-DOT_SPACE);
- this._UISizeDot[2].Location=newPoint(left+width+DOT_SPACE,top-DOT_HEIGHT-DOT_SPACE);
- this._UISizeDot[3].Location=newPoint(left+width+DOT_SPACE,top+height/2-DOT_HEIGHT/2);
- this._UISizeDot[4].Location=newPoint(left+width+DOT_SPACE,top+height+DOT_SPACE);
- this._UISizeDot[5].Location=newPoint(left+width/2-DOT_WIDTH/2,top+height+DOT_SPACE);
- this._UISizeDot[6].Location=newPoint(left-DOT_WIDTH-DOT_SPACE,top+height+DOT_SPACE);
- this._UISizeDot[7].Location=newPoint(left-DOT_WIDTH-DOT_SPACE,top+height/2-DOT_HEIGHT/2);
- }
- privatevoidUISizeDot_MouseDown(objectsender,System.Windows.Forms.MouseEventArgse)
- {
- if(!((UISizeDot)sender).Movable)
- {
- return;
- }
- j++;
- this.ShowUISizeDots(false);
- this._BeginDrag=true;
- this._ClickAtX=e.X;
- this._ClickAtY=e.Y;
- this._OldTop=this._Owner.Top;
- this._OldLeft=this._Owner.Left;
- this._NewTop=this._Owner.Top;
- this._NewLeft=this._Owner.Left;
- this._OldHeight=this._Owner.Height;
- this._OldWidth=this._Owner.Width;
- Rectanglerect=newRectangle(this._NewLeft-1,this._NewTop-1,this._OldWidth+2,this._OldHeight+2);
- //this._Owner.Parent.CreateGraphics().DrawRectangle(newPen(Color.Black,2),rect);
- this._OldRect=rect;
- if(this.MouseDown!=null)
- this.MouseDown(sender,e);
- }
- privatevoidUISizeDot_MouseMove(objectsender,System.Windows.Forms.MouseEventArgse)
- {
- if(!((UISizeDot)sender).Movable)
- {
- return;
- }
- if(this._BeginDrag)
- {
- inteX=e.X-this._ClickAtX;
- inteY=e.Y-this._ClickAtY;
- if(this._UISizeDot[0]==sender)
- {
- this._Owner.Location=newSystem.Drawing.Point(this._NewLeft+eX,this._NewTop+eY);
- this._Owner.Size=newSystem.Drawing.Size(this._Owner.Width-eX,this._Owner.Height-eY);
- }
- elseif(this._UISizeDot[1]==sender)
- {
- this._Owner.Location=newSystem.Drawing.Point(this._NewLeft,this._NewTop+eY);
- this._Owner.Size=newSystem.Drawing.Size(this._Owner.Width,this._Owner.Height-eY);
- }
- elseif(this._UISizeDot[2]==sender)
- {
- this._Owner.Location=newSystem.Drawing.Point(this._NewLeft,this._NewTop+eY);
- this._Owner.Size=newSystem.Drawing.Size(this._Owner.Width+eX,this._Owner.Height-eY);
- }
- elseif(this._UISizeDot[3]==sender)
- {
- this._Owner.Size=newSystem.Drawing.Size(this._Owner.Width+eX,this._Owner.Height);
- }
- elseif(this._UISizeDot[4]==sender)
- {
- this._Owner.Size=newSystem.Drawing.Size(this._Owner.Width+eX,this._Owner.Height+eY);
- }
- elseif(this._UISizeDot[5]==sender)
- {
- this._Owner.Size=newSystem.Drawing.Size(this._Owner.Width,this._Owner.Height+eY);
- }
- elseif(this._UISizeDot[6]==sender)
- {
- this._Owner.Location=newSystem.Drawing.Point(this._NewLeft+eX,this._NewTop);
- this._Owner.Size=newSystem.Drawing.Size(this._Owner.Size.Width-eX,this._Owner.Height+eY);
- }
- elseif(this._UISizeDot[7]==sender)
- {
- this._Owner.Location=newSystem.Drawing.Point(this._NewLeft+eX,this._NewTop);
- this._Owner.Size=newSystem.Drawing.Size(_Owner.Width-eX,this._Owner.Height);
- }
- this._NewTop=this._Owner.Top;
- this._NewLeft=this._Owner.Left;
- //this._OldHeight=this._Owner.Height;
- //this._OldWidth=this._Owner.Width;
- SetUISizeDotsPosition();
- this._Owner.Refresh();
- this._Owner.Parent.Refresh();
- //this._Owner.Parent.CreateGraphics().DrawRectangle(newPen(this._Owner.BackColor,2),this._OldRect);
- Rectanglerect=newRectangle(this._NewLeft-1,this._NewTop-1,this._Owner.Width+2,this._Owner.Height+2);
- //this._Owner.Parent.CreateGraphics().DrawRectangle(newPen(Color.Black,2),rect);
- this._OldRect=rect;
- }
- if(this.MouseMove!=null)
- this.MouseMove(sender,e);
- }
- privatevoidUISizeDot_MouseUp(objectsender,System.Windows.Forms.MouseEventArgse)
- {
- if(!((UISizeDot)sender).Movable)
- {
- return;
- }
- HashtableOldWidth;
- HashtableOldHeight;
- HashtableNewWidth;
- HashtableNewHeight;
- //Test.UIResizeCommandResizeCommand;
- //this._Owner.Parent.CreateGraphics().DrawRectangle(newPen(this._Owner.BackColor,2),this._OldRect);
- this.ShowUISizeDots(true);
- //使用UIResizeCommand,这里主要是保存现场,这样可以方便实现Undo和Redo
- if(this._OldHeight!=this._Owner.Height||this._OldWidth!=this._Owner.Width)
- {
- OldWidth=newHashtable();
- OldHeight=newHashtable();
- NewWidth=newHashtable();
- NewHeight=newHashtable();
- OldWidth.Add(this._Owner,this._OldWidth);
- OldHeight.Add(this._Owner,this._OldHeight);
- NewWidth.Add(this._Owner,this._Owner.Width);
- NewHeight.Add(this._Owner,this._Owner.Height);
- }
- this._BeginDrag=false;
- if(this.MouseUp!=null)
- this.MouseUp(sender,e);
- }
- }
3、设计器上控件与调整手柄的对应方法:
在我们的UISizeKnob中,有一个函数ShowUISizeDots(bool show)。这里的show参数就是表示,显示或者隐藏控件的调整手柄。
所以为了方便,我在前面的Form中增加这样的变量和函数:
变量private Hashtable _HashUISizeKnob负责缓存每个新增加的控件对应的UISizeKnob对象,因为一个Control只能对应一个UISizeKnob对象。
另外,我们怎么知道新增了控件呢,这里需要实现事件Control.ControlAdded,在这里是实现Form的ControlAdded事件。
Form的代码修改后如下:
- //在Form中增加几个Button,分别命名为cmdArrow,cmdLabel,cmdTextBox,cmdComboBox,cmdGroupBox
- publicpartialclassForm1:Form
- {
- privateMouseHook_MouseHook;
- //我们将所有的已经与具体控件关联了的UISizeKnob缓存在这个HashTable中
- privateHashtable_HashUISizeKnob;
- publicForm1()
- {
- InitializeComponent();
- this._MouseHook=newMouseHook(this);
- this._HashUISizeKnob=newHashtable();
- //为了简洁明了,我们在ControlAdded中来设置具体控件和UISizeKnob的关联
- this.ControlAdded+=newControlEventHandler(Form1_ControlAdded);
- }
- voidForm1_ControlAdded(objectsender,ControlEventArgse)
- {
- if(!(e.ControlisUISizeDot))
- {
- this._HashUISizeKnob.Add(e.Control,newUISizeKnob(e.Control));
- //点击控件的时候,显示控件的选择
- e.Control.Click+=newEventHandler(Control_Click);
- }
- }
- voidControl_Click(objectsender,EventArgse)
- {
- //寿险清除已经选择的控件
- foreach(UISizeKnobknobinthis._HashUISizeKnob.Values)
- {
- knob.ShowUISizeDots(false);
- }
- try
- {
- ((UISizeKnob)this._HashUISizeKnob[sender]).ShowUISizeDots(true);
- }
- catch{}
- }
- privatevoidcmdArrow_Click(objectsender,EventArgse)
- {
- SettingService.Instance.SelectedToolBoxControl=null;
- }
- privatevoidcmdLabel_Click(objectsender,EventArgse)
- {
- SettingService.Instance.SelectedToolBoxControl=newLabel();
- }
- privatevoidcmdTextBox_Click(objectsender,EventArgse)
- {
- SettingService.Instance.SelectedToolBoxControl=newTextBox();
- }
- privatevoidcmdComboBox_Click(objectsender,EventArgse)
- {
- SettingService.Instance.SelectedToolBoxControl=newComboBox();
- }
- privatevoidcmdGroupBox_Click(objectsender,EventArgse)
- {
- SettingService.Instance.SelectedToolBoxControl=newGroupBox();
- }
- }
以上就是实现控件选择的关键部分,各位结合上面一篇,应该是很容易理解的,代码都是可运行的,自己拷贝过去就可以了。
相关文章:
相关推荐
所以我就想能够弄一个类似于vs2005的WinForm窗体设计器的开发平台,让用户拖拖拽拽就可以添加自己需要的控件,或者删除不需要的控件,从而完成大部分的工作,实现功能的扩展,而我需要做的,只不过是写写插件代码。...
利用可视化编程思想,综合应用C#的MDI窗体设计方法,掌握各控件设计方法,MenuStrip、ContextMenuStrip、ToolStrip、StatusStrip等,以及文件管理操作等。 资源为可运行源码,仅供参考,如有问题,欢迎留言讨论!
这是武汉理工大学计算机学院可视化编程(C#)课程的第四次实验:窗体和控件综合设计 的源代码。运行环境:VS2017。
winform窗体继承泛型类时,设计器无法使用解决办法: 当我们使用winform程序时,winform窗体程序和控件程序都是可以通过设计器进行控件拖拽的,但如果我们继承了一个带有泛型的form基类.那么设计器是无法使用的.
Winform窗体设计器,基于C#源码实现,界面仿VisualStudio,这个窗体设计器可显示出制作窗体上一些必备元素的属性信息源码也是可以编译的。没有使用微软Runtime FormDesigner技术
WinForm运行时模仿窗体设计调整控件大小和位置 具体讲解看https://blog.csdn.net/weixin_38211198/article/details/90639601
自己开发的C#工具箱,包含各种常用仪表控件,曲线图控件,水塔,开关,按钮控件。尽情相互交流留下宝贵意见
这是武汉理工大学计算机学院可视化编程(C#)课程的第四次实验:窗体和控件综合设计(多文档编辑器)的源代码。压缩包内含运行源代码和两份参考资料。运行环境:VS2017。
主要内容有C#开发环境的使用、C#语言基础应用、字符串处理技术、数组和集合的使用、面向对象编程技术、数据结构与算法、Windows窗体基础、特色窗体界面、窗体控制技术、MDI窗体和继承窗体、Windows常用控件的使用、...
学习窗体控件的编程。首先介绍如何使用窗体设计器向窗体中添加控件以及如何在窗体设计器中调整控件位置和大小等属性。然后依次介绍各个常用的控件,包括控件所特有的属性和事件。
学习窗体控件的编程。首先介绍如何使用窗体设计器向窗体中添加控件以及如何在窗体设计器中调整控件位置和大小等属性。然后依次介绍各个常用的控件,
实例093 利用选择控件实现权限设置 实例094 利用richtextbox控件显示图文数据 实例095 在listbox控件间交换数据 第10章 windows应用程序高级控件 实例096 使用imagelist组件制作动画图片 实例097 在combobox下拉...
C#控件大全,首先介绍如何使用窗体设计器向窗体中添加控件以及如何在窗体设计器中调整控件位置和大小等属性。然后依次介绍各个常用的控件,包括控件所特有的属性和事件。
Visual+C#+2008程序设计经典案例设计与实现 第1章 Visual C#2008与窗体界面 案例1 飘动动画窗体 案例2 透明动画窗体 案例3 利用API函数实现动画窗体 案例4 闪烁动画窗体 案例5 滚动字幕动画窗体 案例6 超女卡通...
C#控件大全控件的使用 学习窗体控件的编程。首先介绍如何使用窗体设计器向窗体中添加控件以及如何在窗体设计器中调整控件位置和大小等属性。然后依次介绍各个常用的控件,包括控件所特有的属性和事件。
首先介绍如何使用窗体设计器向窗体中添加控件以及如何在窗体设计器中调整控件位置和大小等属性。然后依次介绍各个常用的控件,包括控件所特有的属性和事件。 1 纲要 2 添加控件 3 调整控件 4 控件的分类介绍
C#控件大全 分章节学习 学习窗体控件的编程。首先介绍如何使用窗体设计器向窗体中添加控件以及如何在窗体设计器中调整控件位置和大小等属性。然后依次介绍各个常用的控件,包括控件所特有的属性和事件。
明日科技出版的c#开发典型模块大全配套光盘,要的可以下载,因大小受限,分开上传! 第1章 认识C#及开发环境 1.1 C#概述 1.1.1 C#发展历程 1.1.2 C#语言编程环境 1.2.NETFramework2.0简介 1.2.1 什么是....