This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module Module1 | |
Sub Main() | |
For i = 0 To 255 | |
Select Case i | |
Case 9 | |
Console.Write("9 : \T") | |
Case 10 | |
Console.Write("10 : \N") | |
Case 13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Class Form1 | |
' Form controls: TextBox TextBox1, Label Label1 | |
Private opt As Integer | |
Private names(9) As String | |
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load | |
names = {"Andrew", "Brian", "Charles", "David", "Edward", "Finn", "George", "Harry", "Ian", "John"} | |
TextBox1.Focus() | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Class Form1 | |
' Form Controls: Button BtnRed, Button BtnAmber, Button BtnGreen, TextBox TbxActor | |
Private Sub BtnRed_Click(sender As System.Object, e As System.EventArgs) Handles BtnRed.Click | |
TbxActor.BackColor = Color.Red | |
TbxActor.Text = "RED" | |
End Sub | |
Private Sub BtnAmber_Click(sender As System.Object, e As System.EventArgs) Handles BtnAmber.Click | |
TbxActor.BackColor = Color.Gold |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Class Form1 | |
' Form controls: Label Label1, TextBox TxtLimit, Button BtnExe, ListBox LstItems, Label LblInfo | |
Dim r As Random | |
Dim l, s, t As Integer | |
Dim z As Date | |
Private Sub BtnExe_Click(sender As System.Object, e As System.EventArgs) Handles BtnExe.Click | |
z = Date.UtcNow() | |
LblInfo.Text = "Running..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Class Form1 | |
' Form Controls: Label Label1, TextBox TextBox1, Button Button1, Button Button2, Label Label2 | |
Private output As Integer | |
Private Sub CalculateProc(n As Integer) | |
output = n * 2 | |
End Sub | |
Private Function CalculateFn(n As Integer) As Integer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Class Form1 | |
' Form Controls: Label LblContext, TextBox TbxInput, Button BtnSubmit | |
Dim _name As String = vbNull | |
Private Sub BtnSubmit_Click(sender As System.Object, e As System.EventArgs) Handles BtnSubmit.Click | |
If TbxInput.Text <> _name Then | |
If TbxInput.Text = "" Then | |
TbxInput.BackColor = Color.Yellow | |
MessageBox.Show("Please enter your name in the provided box", Application.ProductName) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Class Form1 | |
' Form Controls: Button BtnPush, ListBox LstOutput | |
Dim r As Random | |
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load | |
r = New Random() | |
End Sub | |
Private Sub BtnPush_Click(sender As System.Object, e As System.EventArgs) Handles BtnPush.Click |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Class Form1 | |
' Form Controls: TextBox TxtLower, TextBox TxtLimit, Button BtnExe, ListBox LstItems | |
Private Sub BtnExe_Click(sender As System.Object, e As System.EventArgs) Handles BtnExe.Click | |
Try | |
Dim l0 As Integer = CInt(TxtLower.Text) | |
Dim l1 As Integer = CInt(TxtLimit.Text) | |
LstItems.Items.Clear() | |
For i As Integer = l0 To l1 | |
LstItems.Items.Add(i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Class Form1 | |
' Form Controls: Label Label1, TextBox TxtLimit, Button BtnExe, ListBox LstItems, Label LblInfo | |
Dim rand As Random | |
Dim count, coins, flip, tails As Integer | |
Dim result() As String | |
Dim done As Boolean | |
Dim z As Date | |
Dim o As String | |
OlderNewer