文書番号: 410499
最終更新日: 1999/03/21
Microsoft(R) Windows(TM) Software Development Kit Version 3.1 プログラマーズ リファレンス Vol.2 関数
VERSION 2.00 Begin Form frmSndMsgBox BorderStyle = 1 '固定 (実線) Caption = "サウンド付きメッセージ ボックス" Height = 4230 Left = 975 LinkTopic = "Form1" MaxButton = 0 'False ScaleHeight = 3855 ScaleWidth = 3630 Top = 1230 Width = 3720 Begin CommandButton cmdMsgBox Caption = "デフォルト (&D)" Height = 495 Index = 4 Left = 240 TabIndex = 4 Top = 3120 Width = 3135 End Begin CommandButton cmdMsgBox Caption = "インフォメーション (&I)" Height = 495 Index = 3 Left = 240 TabIndex = 3 Top = 2400 Width = 3135 End Begin CommandButton cmdMsgBox Caption = "注意 (&E)" Height = 495 Index = 2 Left = 240 TabIndex = 2 Top = 1680 Width = 3135 End Begin CommandButton cmdMsgBox Caption = "確認 (&Q)" Height = 495 Index = 1 Left = 240 TabIndex = 1 Top = 960 Width = 3135 End Begin CommandButton cmdMsgBox Caption = "警告 (&S)" Height = 495 Index = 0 Left = 240 TabIndex = 0 Top = 240 Width = 3135 End End Option Explicit ' MsgBox パラメータ Const MB_OK = 0 ' OK ボタンのみ Const MB_ICONSTOP = 16 ' 警告 Const MB_ICONQUESTION = 32 ' 確認 Const MB_ICONEXCLAMATION = 48 ' 注意 Const MB_ICONINFORMATION = 64 ' インフォメーションのアイコン Declare Sub MessageBeep Lib "User" (ByVal wType As Integer) Sub cmdMsgBox_Click (Index As Integer) Select Case Index Case 0 MessageBeep MB_ICONSTOP MsgBox "警告", MB_ICONSTOP, "Sound MsgBox" Case 1 MessageBeep MB_ICONQUESTION MsgBox "確認", MB_ICONQUESTION, "Sound MsgBox" Case 2 MessageBeep MB_ICONEXCLAMATION MsgBox "注意", MB_ICONEXCLAMATION, "Sound MsgBox" Case 3 MessageBeep MB_ICONINFORMATION MsgBox "インフォメーション", MB_ICONINFORMATION, "Sound MsgBox" Case 4 MessageBeep MB_OK MsgBox "デフォルト", MB_OK, "Sound MsgBox" End Select End Sub
Keywords: KBHOWTO KB410499
Technology: kbAudDeveloper kbVBSearch