Professional Documents
Culture Documents
Message Box Using Dcom
Message Box Using Dcom
Message Box Using Dcom
ACTIVE X
Public Enum micon
mquestion = 0
mcancel = 1
minformation = 2
mexclamation = 3
End Enum
mok = 0
mcan = 1
mretry = 2
mignore = 3
End Enum
rok = 0
rcancel = 1
rretry = 2
rignore = 3
End Enum
Select Case n
Case rok:
mymes = "Ok"
Case rcancel:
mymes = "Cancel"
Case rretry:
mymes = "Retry"
Case rignore:
mymes = "Ignore"
End Select
End Function
FORM:
Dim re As mresult
Form1.Caption = tit
Label1.Caption = mes
Picture1(ico).Visible = True
Case mok:
Command1(0).Visible = True
Case mcan:
Command1(0).Visible = True
Command1(1).Visible = True
Case mretry:
Command1(0).Visible = True
Command1(1).Visible = True
Command1(2).Visible = True
Case mignore:
Command1(0).Visible = True
Command1(1).Visible = True
Command1(2).Visible = True
Command1(3).Visible = True
End Select
Form1.Show vbModal
showmes = re
End Function
re = Index
Unload Me
End Sub
STANDARD EXE:
re = u1.mymes(Text1.Text, Text2.Text, Combo1.ListIndex, Combo2.ListIndex)
ACTIVE X CONTROL:
Dim dname As Variant
cmd.ShowOpen
rt.FileName = cmd.FileName
End Function
rt.Text = ""
End Function
Public Function savef() As Variant
cmd.ShowSave
rt.SaveFile cmd.FileName
End Function
cmd.ShowOpen
rt.FileName = cmd.FileName
End Function
Kill dname
End Function
STANDARD EXE:
Dim a As Variant
a = u1.savef
End Sub
a = u1.openf
End Sub
End Sub
a = u1.clearf
End Sub
u1.copyf
End Sub
OUTPUT: