|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TUTORIAL 1 OVERVIEW Lesson 3 Lesson 4 Lesson 5 CHECKPOINT 1 EXTRA INFO
|
Message boxes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MsgBox VariableName=MsgBox(“Prompt”, Style , “Title”, )
We can use named constant in place of integers for the second argument to make the programs more readable. In fact, VB6 will automatically shows up a list of names constant where you can select one of them. VariableName=MsgBox( "Click OK to Proceed", 1, "Startup Menu") is the same as VariableName=Msg("Click OK to Proceed". vbOkCancel, "Startup Menu") VariableName is a variable that holds values that are returned by the MsgBox ( ) function. The values are determined by the type of buttons being clicked by the users. It has to be declared as Integer or Byte data type. The table below shows the values, returned by each of the buttons. Return Values
To make the message box looks more sophisticated, you can add an icon besides the message. There are four types of icons available in VB as shown below. These commands are added to the style of message box with a + symbol. You can use either the number of the name.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||