.


:




:

































 

 

 

 





. . , , . . Visual Basic 6.0.

Visual Basic 6.0 12 , . , 1

 

1

Visual Basic 6.0

(Byte) () 1 0 255
(Integer) % 2 -32 768 32 767
(Long) & 4 -2 147 483 648 2 147 483 647
(Boolean) () 2 True False
(Single) ! 4 -3,40282338 -1,401298E-45 . 1,401298E-45 3,40282338 .
(Double) # 8 -1,79769313308 -4,94065645E-324 . 4,94065645E-324 1,79769313308 .
(Currency) @   8 -922 337 203 685 477,5808 922 337 203 685 477,5807
(Decimal) () 16 : - 79 228 162 514 264 337 593 543 950 335 79 228 162 514 264 337 593 543 950 334. ( 28 ): 0,000000000000 000000000000001 79,228162514264
(Date) () 8 : 1 100 . 31 9999 . : 00:00:00 23:59:59
(String) $ 1 : 2 . : 65 400
(Variant) () 16 + 1 /
(Object) () 4 , OLE

, , . , , , .

( ) .

 

Dim Massiv(1 To 10) As String , :

Index .

(1 To 10) ( ).

String .

 

, , . , , , , .

 

Dim Massiv(1 To 10, 1 To 20) As String , :

(1 To 10, 1 To 20) , .

 

.

 

For Index = 1 To 10 Step 1 , :

Index .

1 To 10 .

Step 1 .

 

, .

( 2.1, . 7-8) ( 3, . 15).

 

, ( 2.1) ( 2.2) ChkTxt.

ChkTxt, , . , 2

2

: : :
,

 

: Text1 Label1. : Microsoft Sans Serif, 11. (Private Sub) Change Text1 ( 6.1), ( ). , Text1. . txt, , , . .

, . , .

 

Change Text1 . 5

5 Change Text1.

 

 

If. :

LCase$( txt ) Like "*[a-z]*" , , :

 

LCase$( txt ) txt. , .

Like . .

"*[a-z]*" . . , . "*[-]*" . , ASCII . (*) . , txt.

Label1 :

 

Label1.ForeColor = &H8000& ( RGB)

Label1.FontSize = 11 ( )

 

(ForeColor) RGB, : , :

 

Label1.ForeColor = &H <> <> <> &

 

, . (FontSize) . , , (. 14, . 5) ( 6.1).

 

( ) , , .

 

1. . ., . . , , 2014 .

2. . ., . . Visual Basic ,

-, 2010 .

3. . . Visual Basic 6.0,

, 2002 .

 

()

Private Sub Text1_Change() Text1

 

Dim txt As String

Let txt =

txt = CStr( Text1.Text )

Label1.Caption = txt

If LCase$( txt ) Like "*[a-z]*" Then ,

If LCase$( txt ) Like "*[-]*" Then

Label1.ForeColor = &H8000&

Label1.FontSize = 11

Else

Label1.ForeColor = &HFF0000

Label1.FontSize = 11

End If

ElseIf LCase$( txt ) Like "*[-]*" Then

Label1.ForeColor = &HFF

Label1.FontSize = 14

Else

Label1.ForeColor = &H0

Label1.FontSize = 11

End If

 

End Sub

(. 6 . 7):

 

 

6 ChkTxt, :

A Text1,

B Label1,

 

7

 

 





:


: 2017-03-12; !; : 1145 |


:

:

.
==> ...

2002 - | 1753 -


© 2015-2024 lektsii.org - -

: 0.022 .