'***************************
' MessageBox 消息提示
'***************************
Function MessageBox$(Msg$)
Screen 1,1 :Locate 1,1,0 :Print "注意:"
Screen 1,0 :Locate 1,3,0 :Print Msg$
Screen 1,1 :Locate 3,7,0 :print "是";
Screen 1,0 :Locate 13,7,0 :Print "否"
k$=""
MessageBox$="1"
While k$<>Chr$(27)
k$=Input$(1)
Beep ,,,0
Select k$
Case Chr$(13)
If select%=0 Then
MessageBox$="1"
Exit Function
Else
MessageBox$="0"
Exit Function
End If
Case Chr$(30)
Screen 1,1
Locate 3,7,0 :Print "是";
Screen 1,0
Locate 13,7,0 :Print "否";
MessageBox$="1"
Case Chr$(31)
Screen 1,0
Locate 3,7,0 :Print "是";
Screen 1,1
Locate 13,7,0 :Print "否";
MessageBox$="0"
End Select
Wend
End Function
'*****************************
' main
'*****************************
KEY 30,CHR$(27) 'M1 :ESC键退出键
MAIN:
Cls
Out &H6080,1 '0:standard-size; 1:the small-size
cls
s$=MessageBox$("test the function MessageBox !")
while 1
cls
print "Function is Ok !"
if s$="1" Then
print "是 被选定"
wait 0,1
k$=Input$(1)
s$=MessageBox$("test the function MessageBox !")
Else
print "否 被选定"
wait 0,1
k$=Input$(1)
s$=MessageBox$("test the function MessageBox !")
End If
Wend
ERRCOMM:
Cls
Beep 8
'Print "操作错误:"
'Print
'Print "按任意键退出";
'Wait 0,1
'k$=Input$(1)
End
阅读(1802) | 评论(0) | 转发(0) |