C#编程-120:文件选择之OpenFileDialog控件
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO....
C#编程-73:panel控件中显示子窗体
Form fm = new Form(); fm.TopLevel = false; this.panel1.Controls.Add(fm); fm.FormBorderStyle = FormBorderStyle.None; fm.BringToFront(); fm.Show();
C#编程-59:ProgressBar控件复习笔记
ProgressBar控件主要属性:ValueStepMinimumMaximum方法:Increment(进度值)PerformStep()单步执行大数据,大文件操作时使用,避免用户误以为软件无响应
C#编程-57:ErrorProvider控件复习
控件:能显示的组件:不能显示的ErrorProvider控件主要属性;DataSourceContainerControlIcon,自定义错误图标主要方法:SetError,指定错误信息字符串和错误图标出现的位置
C#编程-57:MonthCalender控件复习笔记
显示特殊日期的三个属性:BoldedDates包含单个日志AnnuallyBoldedDates包含年MonthlyBoldedDates包含月CalenderDimensions显示多个月份选择日志范围:MaxDate 与MinDate外观设置,winxp以上的系统需要注释掉Program.cs里边的可视化风格:Application.EnableVisualStyles();
C#编程-55:TreeView控件复习笔记
TreeView控件显示结点层次结构CkeckBox属性设置为True则可以选择;TreeView的集合Nodes是TreeNode对象 TreeNode tn = new TreeNode();//添加结点:if (textBox1.Text.Trim() == "") return;TreeNode tn = new TreeNode();tn.Text = textBox1.Text.Tr....
C#编程-54:ListView控件复习笔记
ListView控件是Windows列表视图控件listView1.View=View.LargeIcon;其中:LargeIcon,大图标SmallIcon,小图标List,单列小图标Details,多列显示Tile,完整大小图标,邮编显示信息//添加item:ListViewItem lvi = listView1.Items.Add(i.ToString());//设置图片索引:lvi.I....
C#编程-52:PictureBox控件复习笔记
1、SizeMode属性(1)Normal:图片置于控件左上角,图片大于控件的部分会被裁剪(2)StretchImage:图片调整大小去适应控件(3)AutoSize:控件调整大小去适应图片(4)CenterImage:图片处于控件中心(5)Zoom:图片调整大小适应控件,长宽比保持不变2、Image 属性可以加载图片路径pictureBox1.Image = Image.FromFile();
C#编程-50:菜单控件复习笔记
1、MenuStrip菜单控件取代了MainMenu菜单名(&F),可以设置Alt+F的快捷键ToolStrip属性SurtCutKeys可以设置快捷键分割线:减号“-”输入,delete键可删除2、ContextMenuStrip上下文菜单需要在TextBox的ContextMenuStrip属性中设置选择3、ToolTip工具提示拖放到相应控件上即可4、ToolStrip工具栏是Me....
C#编程-48:文本控件复习笔记_
1、文本控件(1)标签Label(2)按钮Button(3)文本框TextBox(4)有格式文本RichTextBox2、LabelSystem.Windows.Forms.Label设置:属性面板,代码Size指整个窗体外边框的大小ClientSize指窗体内边框大小Random(min,max)能取下界,不能取上界3、ButtonSystem.Windows.Forms.Button要想关闭....
本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。