Last active
November 11, 2018 11:19
-
-
Save canokay/8ca81b09615854de76982cf39b24385f to your computer and use it in GitHub Desktop.
Visual Basic Variable Examples
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 | |
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click | |
Dim say1, say2, say3 As Integer | |
say1 = Val(TextBox1.Text) | |
say2 = Val(TextBox2.Text) | |
say3 = say1 + say2 | |
TextBox3.Text = say3 | |
TextBox3.Show() | |
Label3.Show() | |
End Sub | |
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load | |
TextBox3.Hide() | |
Label3.Hide() | |
End Sub | |
End Class |
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 | |
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click | |
Dim say1, say2, say3 As Single | |
say1 = CSng(TextBox1.Text) | |
say2 = CSng(TextBox2.Text) | |
say3 = say1 + say2 | |
TextBox3.Text = say3 | |
TextBox3.Show() | |
Label3.Show() | |
End Sub | |
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load | |
TextBox3.Hide() | |
Label3.Hide() | |
End Sub | |
End Class |
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 | |
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click | |
MsgBox("Can Okay") | |
End Sub | |
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click | |
MsgBox("Can Okay, Tarih ve Saat= " & Now) | |
End Sub | |
End Class |
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 | |
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load | |
End Sub | |
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click | |
TextBox1.Text = "Can Okay" | |
End Sub | |
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click | |
Dim A As String | |
A = "can okay" | |
TextBox1.Text = A | |
End Sub | |
End Class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment