使用Form创建欢迎界面
2011-09-30 20:42
267 查看
大部分常见的商业软件中都存在着欢迎界面,如微软公司的Office系列产品、Visual Stdio 2010等。
欢迎界面中通常显示软件的基本信息和产品的商标标识,当应用程序启动时间较长时,还可以在显示欢迎界面的同时加载应用程序,从而使得用户从心里上增加对程序加载时间的容忍度。
本例子的主要操作对象为窗体,即Form。其实使用的两个主要的窗体属性分别是StartPosition和FormBorderStyle。StartPosition属性用于控制窗体的起始位置,其中当设置为CenterScreen时即从屏幕的中央显示窗体。FormBorderStyle属性则用于控制窗体的外观。
欢迎界面中通常显示软件的基本信息和产品的商标标识,当应用程序启动时间较长时,还可以在显示欢迎界面的同时加载应用程序,从而使得用户从心里上增加对程序加载时间的容忍度。
本例子的主要操作对象为窗体,即Form。其实使用的两个主要的窗体属性分别是StartPosition和FormBorderStyle。StartPosition属性用于控制窗体的起始位置,其中当设置为CenterScreen时即从屏幕的中央显示窗体。FormBorderStyle属性则用于控制窗体的外观。
namespace SplashScreen { public partial class SplashScreen : Form { public SplashScreen() { InitializeComponent(); } private void SplashScreen_Load(object sender, EventArgs e) { this.ClientSize = this.BackgroundImage.Size;//是欢迎界面的大小和背景图片的大小相同。 } } }
#region Windows 窗体设计器生成的代码 /// <summary> /// 设计器支持所需的方法 - 不要 /// 使用代码编辑器修改此方法的内容。 /// </summary> private void InitializeComponent() { this.SuspendLayout(); // // SplashScreen // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackgroundImage = global::SplashScreen.Properties.Resources.Tulips; this.ClientSize = new System.Drawing.Size(284, 262); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "SplashScreen"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "`"; this.Load += new System.EventHandler(this.SplashScreen_Load); this.ResumeLayout(false); } #endregion
相关文章推荐
- 多线程异步编程(2):创建多个线程执行任务,同时更新进度条,使用观察者模式,利用事件通知界面更新。移除对Form的引用,彻底解除界面与逻辑的耦合
- 使用plsql创建用户并授权(图形化界面)
- Android欢迎界面的创建及引导完整代码(判断是否是第一次下载注册)
- 在Axapta中,使用X++代码动态创建Form
- j2me 创建欢迎界面
- 使用设计器创建带有 ListView 和 TreeView 控件的资源管理器样式的界面 [无限级treeview]
- 使用X++代码创建一个Form
- [Extjs6]如何使用sencha cmd创建项目及如何启动修改项目创建新的界面
- 使用C语言和DX库编写东方风格的STG射击游戏--------第一章--------创建基本界面以及可以移动的角色
- wxWidgets学习笔记(二):使用wxFormBuilder、wxWidgets和Code::Blocks创建GUI程序
- 使用Google Docs的Form创建在线投票时出现的问题
- 使用线程创建form
- iPhone开发之创建简单界面视图的三种方式之一 使用xcode4自动生成界面
- Ionic2:创建App启动页滑动欢迎界面
- 【Android UI设计与开发】第02期:引导界面(二)使用ViewPager实现欢迎引导页面
- Android应用--首次使用的欢迎界面,之后不再显示
- 字符串和可变字符串 1 创建:alloc initWithFormat strin a0a9 g(可变字符串) 2 比较 isEqualTo欢迎使用CSDN-markdown编辑器
- Objective-C学习-如何使用Xcode4.2和Interface Builder创建自己第一个界面产品
- Android欢迎界面的创建方法
- JSP用户注册界面的创建和使用