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(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load | |
Label1.Text = 0 | |
Button1.Text = "START" | |
Button2.Text = "RESET" | |
Timer1.Enabled = False | |
Timer1.Interval = 100 | |
End Sub | |
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick | |
Label1.Text = Label1.Text + 1 |
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(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load | |
Timer1.Interval = 100 | |
End Sub | |
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click | |
ProgressBar1.Value = 0 | |
Timer1.Start() | |
Button1.Enabled = False | |
End Sub | |
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick |
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(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click | |
ListBox1.Items.Add(TextBox1.Text) | |
TextBox1.Text = "" | |
End Sub | |
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click | |
ListBox1.Items.Remove(ListBox1.SelectedItem) | |
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 | |
Dim TR As System.IO.TextReader | |
Dim TW As System.IO.TextWriter | |
Dim FileName As String = "C:\MyTextFile.txt" | |
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click | |
TW = System.IO.File.CreateText(FileName) | |
TW.Close() | |
End Sub | |
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click | |
TW = System.IO.File.AppendText(FileName) |
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
Imports Excel = Microsoft.Office.Interop.Excel | |
Public Class Form1 | |
Dim ExcelApp As Excel.Application | |
Dim ExcelBook As Excel.Workbook | |
Dim ExcelSheet As Excel.Worksheet | |
Dim ExcelRange As Excel.Range | |
Dim MisValue As Object = System.Reflection.Missing.Value | |
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click | |
ExcelApp = New Excel.Application |
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 | |
Dim TR As System.IO.TextReader | |
Dim TW As System.IO.TextWriter | |
Dim FileName As String = "C:\password.txt" | |
Dim temp As String | |
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load | |
If System.IO.File.Exists(FileName) = False Then | |
TW = System.IO.File.CreateText(FileName) | |
TW.Write("admin" & " " & "123456") | |
TW.Close() |
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 | |
Dim x As Integer = 0 | |
Dim array(100) As Integer | |
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load | |
Button1.Text = "Start" | |
NumericUpDown1.Minimum = 1 | |
NumericUpDown1.Maximum = 100 | |
Chart1.Series.Clear() | |
Chart1.Series.Add("A") | |
Chart1.ChartAreas("ChartArea1").AxisX.Minimum = 0 |
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 | |
Dim Rx(20) As Byte | |
Dim ADC As Integer | |
Dim i As Integer | |
Dim j As Integer | |
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load | |
SerialPort1.PortName = "COM4" | |
SerialPort1.BaudRate = 9600 | |
SerialPort1.Parity = IO.Ports.Parity.None | |
SerialPort1.StopBits = IO.Ports.StopBits.One |
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(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load | |
Button1.Text = "Connect" | |
HScrollBar1.Enabled = False | |
HScrollBar1.Minimum = 0 | |
HScrollBar1.Maximum = 189 | |
Timer1.Interval = 100 | |
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
/* | |
Project: Sensor DHT22 Lesson | |
Programmer: Shahrulnizam Mat Rejab | |
Board: Arduino Uno | |
Last Modified: 7 March 2019 | |
Website: http://shahrulnizam.com | |
*/ | |
#define INTERVAL 500 |