如何创建样机 Windows XP 警报框?

Hay*_*yek 1 windows alert

我们需要为我们的客户端创建一个样机 Windows XP 警报框。

在此处输入图片说明

什么是最简单的方法来做到这一点?我们的设计师尝试通过 Photoshop 创建它,但无法使字体看起来真实。

如果 Photoshop 不是答案,是否还有另一种方法来创建带有我们自己的标题和消息的模型框?

Kez*_*Kez 10

我认为使用 VBScript 是一种简单的方法。

使用记事本创建一个alertbox.vbs在桌面上调用的文件并将其添加到其中:

MsgBox "Unable to read disk, " & vbcrlf & "do you want to retry?", 18, "Disk error."
Run Code Online (Sandbox Code Playgroud)

更改开头的错误信息和结尾的标题。确保错误消息和标题都用引号括起来。

使用下表并将所有数字相加以显示弹出窗口中的各种按钮和图标。在此示例中,18“2 = 显示中止、重试和忽略按钮”的组合“16 = 显示重要消息图标。” 从下表中。

" & vbcrlf & "如果您希望弹出窗口中的文本多于一行,该位会创建一个新行。

只需双击桌面上的文件即可显示弹出窗口。

从上面的例子:

在此处输入图片说明

Constant               Value     Description
vbOKOnly               0         Displays OK button only.
vbOKCancel             1         Displays OK and Cancel buttons.
vbAbortRetryIgnore     2         Displays Abort, Retry, and Ignore buttons.
vbYesNoCancel          3         Displays Yes, No, and Cancel buttons.
vbYesNo                4         Displays Yes and No buttons.
vbRetryCancel          5         Displays Retry and Cancel buttons.
vbCritical             16        Displays Critical Message icon. 
vbQuestion             32        Displays Warning Query icon.
vbExclamation          48        Displays Warning Message icon.
vbInformation          64        Displays Information Message icon.
vbDefaultButton1       0         First button is default.
vbDefaultButton2       256       Second button is default.
vbDefaultButton3       512       Third button is default.
vbDefaultButton4       768       Fourth button is default.
vbApplicationModal     0         Application modal; the user must respond to the message box before continuing work in the current application.
vbSystemModal          4096      System modal; all applications are suspended until the user responds to the message box.
vbMsgBoxHelpButton     16384     Add Help button to the message box.
VbMsgBoxSetForeground  65536     Specify the message box window as the foreground window.
vbMsgBoxRight          524288    Text is right aligned.
vbMsgBoxRtlReading     1048576   Specify that text should appear as right-to-left reading on Hebrew and Arabic systems.
Run Code Online (Sandbox Code Playgroud)