Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 Lab3 Check Boxes,Option Buttons Frame Control Frame Control MsgBox, InputBox Functions Day7.

Similar presentations


Presentation on theme: "Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 Lab3 Check Boxes,Option Buttons Frame Control Frame Control MsgBox, InputBox Functions Day7."— Presentation transcript:

1 Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 Lab3 Check Boxes,Option Buttons Frame Control Frame Control MsgBox, InputBox Functions Day7

2 Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 2 Check Box Control A control used to toggle an option On or Off ( Yes/No, T/F….) Properties: Value property: 0 : Deselected 1 : Selected 2 : Option presented in check box is not available Events : Click event : a primary event

3 Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 3 Option Button A control used to permit the selection of one option from several choices Option buttons appears in groups ( two or more) to represent mutually exclusive choices (one button in the group always selected) Option buttons can be grouped by placing them in a frame. Properties: Value : True/False ( Selected/Deselected) When the value is set to True to an option, the value of the other options in the group sets to False. Caption: to specify the text title that appears beside the button

4 Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 4 Frame Control A container for other controls ( option buttons, check boxes,… etc)

5 Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 5 MsgBox() Function A function that produced a message box. Message Box: A small dialog box used for output during a program’s execution.

6 Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 6 Syntax: IntResponse=MsgBox(MsgText[, Style][, MsgBoxTitle]) IntResponse: Integer return value from MsgBox function. See Table 7.2 page 174 MsgBoxTitle MsgText MsgButtons MsgIcon

7 Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 7 MsgBox( )..[CONT] IntResponse=MsgBox(MsgText[, Style][, MsgBoxTitle]) MsgText:String value that display the message box’s message. Style: [MsgButtons] [+ DefaultButton] [+ MsgIcon] MsgButtons: Integer value to determine number of buttons at the MsgBox. See Table 7.1 Page 173 DefaultButton: To Specify the dafault button when the message box first appears. See Table 7.3 page 175 MsgIcon: To specify the icon that appears with the message. See Table 7.4 page 176

8 Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 8 MsgBox( )..[CONT] Example : MsgBox(“EnterStudentName”,4 + 0 +16,”Student Record”) Note: You Can sum 4+ 0 + 16 = 20 VB can evaluate the sum and produce the output

9 Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 9 InputBox( ) Function Syntax: Var = InputBox(MsgText [,MsgBoxTitle][,DefaultVal][,Xpos][,Ypos]) Example: StdName= Inputbox(“Enter your name”, ”Student Record”, “Ali”) A message box with a field, in which the user can type a value.

10 Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 10 Lab Training Questions: Watch the following preview carefully, then design VB projects to perform the required interface. Preview: Lab3-1, Lab3-2, Lab3-3

11 Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 11 Lab3 End


Download ppt "Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 Lab3 Check Boxes,Option Buttons Frame Control Frame Control MsgBox, InputBox Functions Day7."

Similar presentations


Ads by Google