Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 By Dr. HANY ELSALAMONY. 1. What are differences between interpreted and compiled languages? 2. What are the programming steps to creating the Visual.

Similar presentations


Presentation on theme: "1 By Dr. HANY ELSALAMONY. 1. What are differences between interpreted and compiled languages? 2. What are the programming steps to creating the Visual."— Presentation transcript:

1 1 By Dr. HANY ELSALAMONY

2 1. What are differences between interpreted and compiled languages? 2. What are the programming steps to creating the Visual Basic projects? 3. Compare between:  Class Library Template  Console Application Template  WPF Application 2 By Dr. HANY ELSALAMONY

3 4. What are the differences between: Alignment, BackColor, ForeColor, Caption, and Font. 5. Show the differences between: Modules, procedures, syntax 6. Correct the wrong statement in the following code: 3 Private Command1_Click() MsBox "Hello, World! Sub Private Command1_Click() MsBox "Hello, World! Sub By Dr. HANY ELSALAMONY

4 7. Correct the wrong statement in the following code: 4 Private Form_Load() Dm a Integer Dm b As Integer Dm c As Integer a = 3 b = 5 c = a * b MsgBx b End Sub Private Form_Load() Dm a Integer Dm b As Integer Dm c As Integer a = 3 b = 5 c = a * b MsgBx b End Sub By Dr. HANY ELSALAMONY

5 8. There are three steps to using a variable: a)…………….. b)………………. c)…………….. 9. What are the conditions to naming variables? Give examples. 10. What are the differences with examples between the variables: Integer, Double, String, Boolean, array. 5 By Dr. HANY ELSALAMONY

6 11. What is the string? And what is meaning of concatenation? Give examples. 12. In the declaration of an array (Dim Department(6) As String), the index goes from: [0:6, 1:6, 0:5] 13. In visual basic there exist a date/time functions such that: [TimeSerial, CStr, FormatPercent]. 14. In visual basic there exist a math functions such that: [CStr, Hex FormatPercent]. 6 By Dr. HANY ELSALAMONY

7 15. In visual basic there exist a array functions such that: [TimeSerial, CStr, Split]. 16. In visual basic there exist a string functions such that: [TimeSerial, UCase, FormatPercent]. 17. What are the following functions doing in VB? a) InStr b) Atn c) CStr d) CDbl 7 By Dr. HANY ELSALAMONY

8 18. Convert the following formulas to visual basic equivalents: i) ii) iii) iv) 19. What is the difference between a conditional operator and a logical operator? 8 By Dr. HANY ELSALAMONY

9 20. What is the work of (If…Else) statement? and what about using of (nested If)? Give examples. 21. what is the main deference in using (If) and (Select case) statements? Give examples. 22. Give examples for using (Select case), (Case Else), and (Case to). 23. What is a loop? 9 By Dr. HANY ELSALAMONY

10 24. True/False. Both blocks of an If...Else might execute. 25. True/False. A (For) loop counts up if the (Step) value is positive. 26. True/False. A (For) loop counts down if the (Step) value is negative. 27. True/False. In (For) loop, If you use a negative (Step) value, the (intStart) value must be more than the (intEnd) value. 10 By Dr. HANY ELSALAMONY

11 28. What is the main difference between (Do) and (For) loops? 29. What is work of (For) loop? 30. What is meaning of (intCounter), and (intEnd)? 31. Match the following: 11 By Dr. HANY ELSALAMONY

12 1-vbLPCustomSmall system icon as defined by your video resolution. 2-vbLPLargeLarge system icon as defined by your video resolution. 3-vbLPLargeShellDetermined by the Control Panel’s Display Settings page. Click the Appearance tab to see the caption button size to locate the size of images you change with this varSize value. 4-vbLPSmallShellDetermined by the Control Panel’s Display Settings page. Click the Appearance tab to see the icon size to locate the size of images you change with this varSize value. 5-vbLPSmallThe varX and varY arguments determine the size. 12 By Dr. HANY ELSALAMONY

13 32. Match the following: 1- vbLPVGAColorBest match 2- vbLPColor2 colors 3- vbLPDefault16 colors 4- vbLPMonochrome256 colors 13 By Dr. HANY ELSALAMONY

14 33. What are the differences between: a) BorderColor b) BorderStyle c) BorderWidth 34. What is the meaning of: a) PSet b) sngAspect c) sngRadius 35. The toolbox includes these two drawing tools: a)………………. b)…………………….. 14 By Dr. HANY ELSALAMONY

15 36. Correct the wrong statement in the following code: By Dr. HANY ELSALAMONY 15 Command3_Click( Division Duble Division = Val(Text1.Text) / Val(Text2 Text) 'To display the answer on label 3 Label Caption = Division End Sub Command3_Click( Division Duble Division = Val(Text1.Text) / Val(Text2 Text) 'To display the answer on label 3 Label Caption = Division End Sub

16 37. Correct the wrong statement in the following code: By Dr. HANY ELSALAMONY 16 Privat Sub Comand1_Click( Di var1 Integr var1 = 5 If var1 = 10 MgBox "The variable is ten Els MsgBox "The variable is not ten" End Sub Privat Sub Comand1_Click( Di var1 Integr var1 = 5 If var1 = 10 MgBox "The variable is ten Els MsgBox "The variable is not ten" End Sub

17 38. What is the main difference between picture box and image controls? 39. Correct the wrong statement in the following code: By Dr. HANY ELSALAMONY 17 For intCtr = 1 as 20 frmBoxes.Lin (intStartX, intStartY)-(intLastX, intLastY B intStartX = intStartX + 400 intStartY = intStartY + 400 intLastX = intLastX + 400 intLastY = intLastY + 400 Next For intCtr = 1 as 20 frmBoxes.Lin (intStartX, intStartY)-(intLastX, intLastY B intStartX = intStartX + 400 intStartY = intStartY + 400 intLastX = intLastX + 400 intLastY = intLastY + 400 Next

18 40. Correct the wrong statement in the following code: By Dr. HANY ELSALAMONY 18 Private Sub Frm_Load( mmcVideo Command = “Open mmcVideo hWndDisplay = picVido. Wnd End Sub Private Sub Frm_Load( mmcVideo Command = “Open mmcVideo hWndDisplay = picVido. Wnd End Sub


Download ppt "1 By Dr. HANY ELSALAMONY. 1. What are differences between interpreted and compiled languages? 2. What are the programming steps to creating the Visual."

Similar presentations


Ads by Google