c#.net实现splash screen(闪屏)的几个方法:
闪屏直接用个form就可以了,然后在主form中new出来,并且调用form.show() (千万别用showdialog)。比较麻烦的是希望在这个时候把主窗体隐藏起来。下面是解决方法。
不能用常规的this.Visible来设定。因为form的load事件后form会show出来。
以下方法1~3测试有效:
1.
On Form Load:
Code:
this.opacity = 0;
and then when you want to display it
Code:
this.opacity = 1;
设置opacity属性可以实现,然后让用一个timer来关闭闪屏和显示主屏。
2.
- set the WindowState to Minimized on the Form properties
- add the Form's Load event handler, in which you hide the form as follow:
private void MainForm_Load(object sender, EventArgs e)
{
Hide();
}
设置 this.WindowState = FormWindowState.Minimized;
在Load事件里直接调用hide();
之后再show出来,麻烦的是,需要用其他函数来激活form。因为它默认不在最上面。
另外要注意一点,直接在界面上设置state(或者在结构化的函数里设置,一样的..),不要在load事件里设置,否则无效。
3.
You could do this.WindowState = WindowState.Minimized, which will minimize the form, but show it in the taskbar. By setting this.ShowInTaskbar to False, you'll get rid of the task, but it can still be gotten to via Alt-Tab.
这个思路不错。设置最小化,然后让菜单栏里面不出现这个form的选项,变相实现隐身。但是,缺点和上面的一样,需要用事件来激活,否则就藏在当前窗口的背后,我以前调用的api...麻烦死,不知道有没有好的方法。
4.
The better way to do this would be to use a void Main() as a startup. Then, you can either just show the TrayIcon, or control what forms are shown.
说实话,这个方法的意思没搞清楚...
相关链接:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=155375&SiteID=1
http://forum.codecall.net/c-programming/1035-hide-form-startup.html
分享到:
相关推荐
VB.NET中实现SplashScreen,设置FrmMain为启动画面,在FrmMain的FormLoad事件中添加SplashScreen的加载和停留事件。
C#实现SplashScreen,不同于VB.NET,需要在MAIN中控制加载界面的顺序。
C#闪屏SplashScreen源代码
C#制作的闪屏,可以设置Splash闪屏窗体的各种设置信息,例如标题,背景图片、窗体大小、渐进模式、前端显示等。
winform 窗体引导画面 等待画面
Android12 SplashScreen使用举例...若开发者未进行SplashScreen的适配工作,在应用冷启动和温启动时,可能会呈现两个启动页先后出现的情况(Android SplashScreen启动页 + Android应用自定义开发的启动页或引导页)。
C#语言编写Android app ,SplashScreen 小Demo
简单的SplashScreen例子
我们在开发应用程序的时候,常常遇到程序启动比较慢,为了提高用户的体验,增加一个闪屏,也就是SplashScreen,这样做的好处有:1、让用户看到加载的过程,提高程序的交互响应;2.可以简短展示或者介绍程序的功能...
鉴于 很多人在寻找 如何做一个带进度条的启动屏,所以特作此例子,供大家参考。因为启动屏和主程序是异步开始的,所以需要用到代理来更新进度条。
c# Splash Screen 源码 c# Splash Screen 源码 c# Splash Screen 源码
VC++2010工程中加入SPLASHSCREEN VC++2010工程中加入SPLASHSCREEN VC++2010工程中加入SPLASHSCREEN
C++ GUI QT 启动画面 SplashScreen 持续3秒
Android SplashScreen Android library for getting a nice and simple SlashScreen into your Android app. Installation Up to now, the library is only available in JitPack. Please add this code to your...
主要介绍了android实现Splash闪屏效果的方法,涉及Android中postDelayed方法及AndroidManifest.xml权限控制的相关使用技巧,需要的朋友可以参考下
SplashScreen-ProgressBar-Horizontal SplashScreen-ProgressBar-Horizontal
NULL 博文链接:https://wang-peng1.iteye.com/blog/656047
android 闪屏 界面 splah demo ,手机软件开机必备demo! update.xml 为部署到tomcat 服务器代码,检测version版本号, 另一部分为splash demo androd 应用程序。
演示如何在软件启动时先显示一个闪屏,其内容可以是等待信息,版权信息或都帮助信息等,也可以用于美化软件
本文实例讲述了Android开发基础之创建启动界面Splash Screen的方法。分享给大家供大家参考。具体如下: 启动界面Splash Screen在应用程序是很常用的,往往在启动界面中显示产品Logo、公司Logo或者开发者信息,如果...