我想制作带有进度条和richtextbox的计时器。 如果%,则打印加载信息。
我有:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If MephProgressBar2.Value = 15 Then RichTextBox1.Text = RichTextBox1.Text & "Loading jakiśtam2.dll..." & vbCrLf
If MephProgressBar2.Value = 25 Then RichTextBox1.Text = RichTextBox1.Text & "Loading jakiśtam4.dll..." & vbCrLf
If MephProgressBar2.Value = 45 Then RichTextBox1.Text = RichTextBox1.Text & "Loading 7567567..." & vbCrLf
If MephProgressBar2.Value = 55 Then RichTextBox1.Text = RichTextBox1.Text & "Loading Lollol.dll..." & vbCrLf
If MephProgressBar2.Value = 80 Then RichTextBox1.Text = RichTextBox1.Text & "Można wpisywać co się chce" & vbCrLf
If MephProgressBar2.Value = 86 Then RichTextBox1.Text = RichTextBox1.Text & "BlaBlabla" & vbCrLf
If MephProgressBar2.Value = 95 Then RichTextBox1.Text = RichTextBox1.Text & "Make-cash.pl" & vbCrLf
End Sub
但它没有用。我得到了错误: 预期结束。
这是我的代码:
Public Class Form1
Private Sub MephProgressBar2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MephProgressBar2.Click
End Sub
Private Sub MephButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MephButton1.Click
Timer1.Start()
End Sub
Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If MephProgressBar2.Value = 15 Then RichTextBox1.Text = RichTextBox1.Text & "Loading jakiśtam2.dll..." & vbCrLf
If MephProgressBar2.Value = 25 Then RichTextBox1.Text = RichTextBox1.Text & "Loading jakiśtam4.dll..." & vbCrLf
If MephProgressBar2.Value = 45 Then RichTextBox1.Text = RichTextBox1.Text & "Loading 7567567..." & vbCrLf
If MephProgressBar2.Value = 55 Then RichTextBox1.Text = RichTextBox1.Text & "Loading Lollol.dll..." & vbCrLf
If MephProgressBar2.Value = 80 Then RichTextBox1.Text = RichTextBox1.Text & "Można wpisywać co się chce" & vbCrLf
If MephProgressBar2.Value = 86 Then RichTextBox1.Text = RichTextBox1.Text & "BlaBlabla" & vbCrLf
If MephProgressBar2.Value = 95 Then RichTextBox1.Text = RichTextBox1.Text & "Make-cash.pl" & vbCrLf
End Sub
End Class
请帮忙,我是vb的新手