Uroci.net - !
Adobe Photoshop Adobe Illustrator Adobe Flash Adobe Fireworks DreamWeaver CSS HTML Corel Draw Image Ready PHP SEO CMS Microsoft Windows Microsoft Word Microsoft Excel PowerPoint Microsoft Access Microsoft Publisher Linux Visual basic
JavaScript Ajax 3ds Max Maya 3D C++ Sound Forge Gimp SWiSH

bubust   :    : 1911



Case , :

Select Case intTest

Case 1 To 5, 10 To 15, 21

'

End Select

:

Select Case strTest

Case "esh1", "esh2"

msgbox("Found esh 1 or 2")

Case "esh3"

msgbox("Found esh 3")

End Select


Select Case . Select Case End Select.

Exit Select. End Select.

: "Between 6 and 8".

Dim Number As Integer = 8

' ...

Select Number   ' Evaluate Number.

 Case 1 To 5   ' Number between 1 and 5, inclusive.

 Debug.WriteLine("Between 1 and 5")

 ' The following is the only Case clause that evaluates to True.

 Case 6, 7, 8   ' Number between 6 and 8.

 Debug.WriteLine("Between 6 and 8")

 Case 9 To 10   ' Number is 9 or 10.

 Debug.WriteLine("Greater than 8")

 Case Else ' Other values.

 Debug.WriteLine("Not between 1 and 10")

End Select



, .
While , False. , True. , .
Do While. (condition) , True (statements) .
Do Until True, Do While False.
, 5 - 100:

Dim val As Integer = 0

Do While val < 100

Val = val + 5

Loop
While False. 5 , 10 , . While Exit Do:
Dim val As Integer = 0

Dim count As Integer = 0

Do While val < 100

val = val + 5

count = count + 1

If count >= 10 Then

Exit Do

End If

Loop

While : val - 100 count - 10. Exit Do :

Dim val As Integer = 0

Dim count As Integer = 0

Do While val < 100 And count < 10

val = val + 5

count = count + 1

Loop

, val 100, . , While:

Dim val As Integer = 0

Dim count As Integer = 0

val = val + 5

count = count + 1

Loop Until val > 100 And count >= 10


Do...Loop 10 , False, Exit Do. , Check.
Dim Check As Boolean = True

Dim Counter As Integer = 0

Do ' Outer loop.

 Do While Counter < 20   ' Inner loop.

 Counter += 1   ' Increment Counter.

 If Counter = 10 Then   ' If condition is True,

 Check = False   ' Set value of flag to False.

 Exit Do ' Exit inner loop.

 End If

 Loop
Loop Until Check = False   ' Exit outer loop immediately.




True.
Dim Counter As Integer = 0 

While Counter < 20   ' Test value of Counter. 

 Counter += 1   ' Increment Counter. 

End While ' End While loop when Counter > 19.

 Debug.WriteLine (Counter)   ' Prints 20 in the Output window.

For... Next (counter) e , , . start. , end. Step . , 1. step , . - end. , For 10 , Val 5:
Dim I As Integer

Dim val As Integer = 0

For i = 1 To 10

Val = val + 5

Next

, val 50, i 11.

For For...Each...Next. . :

For Each element In group

[ statements ]

[ Exit For ]

[ statements ]

Next [ element ]

E (element) (item) .

group .:

Dim objItem, MyCollection As Object

For Each objItem In MyCollection ' Iterate through items.

If objItem.val = 5 Then

Exit For ' .

End If

Next

Exit For.

For...Next . counter. :
For I As Integer = 1 To 10

 For J As Integer = 1 To 10

 For K As Integer = 1 To 10

 '     I, J,  K.

 Next K

 Next J

Next I

Dim Words, Digit As Integer

Dim MyString As String

For Words = 10 To 1 Step -1    ' 10 .

 For Digit = 0 To 9   ' 10 .

 MyString = MyString & CStr(Digit)   '    .

 Next Digit   '  .

 MyString = MyString & " "   '   .

Next Words

Dim Found As Boolean = False

Dim MyCollection As New Collection

For Each MyObject As Object In MyCollection   '   .

 If CStr(MyObject.Text) = "Hello" Then   '  Text   "Hello"

 Found = True   ' Found    True.

 Exit For '  .

 End If

Next



With...End With

Dim AlertLabel As New System.Windows.Forms.Label

 ' ...

Sub AlertUser(ByVal Value As Long)

 With AlertLabel

 If Value = 0 Then

 .ForeColor = Color.Red

 .Font = New Font(.Font, FontStyle.Bold Or FontStyle.Italic)

 Else

 .Forecolor = Color.Black

 .Font = New Font(.Font, FontStyle.Regular)

 End If

 End With
End Sub


With...End With.
Sub MyInput()

 With Workbooks("Book1").Worksheets("Sheet1").Cells(1, 1)

 .Formula = "=SQRT(50)"

 With .Font

 .Name = "Arial"

 .Bold = True

 .Size = 8

 End With
 End With
End Sub

With MyLabel

 .Height = 2000

 .Width = 2000

 .Text = "This is MyLabel"

End With

With MyObject

 .Height = 100   '   MyObject.Height = 100.

 .Text = "Hello World"   '  MyObject.Text = "Hello World".

 .ForeColor = Color.Green   '  MyObject.ForeColor = Color.Green.

 .Font = New Font(.Font, FontStyle.Bold)   ' :

' MyObject.Font = New Font(MyObject.Font, FontStyle.Bold).


End With.


: «1 2 3 4

,


© . 2006-2008. Created by: Site.bg
: IT | | . | Paparak.bg | | uchenik.com | TRAVEL | | AmAm.bg | . | | AnimeS-bg.com | | | | IT Light | Spodeli.net | - | IDG.BG | Teenproblem.net | - | Fresh-BG.com | Hanovete.com | Bulfleet.com | Mythlands.com | Ohoboho.com | .Com | News24 | Setcom.bg | Atol.bg | Elmaz.com | MobileBulgaria.com