TopMost属性无效,帮忙看看是什么问题,谢谢了!
我参考下面的文章写了一个SplashScreen:
http://www.codeproject.com/csharp/PrettyGoodSplashScreen.asp
为了简化问题,我的主要代码如下:
SplashScreen.cs:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
namespace SplashScreen
{
public partial class SplashScreen : Form
{
static SplashScreen ms_frmSplash = null;
static Thread ms_oThread = null;
static public void ShowSplashScreen()
{
// Make sure it is only launched once.
if (ms_frmSplash != null)
return;
ms_oThread = new Thread(new ThreadStart(SplashScreen.ShowForm));
ms_oThread.Start();
}
static private void ShowForm()
{
ms_frmSplash = new SplashScreen();
Application.Run(ms_frmSplash);
}
static public void CloseForm()
{
ms_frmSplash.Close();
}
public SplashScreen()
{
InitializeComponent();
this.ClientSize = this.BackgroundImage.Size;
}
}
}
Program.cs:
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Threading;
namespace SplashScreen
{
static class Pr