Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Timer timer;
public Form1()
{
timer = new Timer();
timer.Interval = 22;
timer.Tick += new EventHandler(timer_Tick);
timer.Start();
}
void timer_Tick(object sender, EventArgs e)
{
textbox1.X++;
}
Timer timer;
public Form1()
{
timer = new Timer();
timer.Interval = 22;
timer.Tick += new EventHandler(timer_Tick);
timer.Start();
}
void timer_Tick(object sender, EventArgs e)
{
textBox1.Location = new Point(textBox1.Location.X+1, textBox1.Location.Y);
if(textBox1.Location.X + textBox1.Width / 2 == Width / 2)
timer.Stop();
}
Public Class Form1
Dim timer As Timer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
timer = New Timer() With {.Interval = 22}
AddHandler timer.Tick, AddressOf timer_Tick
timer.Start()
End Sub
Private Sub timer_Tick(ByVal sender As Object, ByVal e As EventArgs)
TextBox1.Location = New Point(TextBox1.Location.X + 1, TextBox1.Location.Y)
If TextBox1.Location.X + TextBox1.Width / 2 = Width / 2 Then timer.Stop()
End Sub
End Class
Public Class Form1
Dim timer As Timer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
timer = New Timer()
With timer
.Interval = 22
End With
AddHandler timer.Tick, AddressOf timer_Tick
timer.Start()
End Sub
Private Sub timer_Tick(ByVal sender As Object, ByVal e As EventArgs)
TextBox1.Location = New Point(TextBox1.Location.X + 1, TextBox1.Location.Y)
If TextBox1.Location.X + TextBox1.Width / 2 = Width / 2 Then timer.Stop()
End Sub
End Class