{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

visualbasic6 - n 1 0 6 N 1 $&" $...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: n+1 0 6 N+1 : $% # & ' ( ) !"# . . !,*+ $ http://www.ehsani.org/jooti/ n+1 1 6 ! " $ ,+% $% &$ ' # !% &$ ! () % *+ . - *- %&. " /0 + %$ 2 3 ) %7 ! / %$ 2 3 ( 2" 4& +5 .%7 ! 3 < - =" ( - (( 9: ! ( 2 " ( ! < $ >&: 9 $ ? <) ( ) ( ! %@" .-, ( 9: %A B C *- 7 + ) +D C= &$ ) + G# $ =" E F ( 9: E F 5 &G+ =J JH . - * + < F H ! # $ I * + " ! < $ E F KL $ @ < $ E F < ) * M N @ ( 9: <$E F .=" [email protected]+ O+ ! G-D < )= N ! ! K L = $ ( . ! N ! EH < ! A + C$ ) +D C- ) AF - ( 9: 5 ) & N ! EJ + =G: C, 5 N # ( P- ND Q : )A R *+ . =" C, 5 2+ A + . A- ( 2 " $ $ % & $ ) ! %@" % H A. .% $ " &' !" # $ http://www.ehsani.org/jooti/ n+1 2 C! " S + ! 5 =" I ! %. -) 5 %. -) N ! .= +D 5+ ! P $ ND 5+ TOJ " I - .) 9. $ ! %TOJ " ... U + .I http://www.ehsani.org/jooti/ 6 n+1 3 6 &' ( (OOP1) %! ! ! =" %& $ 2+ N &$ V " .% % - +5 ) ( 2 " ... $ " I 2L I >&: ) %& $ 2+ . F . . A + 7 %@ < * +$ 2+ =" % $ F 2L < W% $ ! =2. N + LO X W% %T L Y+ < .=" )" W9: W% $ < " $ %T L . ( Z [ : I \- E 7 ) % 2L =" I =" " < $ %T LI ] " ) %T L OY+ - %0 + ) G-D & = G... =" " N < $ %T L ] " ) %A . $ $ %T L ] " ) ! # $' G - H Y+ ( G"O!) $ " + 4- ) + " + 4- B>Z %&! W% N 0 . %+ &0 ! =" N - " . ") .. -< .% % - +... =" N M " ) 9 - ND 6 ,- *. : )*+ New Project ! =" $ $ , + ! < (g M h - Q , - < ( M 5 Q ! D E F BJF *+ m+ standard exe 7J + t. @+<$ 9. 5 N [M . ) ? + ActiveX Control ! A(g M = T %+ " =" ( (g M N !) < -) (Figure 1-1) $ + N *- =" ( ) !% $ < ! Q , - Standard Exe 9. New - ) !h < .! >! open &! 1 http://www.ehsani.org/jooti/ Object-Oriented Programming 4 n+1 6 Figure 1-1 Figure 1-2 http://www.ehsani.org/jooti/ n+1 5 0 6 12 2: Hello World 9 I 9 [email protected]: ) . m2L < %A A+h ! $) !( :2-2 Hello World "O! Y+ N+ ! ! M CommandButton Label, < $ ) EA ) 52 )*+ M ! >! E : Private Sub Command1_Click() Label1.Caption = "hello world" End Sub .! >! Command1 ]&! < ND < : ) [M http://www.ehsani.org/jooti/ 7 Command1 < ND !: .$ - „H )! +- n+1 6 ( -!P -† " , + ‡-D 6 *- : + - . . !ˆ = ' ‰ ) < 0 & +% $! 2. X . ) %A =" % + N &$ Caption . =" ND Caption I Label % ‰ ! . * + ( N *- Label .) %H X B m+ 7 ND =" : H +- ) $ . 7(Properties) ‰ (M ! =A>" Label N &$ „ H . +- . H. $ ŠN ND J+ P Caption -& ! 7+ !: Command1 &! N ) - + =" ( .$ Š Hello Word ND 5< . # - ! < ! % @+ + (event) G2+ 4+ N &$ J % - +.)? %@ < ! * + ( 2 " %+ G2+ . *+( 2" P+I A + >! &! <% < >! >! &! < . F ‹ 2 &! =" 5 + Event Handler - < + @Œ %L < $ ! $< [email protected]Œ 5 . ! ! $ ! - ( + - )) • N ! L $ ! 5 >&: ) $+ . 7 + + B" ( A+ +$ Command1 &! < N >! EH + „ H . A+ >! &! < !1 N ) + " 2+ + +%+ Š M E+ 0 "2 . A+ 7 &! < >! )+. A + =F E+ 0 " Š M Event Handler 3 . A + L ND 5 < < +. $ + Š Label N 0 + + )4 ‘ F %+ ‹ 2 &! < $< P <$ D "? A < '> =T !% $ +- E $% click < 7 ( M <„ .! >! http://www.ehsani.org/jooti/ n+1 7 6 . * + : %7 L • ND ! =" ( : +• !„H $ ,+ A<I$ Š Label1 % < caption = L [M ! %+ ( 2 " ’.‘ ) $ R7 $ ND = L % B G2+ [M .=" Label1 ) Caption = L % @+ Label1.Caption : *+5 - !< ! ”Hello world“ < J+ Label1 % ) Caption = L .( : Hello Visual Basic World 5 + $ Š Hello World + . $ C &A+ >! E Label1 < % $ Š +. ˜ M ND N : +! Fš +&! (TextBox) 5 + [email protected]: Label 5 + : &! < N ! >! !$ Š< X ! : . ! Š( - TextBox !% + ( ) &! [?" ! Š TextBox 5 + : N +) . . , Label :5+ Š TextBox 5 + = $ !$ Š < X E7 + . ! Š 9 - Label 5 + ! :% ‰ )% T -9 + ŒJ- %+ % -% . %+ ( N *- % ND < $ + ‘=" (Text)5 + < H TextBox ) % L # C M ND < < A + (Change) Š TextBox 5 + % D ‘ ( +D >? ! =" Œ# ‘ Quake EY+ % $ <) < M .2 1. 2. &$ .0 1. 2. : ( . ! •" M 1. Private Sub Command2_Click() Label1.Caption = Text1.Text End Sub 2. Private Sub Text1_Change() Label1.Caption = Text1.Text End Sub <) .1 @ A :2-3 =" <) & 'ž 2 $ %&! !Q <) 5 7T N+ N+ .=" % : <) %T ! " &- http://www.ehsani.org/jooti/ n+1 8 : ! <$ T + 6 A + Q , - %F 0 +- : +- ¡ . =" 0 ND + - < $ % & $ ! ! AF %&! 7 N G&*# „ H T + ND N ! 9 T+ EH < 5T .=" A# ! :( E A* C, " ) + T + Y+ < %F 0 Q , - 1. ! B" 0N ! 2. ! N ! % & $ 3. $ &$ A# ! < $ C, N ! EH ) [M . A+E + : 1 EH 4! =" ND ) =H %> !5 . A+ 2L 5 %F 0 rnd • . " + 0 Q , - < [M . - P + 0 ž mL C, : !( 2" ) !) N +( 5 int • %F Int(Rnd * 10) + 1 U+ F Label %>L T + L [email protected] 7 B5 -A < (File\new project\ standard exe) !) : (g M ! . ND dblclick )B $ m2L < Private Sub Label1_DblClick() Label1.Caption = Int(Rnd * 10) + 1 End Sub X, $0 ! >! E $ $ , &- ! & !< . [M ‘ ! Q , - %>7 ! ND -< # ! : ND ! :( 7 +- . ? 0 N &$ * + : & +! Fš )B 0 N ! Q , - ) E7 Randomize Timer < 0 # ª H %F 0 ! A + 5 @ Randomize " Q , - ! %F 0 [M .=" " N +) Timer . Q,< A +- < : P =" ?+ ! N +) ª H *+ . * &() * + , A" M >&: ) % G- ) KO : $ Š+« @ +- < T + 5 . A &- Š + « @ 7+ ! %" %T Š+« @ <$ " ) % $ % @+ ! () N !ˆ (7 Š + - . ). D %+ C M < ) OA*+ E&0 4: Š+ ND $ &- & %Œ M > ?+ ! $ Š + &$ & ! P A < (. P + . $ " &$ <„ )" A+« @ Option Explicit http://www.ehsani.org/jooti/ n+1 9 6 Private Sub Label1_DblClick() Randomize Timer … < G*, &$ 9. Requare ! : *+( 2" Dim VarName as VarType X "5 A< Tools\Option < + ! Fš & +. ! Q , - Variable Declaration L Dim " ) Š + N ! « @ < ) : (integer)ž mL h - ) RndNum Š+« @ < Dim RndNum as Integer .=" ( +D + $ , Š+h - = T : -. E ( +&$ „ & H ) + - ) ‰ ( m+ Š + $ J+ ( m+ 5 @ . . Š+ ( m+I ( m+ ND ! =" N E !% $ Š+. %P Š + « @ Em+ 9 # $ ) C $ , . . - *+( •E BJF - * + « @ • ND ( F<$• &$ Š+ Declarations =& (‘ X, - Option Explicit ! %>m+) !« @ 5 .-¯+ ( m+ N ! 5 @ 9 - private public < >! &>! ( 2 " Declarations C, BJF dim < : < >! < $ &>! $ +U . +& Š+ ( m+ Public . - * + .(dim - +) A + m+ F ND Private &0 + A + °2H %>@F J+ Š + ! %- +) + < &0 X A + « @ Declarations C, !% $ Š+. . Š+ F5F 5 ) -*+ IF %@. F E ! % $ Š + .( - P + " 4F H) - * + ) %@ . - • &0 X < &0 X - * + « @ • :( ! ˆ ) !: ) Y+ . - + 5 ) • 5 F 5 Private Sub Command1_Click() Dim x As Integer x=x+1 Label1.Caption = x End Sub Label1.Caption B Private Sub Command1_Click() • &! .! >! . *+( 2L J+ ND ² F C M X Label . (x=x+1) * + %>7 J+ ) * ( N *- 1 0 . " , + ! =" N &$ < Š ‘ *+ # 0 ! >! $ P : +- % . ± H Label &0 N M x Š + End Sub B . - P +) E+ 0 " N" F. http://www.ehsani.org/jooti/ [email protected] ) ! 4! ( :+ &! < ! *+« @ x Š+ %A ND J+ - . * + ( C &. + . *+ ‘ # ! A &) [M ! E T 5 ! < 4F H "+ n+1 10 P + 2L : !: T +- J+ . *+« @ ( ! 5 9P : static 6 Š+ A+ < >! &>! dim >! ... &>! „ H Private Sub Command1_Click() Static x As Integer … . *+ F š „ H A &- < Š ! < 0 !( (9 @+ . ! : =" J# Š+5 + ! P + > ?+ ! static < >! &>! &0 X dim - + static < $ Š + ! 7 ND ³ + $ , &&- 5 ) Š + • ) ± ª 5 .=" F G-D .=" ( ! °2H %>7 J+ • < @ =*.) : $ Š+h Data type Storage size Range Byte 1 byte 0 to 255 Boolean 2 bytes True or False Integer 2 bytes -32,768 to 32,767 Long (long integer) 4 bytes -2,147,483,648 to 2,147,483,647 Single (single-precision floating-point) 4 bytes -3.402823E38 to -1.401298E-45 for negative values; 1.401298E-45 to 3.402823E38 for positive values Double (double-precision floating-point) 8 bytes -1.79769313486232E308 to -4.94065645841247E-324 for negative values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values Currency (scaled integer) 8 bytes -922,337,203,685,477.5808 to 922,337,203,685,477.5807 Decimal 14 bytes +/-79,228,162,514,264,337,593,543,950,335 with no decimal point; +/-7.9228162514264337593543950335 with 28 places to the right of the decimal; smallest non-zero number is +/-0.0000000000000000000000000001 Date 8 bytes January 1, 100 to December 31, 9999 Object 4 bytes Any Object reference String (variable-length) 10 bytes + string length 0 to approximately 2 billion String (fixed-length) Length of string 1 to approximately 65,400 Variant (with numbers) 16 bytes Any numeric value up to the range of a Double Variant (with characters) 22 bytes + string length Same range as for variable-length String : 2 EH http://www.ehsani.org/jooti/ n+1 11 6 N - + - ) %> 4=" 2 ! B C, IC, 5 5 =J JH . 7 &+! ! N # .=" + - C, 5 &G+ ) %> -% !B ! < +- N ! ! =" [A0 . $ &- % &$ A+ !Q A . A+˜M . - + P- =" ! %&! + % !B ! < +: +- % 7) 7: &$ * + ! B ) =7mL % „ &@+ . A+% 7)< F A+U + F +!%H A+ OY+ +! ª" + +- $´ ! !: - + %> & EA < . ! windows media ! ! ! ND = - %+ % ! # player 35 0 ! 123 $.4 ! OY+ ( ! = 0 $ - " ). $ - Š ! 0 .1 (file < +) ˆ# =&" + 5 T ) 9. 5 D exit ! 0 %¶@ = - 7 0 /0 =" 5A&+ ! : ND & . =" . N!) %H X G-D < !B "* N ! « X 2. +N *! ˜ " O0 < 7+ N ! „ &@+. ! $ ,+< F HN ! ! %T H - ND K X &$ N . & +N ! ) #$ !< 9F undo 5! ! " ) 3. &> + 5! ˜ M E F NOF : P + % ) . = - ·&H ! 4. (!5! ˜ M ND ! =" 5 U 4 + %2> ,+ < $ J >" $ !. 4E ! B 5. 4N J >" ª H & +.*- 7 + ! 45G ² FCM + ! . option setting < + +5T Q ! B" ¡ X A < “.( - 7 ( M ) ( "” 6. ! . [M . ! windows < % N!! %+ 7 N„ 5 &$ . ) ?) X, & +- . != J +4F H .7 .( ( !Q,- % &4 # ! 5 D! : 3 EH 0) .9 ( !Q,- !< 0 ! P ! $ %+ . A# ! =" + % , 3 : A + ( 2 " if %X " )< . & < If Text1.Text > RndNum Then Label1.Caption = "random# < " + Text1.Text ElseIf Text1.Text < RndNum Then 2 . http://www.ehsani.org/jooti/ UI (User Interface) 3 n+1 12 Label1.Caption = "random# > " + Text1.Text Else Label1.Caption = "u r winner" End If ) [M ". (ž mL) true 6 if ) @ %JŒ + -)false . -*+ 70 . ) [M B 5 T (=" : then 9 - ND R . .=" ElseIf ! +R " 7! = " if " C, elseif then 5 T ) . * + : else < P+˜ > ND . -*+ : R . . A + º,*+ ND %P F * ¡š "5 N - +A" M C m . „&H . (! J+ ž mL 0 - P# ! ( +D C M . A &- < P ," Š + « @ - + 9 +5 h -E 7 =" G + . ! %+ E 7 ž mL 0 text1.text ! h -E 7 !< + P+ !( 2" %" h -E 7 ) <+ 7 %M ! h - E 7 OA*+ A < .=" žš 5 . * + ) m2L 5 M %A# ! ( M . view\imidiate window . 7B B ND !ˆ " - +( M : !ˆ )" Print 2 + “3” ‘ Œ# "5< %T .=" 5 0 - Print “2” + “3” ž mL 0 A+( 2" CBool(expression) CByte(expression) CDate(expression) CDbl(expression) CDec(expression) CInt(expression) CCur(expression) CSng(expression) CStr(expression) CVar(expression) CLng(expression) N ! •&: < )<$• % @ . * + 23 .=" ( ! ‹ mT $ ) «> ,+ h E 7< boolean h Byte h Date h Double h Decimal h Integer h Currency h Single h String h Variant h Long h - E7 E7 E7 E7 E7 E7 E7 E7 E7 E7 E7 Print Cint(“2”) + “3” . .A !5 ) =" F &H. E F5 7 !7 4 8 9 ...( ... ..."6 G ( A- %H X <) F) $ . ! =" N &$ ! %H X 5+ ! %+ F http://www.ehsani.org/jooti/ n+1 13 6 .=" ( ( ! %H X 5+ ! % ( " F ) 7 ) %> & ! U 4+ 0 7! - +A ( O0 ! $ ,+ F< #! 7! 5 &$ < A !5 $V + I ( ! %H X textbox 5 + N ! ˜ M < (clr) 5 M ˆ# =&" &! . P+N ( G0 ND ! 5 - ! =" R !$+ !% &$ J+ ! $ (cp) &! 5) $ - + I< 0 < $ &! + . - O7 ND < $ : ) 7 < ! $ &! text1.Text = text1.Text + "1" 5 < !5 %!5 . $ A-D ) C ( . $ ! ND 5 -< < G ( %T =" Q >Œ+ ( +D =" - 7T Š ND 0 BJF &! ( X , .= + =" &H A + paste copy I ! ˆ <! ! :! * $ "; cmdKeyboard ND J+ ! M (Name) &! ‰ - ‘= # - 5 + . A &- ² 0 -+ m . $ Š Label1 I Label1.Caption=1 ! .=" P A ) A2 ,*+ I ( ! %H X ! < + .=" ND = L Caption % < G+ &! &$ 5 ( A- ² 0 - . . ! ( Pcommand1 ta 12 G . * + %&. " /0 $ cp &! ! ! " =" G .=" ˜ E 5I $ Š cmdCmpare < º ,* ND h - % H N ! <X <$ - *M ) : ... Label < lbl command < cmd Y+ : =" < 9P+ - < =F " A + ( L Control type prefix Example Check box chk chkReadOnly Combo box, drop-down list box cbo cboEnglish Command button cmd cmdExit Common dialog dlg dlgFileOpen Directory list box dir dirSource Drive list box drv drvTarget File list box fil filSource Form frm frmEntry Frame fra fraLanguage Image img imgIcon http://www.ehsani.org/jooti/ n+1 14 6 ImageList ilsAllIcons Label lbl lblHelpMessage List box lst lstPolicyCodes Menu mnu mnuFileOpen Option button opt optGender Picture box pic picVGA ProgressBar prg prgLoadFile RichTextBox rtf rtfReport StatusBar sta staDateTime Text box txt txtLastName Timer =H - ils tmr tmrAlarm N - %+ G2+ N X , < @ < $ @: + < ND - [?" ND • + .= N ! paste copy $ ! 5 ) %¶@ - . m2L 5 ( & BJF . A.4 -< !% <$ < . : A! ND %>7 ! P !² 0 % !-+ *+< P- General C, .-. &$ % @ - * + D$ G-D %A !# -. !5 < „H. F m+[ !$ G-D D” " $ Š cmdKeyboard $ &! (Name) . $ =7Y+ Q : “‘ ! =" $ !) D $ ,+ .* Object Naming Conventions) MSDN "# $%& " http://www.ehsani.org/jooti/ ' ( # MSDN !4 n+1 15 6 &! [ .! h 2L &! 5+ - + $ & . . + = - G+ -+. !ª • G-D ( P$ !5 (index)[ - = L „ H ) G 7T . I &! 2L I ! $[ A+ . ND caption )[ - T + . ... 3 2 1 $caption $[ ) =" < P 9 # & < $caption . Š $ [ -N + & <$ < A + =" D ! #) % . *+ L Private Sub cmdKeyboard_Click(Index As Integer) End Sub ( F ‹2 [ -(- ! • !< &G2 A-D < NO0 [ - Š+. .( F ‹ 2 ND < : $ &! %$ [M : =" ! =" %T ! &< <! Private Sub cmdKeyboard_Click(Index As Integer) Text1.Text = Text1.Text + cmdKeyboard(Index).Caption End Sub %+ ! Œ- &$ D<$ !‰ <"U ControlName(ControlIndex).Property %F index=1 • 5 A+ >! 2 &! < % .=" .=" 2 ND caption ! * + . 0 OY+ . 0 ) Z <9 # $ &! caption & G. textbox % >P0 $ ,+ - %" F ( 2" )B ) !ª 2. ! Œ-D $ [ - =" : ! Text1.Text = Text1.Text + CStr(Index) !Q,0 BJF <) h < ! ( Q , - %F 0 + - < : ¾m+ A< F ! %- +) 5. + form_load 0Q,R+ < $ %$ J+ < ª" + %>m+ *+ : *+ 4F H .=" T Private Sub Form_Load() Form1.Caption = "Find Number" Text1.Text = "" Randomize Timer RndNum = Int(Rnd * 10) + 1 End Sub 0 =F ( +D %T textbox J+ $) @ A < N >! R + • N J+ ) [M - + . <@ •5 - =" %F ! ! 5 < . ! %F clr &! : =" ) 5+ clr ! >! • . Private Sub Command11_Click() Text1.Text = "" http://www.ehsani.org/jooti/ n+1 16 6 End Sub cp • [M … End If Command11_Click End Sub .$ Š ) C" $ +ž: $+ - 7! <! ! !% J+ ! enter >! N ) ! =" G . A- > 7 ! < . N ! ˜ M ! Esc N ) $ &! ! true ND . ! - default = L $ &! < >! -9 enter >! ! % . *A + %A*+ H true < &! < . cancel = L . * + %F &! 5 %F &! ND < >! %+ ( ) Esc >! % BJF F $ . * + - + cancel &! BJF default &! ‘ #I ‘ A + cancel ! default ! ! $ &! - + & „H KH ND . =" ( - Label1 70 I Label . ! ! <) ND N + BJF . EA*+ ND ± <) ) ! <) $ P =" <) : 0Q,- < ! !< !. ! -+ 9 # &$ ! : ). 7(.=" ( : () + # ! $ hOX !N (R .=" ( () N A+ 5 I ! ˆ 0435 - + < 0 V + ;) ! < : ! M (- )A 0 - + $) $ *+( . P ) N A+ 5 . $ !< D !A < : !< .! + <) $, :( +< : ! 5 + ŠM N )V H -+ ! . P < %$ : !% 1. 2. 3. 4. 5. .1 J+ !˜M( ! % &! 2. .! %T textbox * + J+ E&0 % ! ! < ! 3. J+ ) @ 5T ! ! %- +) ² 0 *. %T textbox A + . !5 @ %F 0 ( m+ ! $ ! N A+ 5 4. . ( N *- ª" + Š M ( m+ ) ± <$V H< http://www.ehsani.org/jooti/ n+1 17 6 # +! 0 ) Z <9 # textbox ! . 5. < 0 < *0 < $ 0). ! EH EA*+ 5 * + error (. >Œ+ - 9 - - * + h 2L ! :% &$ <9 # - &- & ! " - " * &- ! %L N Š ) .0 . 7 ND $ Š %+ # $ . ! Q 5 $ ! & .1 )5 T < J+ ! - enable - % L P + (boolean ‘ *+ # ! J 10 < 0 . 2. ‰ 5 . -9 < " textbox ‰ SelLength Selstart .1-3 % - ! N +) G %&- ( N *- Properties Window V" (run time : N +) P ! =" 5 ") . $ ( J+ I < 0 >! N ) ) E7 . 3-2. . P & !˜M 5+ A ( -+ ‘ JF + ( * + « @ Declaration ! N &$) < " " Š + .4 T + %F 0Q,- B Š %&! textbox . ! EH ! A- < ! 5 ‡&$ ! ! C$ ! ) - + .1-5 < G- A+ ND J+ 0 ! - N ! E 7 ) E7 5-2. (! ! ‡-D ! 7 :Œ &H !< P help IsNumeric• < ") =" [email protected] P !$ Œ ! 7- 0 . (. -9 =" ! š O+ ! U 5 )! A- % : 5 ‡&$ : ( ! 9 $ M ND ) =" G N! Š*+ ! % [M . ! 0) Z - ! .3-5 -<! ( $ + (keypress) *F $ &! ) =" 0 . run time : ( . ! •" M 1. Else Label1.Caption = "u r winner" Text1.Enabled = False Dim i As Integer For i = 0 To 9 cmdKeyboard(i).Enabled = False Next cmdCmpar.Enabled = False End If . 02 false ! true +,http://www.ehsani.org/jooti/ * .,/ 01 5 n+1 18 <) ! %- +) (enabled=true) ( ! [email protected] <) $ ! enable +h !5 6 & < %$ & A + ) ZD ( . 2. Text1.Text = CDbl(Text1.Text) \ 10 ( -& < / ) < *0 J< \ ) ž mL J< J . A + ( 2 " mod ) 3-1. Private Sub cmdCmpar_Click() … End If Text1.SelStart = 0 Text1.SelLength = Len(Text1.Text) End Sub Private Sub cmdKeyboard_Click(Index As Integer) Text1.SelText = cmdKeyboard(Index).Caption End Sub 3-2. Dim cmpred As Boolean Private Sub cmdCmpar_Click() … End If cmpred = True End Sub Private Sub cmdKeyboard_Click(Index As Integer) If cmpred Then Text1.Text = "": cmpred = False … End Sub 4. Int(Rnd * (CDbl(txtEnd.Text) - CDbl(txtbegin.Text))) + CDbl(txtbegin.Text) . 0 E+ BJF $ textbox 5 ! 5-1. Private Sub Form_Load() … Label1.Caption = “LM NOPQ RST UVW LX YZZ[\” End Sub 5-2. Private Sub cmdCmpar_Click() If Not IsNumeric(Text1.Text) Then Label1.Caption = "just integer": Exit Sub End Sub +" &$ + A + EH + runtime error EA*+ ! 5 2L !< 0 < *0 0- + 5-3. Private Sub Text1_KeyPress(KeyAscii As Integer) http://www.ehsani.org/jooti/ !N # .! : ! %&- ( D *+h 7T n+1 19 6 If Not (Chr(KeyAscii) >= 0 And Chr(KeyAscii) <= 9 Or KeyAscii = 8) _ Then KeyAscii = 0 End Sub ! - % =*$ < ! < 7 ! < $ ! ! & : ž š %&! !E 7 ! ! ! 5 N + chr() " . $ %A" x< . ! C +)D immidiate ( M print chr(x) G ). • )± ) @ (text)5 + N Š N # (. $ 0 $ %A" ! + ! < ! ! $ Š %A" ! + . =" keypress 2L 5 !< ! ! $< . * + ( C &( ND 2L %A" ! ' 7- ([ ?" >!) 8 ND %A" ! 9 (à M ! !) -< ! !Â$ !. *+ : ! Q , - º,*+ () < 0& ! < +M 0N )V H # & +- . ! M 0 ND ?+ ! ‘ A+ *BC : 3-3 . ! %+ ( .%A F =" %A F . 5 Q :. & &! IE F V %+ &0 + 2" - " <$ 9 & 7 J +- 5 . N C &- < +: +- ¡ N C &- + J+ .= - )„ < * ¡ < FH % , J >" %P 9 # &$ D 5 F . < textbox < +-+ " N C &- < Image . ACDSee - + < G*+ ! ‰O $ -5 )N !( " Q ! 5 N +) <$ 9 N ! <) N ! AF %0" # X, .=" ¯ +N ) * &$ N ! «*! . ) ? MSDN(help-e VB)). P &<9 # =" ) Q ! % ! (. A- U + F :) 70 ! ( 2 " 5+ ! % $ 9 % h% % ! Image DriveListBox DirListBox FileListBox ListBox imgPreview drvImage dirImage filImage lstHistory ComboBox cboFilter OptionButton CheckBox TextBox optPreview(2) chkPreview txtAddress C &: +<$ = T C &: +<$< ! C &<! : + < G> F C &.( ) O7 ! % G> F = T 5 P• " %" " < <$ - M $E FN ! m+ < ‰ C &- U C 9. ( N *- [A0 E F E+ ! V D C &- http://www.ehsani.org/jo...
View Full Document

{[ snackBarMessage ]}