VB工程 百例69 訊息框

2021-08-26 16:34:45 字數 434 閱讀 3121

option explicit

private sub form_click()

dim x as integer

x = msgbox("你單擊的是窗體,是嗎?", 35, "詢問框")

if x = 6 then'若們四個box的函式的返回值是6

msgbox "你選擇了「是」按鈕", vbinformation, "資訊框"

'彈出的選擇「是」的訊息框 注意是的引號是中文的 這是犯錯誤的地方

elseif x = 7 then '同上

msgbox "你選擇了「否」按鈕", vbinformation, "資訊框"

elseif x = 6 then'同上

msgbox "你選擇了「取消」按鈕", vbinformation, "訊息框"

end if

end sub

VB工程 百例69 訊息框

option explicit private sub form click dim x as integer x msgbox 你單擊的是窗體,是嗎?35,詢問框 if x 6 then 若們四個box的函式的返回值是6 msgbox 你選擇了 是 按鈕 vbinformation,資訊框 彈出的...

VB工程 百例64游標位置

option explicit private sub command1 click txt1.text 歡迎來到廊坊師範學院 end sub private sub command2 click txt1.text end sub private sub command3 click endend...

VB工程 百例74 窗體變色

option explicit private sub form mousedown button as integer,shift as integer,x as single,y as single if button 2 then 若單擊滑鼠右鍵 popupmenu mnuformcolor ...