Visual Basic
BASIC Visual Basic BASICBeginner's All purpose Symbolic Instruction Code Visual Basic Windows BASIC BASIC Visual Basic Visual Basic End Sub
.Visual Basic Visual Basic VB 1-1.Visual Basic VB [] [] [] [VisualBasic] EXE 1-2.
Visual Basic VB 1-3.Visual Basic Visual Basic [(F)] [Microsoft Visual Basic (X)]
. Windows Visual Basic 2-1. VB EXE Form1
2-2. 1. 2. 3. 4. 5. 6. 7. ON/OFF 8. 1 9. 10. 1 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. OLE 2-3. Form1 Form [] [] 1 VB
[] [] 2-4. Label Form1 Form1 Label1 Label Caption Caption Caption Visual Basic Font MS P 36 Label Label
2-5 Commond Button Form1 Command1 Private Sub End Sub End Command1 Click Command1_Click End Private Sub End Sub Sub Caption form1 Label1 Caption Private Sub Label1. Caption Caption
TAB ="" 2-5 Form1 Command Button Visual Basic 2-6. [(F)] [(E)] VB.frm [].vbp
2-7. [(F)] [ (0)] (O) 2-8. VB Visual Basic.bas.cls.ctl.ctx.dca.dep.dob.dox.dsr.dsx.frm.frx.log.oca.pag.pgx.res.swt.tlb.vbg.vbl.vbp.vbr.vbw.vbz Visual Basic Visual Basic Visual Basic Visual Basic
VB Click 3-1 Value On/Off On/Off On Click Value Sub Call Sub Misc chk_opt
3-2. BASIC INPUT VB Input Val Str Format Caption BMI (Kg) bmi = 2 (m) Command1_Click Sub Dim h,w.bmi Sub bmi bmi Bmi0 InputboxMsgbox
3-3. Interval (ms) Enabled Enabled = True Enabled = False General sts Dim Form_Load Command1 sts Caption Start/Stop If sts = Not sts Timer1.Enabled = sts If sts Then Command1.Caption = "Stop" sts Else sts sts Command1.Caption = "Start" End If
clock clock If Interval BMI BMI BMI Bmi If bmi < 19 Then Bmi 19 ElseIf bmi >= 19 And bmi < 25 Then 19 bmi 25 bmi 25 Else BMI endif bmi_img gif Picture Strech TrueVisible False BorderStyle 0 Visible True
. BASIC PRINT Show Hide 4-1 Additem Clear For For Text misc for For Next
step 0 Start End TWIPS BASIC PRINT Print Print TWIP 567twip=1cm (0,0) 1440twip=1 X Left,Top Hight,Width (Left,Top) (Height) Width, Height Y twip (Width) CurrentXCurrentY PRINT twip ScaleMode 0,1 0 VbUser 1 twip VbTwips 2 VbPoints 72 3 VbPixels 4 VbCharacters 120 twip()240 twip() 5 VbInches 6 VbMillimeters 7 VbCentimeters
ScaleMode 0,1 ScaleHeightScaleWidthScaleTopScaleLeft ScaleMode 0 ScaleMode 0,1 ScaleHeightScaleWidth Hight,Width ScaleMode 4 5-1.PRINT print Print Print Print AutoRedraw True False False AutoRedraw True Scale Form1 Additem print kuku2
5-2. (LINE CIRCLE ScaleHeightScaleWidthScaleTop ScaleLeft ScaleHeightScaleWidth ScaleTopScaleLeft (ScaleLeft,ScaleTop) (x1,y1) ScaleHeight (x2,y2) ScaleWidth Object.Scale (x1,y1) (x2,y2) Line
Scale Form1 Form_Load line line1,line2 Line1 Line2 line2 Form1 Picture1 Line Picture1.Line (x1,y1) (x2,y2) scale.exe 5-3. PrintForm PrintForm Object.PrintForm Common Dialog A Printer Printer
VB 6-1.Common Dialog ActiveX [(P)][(O)] OK Microsoft Common Dialog Control 6.0
Common Dialog ShowPrinter ShowPrinter FromPage ToPage Copies FromPageToPage 1 ShowPrinter PrintForm PrinForm Private Sub Form_Load() Dim x1, y1, x2, y2, r, rad Dim i As Integer, j As Integer AutoRedraw = True Height = 4000 Width = 4000 Scale (-2000, -2000)-(2000, 2000) r = 2000 rad = 3.1415926 / 180# For i = 0 To 360 Step 30 x1 = r * Cos(rad * i) y1 = r * Sin(rad * i) For j = i To 360 + i Step 30 x2 = r * Cos(rad * j) y2 = r * Sin(rad * j) Line (x1, y1)-(x2, y2) Next Next End Sub Private Sub print_click() Dim p_st, p_end, p_cp, i CommonDialog1.CancelError = True On Error GoTo ErrHandler CommonDialog1.ShowPrinter p_st = CommonDialog1.FromPage p_end = CommonDialog1.ToPage p_cp = CommonDialog1.Copies For i = 1 To p_cp PrintForm Next i Exit Sub ErrHandler: Exit Sub End Sub Private Sub end_click() End End Sub Copies Common Dialog ShowPrinter ShowOpen [] ShowSave [] ShowColor []
ShowFont [] ShowHelp Windows PrintForm [(T)][(M)] (P) (M)
. 8-1.Visul Basic Visual Basic "" 1 ""() " " Text1.Text = "Hi!" ' a b x 2 ( 1 x) ( 1 y)
Dim Dim Dim 1 [As ] [, 2 [ As ]...] Dim x,y x,y Dim a,b As Interger a:,b: DIm message As String 8-2. On Error GoTo On Error Resume Next On Error GoTo 0
Do..Loop While
SubFunction Sub Function Sub Sub CALL Function 1 [As ] [, 2 [As ],...]] Function
8-3. Str() Val() Format(,) IsNumeric() Abs() Atn() Cos() Exp() Fix() Int() Log() Rnd() Sin() Tan() InputBox([, ] [, ] [, X] [, ] [,helpfile, context])) MsgBox([, buttons] [, ] [, helpfile, context]) # 0 0 0 0 (Boolean) Atan Cos e e 0 1 < 0 > 0 = 0 Sin Tan
8-4. HELP(H) (C) (C) ActiveX HELP(H)(I) (B) (N) (W)