我实现了Installer类 自定义了界面 界面安装的时候也出来了
但是很奇怪
[RunInstaller(true)]
public class Installer1:System.Configuration.Install.Installer
{
string path;
public override void Install(IDictionary stateSaver)
{
path=this.Context.Parameters["targetdir"];
base.Install(stateSaver);
}
protected override void OnAfterInstall(IDictionary savedState)
{
Form1 fm1 = new Form1(path);
//这里弹出了一个模式窗体
fm1.ShowDialog();
base.OnAfterInstall(savedState);
}
}
在Form1里面有个文件夹选择
private void button3_Click(object sender, EventArgs e) {
FolderBrowserDialog digFolderBrowser = new FolderBrowserDialog();
try {
//在这里弹出卡住了 也不报错,就在那卡着
digFolderBrowser.ShowDialog();
}catch (Exception ex) {
MessageBox.Show("出错了");
}
MessageBox.Show("3");
}
有 知道这是为什么吗? 希望指点一下 谢谢