我想在我的WPF应用程序中创建一个与Windows窗体中的菜单栏相同的菜单栏.
我该怎么做?
WPF控件工具箱中的菜单选项仅提供空白栏.
我最近在我的WPF应用程序中添加了一个启动画面.我的应用程序加载速度非常快,因此屏幕只有毫秒.我会如何延长启动画面的时间.我希望它是两秒钟.
我试图看看IIS是否已安装,如果未安装IIS,则显示消息和下载exe到INstall IIS.但是,如果我没有在vb脚本中指定完整路径,那么我很难运行文件.路径将是动态的,无法指定除"%cd%"之外的任何其他目录
我的代码:
If WScript.Arguments.length =0 Then
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "wscript.exe", Chr(34) & _
WScript.ScriptFullName & Chr(34) & " uac", "", "runas", 1
Else
Dim intCounter, strSubkey
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft"
objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
intCounter=0
For Each subkey In arrSubKeys
If subkey="InetStp" Then
intCounter=1 or strSubkey=subkey
End If
Next
currentDirectory = left(WScript.ScriptFullName, Len(WScript.ScriptFullName))-(len(WScript.ScriptName)))
if intCounter=0 then
Set WSHShell = CreateObject("Wscript.Shell")
WSHShell.Run ("\currentDirectory\noiisinstalled.exe")
Elseif intCounter=1 …Run Code Online (Sandbox Code Playgroud)