【菜鸟提问】问个弱弱的问题,如何在运行程序的时候,先出现一个公司的LOGO,在进入登录界面啊? 难不成是将图片贴在FORM上,然后将这个FORM设为入口点么? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不知道.是不是像foxmail的那种啊?至少我不会.不过高手多着呢!up! http://community.csdn.net/Expert/topic/3429/3429153.xml?temp=5.869693E-02主要就是加一个form 问题解决了吗?为何我一加LOGO,程序就会变慢啊? 加FORM是肯定的,入不入口就看你程序的结构了.你可以在那个主界面的LOAD里加一个TIMER的触发事件,在触发事件里去显示那个LOGO窗体,这样的好处是可以设定LOGO显示时间. brucenan999(布鲁斯南),你好,可否贴一段代码让我学习吗?谢谢! 我有一个笨办法,就是你把Logo放在一个窗体中,并将其设置为入口窗体,窗体启动后加入一个Timer,在规定时间之后启动你的主窗体,并将Logo窗体隐藏! 在page——load中加入string wt="Web = window.open('"+Request.ApplicationPath+"/index.aspx"+"','','toolbar=no,menubar=no,titlebar=yes,directories=no,resizable=yes,status=yes,fullscreen=no,top=0;left=0,width=900,height=700');"; Response.Write("<script language=javascript>"); Response.Write(wt); Response.Write("Web.moveTo(0,0);"); Response.Write("Web.resizeTo(screen.availWidth,screen.availHeight);"); Response.Write("window.opener=null;"); Response.Write("window.close();"); Response.Write("</script>"); 我是这样写的:这是FORM2的private System.Timers.Timer timer1; public byte StartTime = 5; private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { StartTime--; if (StartTime == 0) { timer1.Enabled = false; this.Close(); Application.Run(new Form1()); } }可是Application.Run(new Form1());却不能显示FORM1?这是为何啊? 我觉得最简单的是,加个timer事件,延迟主体程序的显示事件,首先显示图片容器. MainForm mainForm;SplashScreenBox splashScreenBox = new SplashScreenBox();try{ // 在这里初始化应用程序! mainForm = new MainForm(mainClass); splashScreenBox.Show(); mainForm.Show(); // 下面这句要不要看你的了,如果你的程序本来启动就很慢,就不要了。 //Thread.Sleep(1000);}catch (Exception ex){ MessageBox.Show("加载错误,请重新安装!" + Environment.NewLine + ex.ToString(), "加载错误"); return;}finally{ if (splashScreenBox != null) { splashScreenBox.Close(); }}if (mainForm != null){ Application.EnableVisualStyles(); Application.Run(mainForm);} private void About_Load(object sender, System.EventArgs e){... this.Opacity = 0.0; this.FadeIn();...} private void FadeIn(){ this.fadeInTimer = new Timer(); this.fadeInTimer.Tick += new EventHandler(this.OnFadeInTimerTick); this.fadeInTimer.Interval = 100; this.fadeInTimer.Enabled = true;}private void OnFadeInTimerTick(object source, EventArgs e){ this.Opacity += .15; if (this.Opacity >= 1.0) { this.fadeInTimer.Enabled = false; this.fadeInTimer.Tick -= new EventHandler(this.OnFadeInTimerTick); this.fadeInTimer.Dispose(); }}找了一些,不过这个是对ABOUT窗体自身的设计,稍微改一下就可以应用到你的上面.主要思想就是在LOAD的时候触发一个TIMER,然后控制它的显示时间,时间一到就DISPOSE掉. 如何在实时视频上绘制图形 LINQ to Entities 不识别方法“ToDateTime(System.String)”,因此该方法无法转换为存储表达 把查询结果生成报表 数组 c#中用listview画表格的问题 客户端暂缓数据操作问题(winformC#) 求北大青鸟《.Net平台和C#编程》习题答案 怎么用vs2005打开exe执行文件------------------->送分,太简单了 【50分】3个C#的问题 时间相减的问题 C# textBox中禁止输入汉字问题. 把所有的dll都打包进一个exe中给客户运行(转)
至少我不会.不过高手多着呢!
up!
主要就是加一个form
你可以在那个主界面的LOAD里加一个TIMER的触发事件,在触发事件里去显示那个LOGO窗体,这样的好处是可以设定LOGO显示时间.
string wt="Web = window.open('"+Request.ApplicationPath+"/index.aspx"+"','','toolbar=no,menubar=no,titlebar=yes,directories=no,resizable=yes,status=yes,fullscreen=no,top=0;left=0,width=900,height=700');";
Response.Write("<script language=javascript>");
Response.Write(wt);
Response.Write("Web.moveTo(0,0);");
Response.Write("Web.resizeTo(screen.availWidth,screen.availHeight);");
Response.Write("window.opener=null;");
Response.Write("window.close();");
Response.Write("</script>");
public byte StartTime = 5;
private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
StartTime--;
if (StartTime == 0)
{
timer1.Enabled = false;
this.Close();
Application.Run(new Form1());
}
}可是Application.Run(new Form1());却不能显示FORM1?这是为何啊?
SplashScreenBox splashScreenBox = new SplashScreenBox();
try
{
// 在这里初始化应用程序!
mainForm = new MainForm(mainClass);
splashScreenBox.Show();
mainForm.Show();
// 下面这句要不要看你的了,如果你的程序本来启动就很慢,就不要了。
//Thread.Sleep(1000);}
catch (Exception ex)
{
MessageBox.Show("加载错误,请重新安装!" + Environment.NewLine + ex.ToString(), "加载错误");
return;
}
finally
{
if (splashScreenBox != null)
{
splashScreenBox.Close();
}
}
if (mainForm != null)
{
Application.EnableVisualStyles();
Application.Run(mainForm);
}
{
...
this.Opacity = 0.0;
this.FadeIn();
...
}
private void FadeIn()
{
this.fadeInTimer = new Timer();
this.fadeInTimer.Tick += new EventHandler(this.OnFadeInTimerTick);
this.fadeInTimer.Interval = 100;
this.fadeInTimer.Enabled = true;
}private void OnFadeInTimerTick(object source, EventArgs e)
{
this.Opacity += .15; if (this.Opacity >= 1.0)
{
this.fadeInTimer.Enabled = false;
this.fadeInTimer.Tick -= new EventHandler(this.OnFadeInTimerTick);
this.fadeInTimer.Dispose();
}
}找了一些,不过这个是对ABOUT窗体自身的设计,稍微改一下就可以应用到你的上面.
主要思想就是在LOAD的时候触发一个TIMER,然后控制它的显示时间,时间一到就DISPOSE掉.