2016-06-25 3 views
-5

나는 시각적 인 기초를 위해이 코드 조각에 의해 정말로 짜증이났다 당신을 도울 수있다. 나는 YouTube 및 기타 모든 곳의 VB 웹 사이트에서 보았습니다! 누군가가 나를 도울 수 있다면 정말 고마워요왜이 시각적 기본 스크립트가 작동하지 않습니까?

Public Class Form1 
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click 
    MessageBox.Show("Hi!!") 
    Timer1.Start() 

End Sub 

Private Sub ProgressBar1_Click(sender As Object, e As EventArgs) Handles ProgressBar1.Click 
End Sub 

Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick 
    ProgressBar1.Increment(1) 
    If ProgressBar1.Value = 100 Then 
     Timer1.Stop() 
     MsgBox("Jeff") 

    End If 
End Sub 

Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) 
End Sub 


Private Function GetNumericUpDown1(v As Integer) As Boolean 
End Function 

Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged 
    If (: () Then 
     MessageBox.Show("Well Done!") 


    End If 
End Sub 



Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click 
    MessageBox.Show("!!Stopped!!") 
    Timer2.Stop() 

End Sub 

Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick 
    ProgressBar2.Increment(0.6) 
    If ProgressBar2.Value = 100 Then 
     Timer2.Stop() 
     MsgBox("Jeff") 

    End If 
End Sub 


Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click 
    MessageBox.Show("!!Started!!") 
    Timer2.Start() 

End Sub 

Private Sub SplitContainer1_Panel1_Paint(sender As Object, e As PaintEventArgs) Handles SplitContainer1.Panel1.Paint 

End Sub 

Private Sub NotifyIcon1_MouseDoubleClick(sender As Object, e As MouseEventArgs) 

End Sub 

Private Sub TreeView1_AfterSelect(sender As Object, e As TreeViewEventArgs) 

End Sub 




Private Sub Timer3_Tick(sender As Object, e As EventArgs) Handles Timer3.Tick 
    ProgressBar3.Increment(1) 
    If ProgressBar3.Value = 100 Then 
     Timer3.Stop() 


    End If 
End Sub 

Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click 
    Timer3.Start() 


End Sub 

Private Sub ProgressBar3_Click(sender As Object, e As EventArgs) Handles ProgressBar3.Click 

End Sub 
End Class 

BTW : 이것은 아마도 쓰레기 일 것입니다!

+1

무엇이 잘못되었는지 설명해 주시겠습니까? – paulsm4

+0

tabcontrol1에 [MCVE] (http://stackoverflow.com/help/mcve) –

+0

를 게시하십시오. 세 번째 탭에서는 button4와 progressbar3가 작동하지 않습니다. –

답변

1

의견을 말할만한 점수가 충분하지 않습니다.

먼저 다른 사람들이 귀하의 양식이 어떤 모양인지 또는 귀하가 기대하는 바가 모르기 때문에 이것을 다시 만들 수 없다고 말했기 때문에.

두 번째로 0.6이 유효한 정수가 아니기 때문에 ProgressBar2.Increment (0.6)와 같은 기술적 오류를 피하기 위해 프로젝트 속성의 컴파일 섹션에서 Option Strict를 설정해야합니다.

TabControl (OP에서 언급하지 않은)을 3 개의 탭과 다양한 버튼과 진행 막대와 함께 던져서 논리적 인 것처럼 보이게 만들었고 코드가 무엇인지 잘 설명했습니다. 각 탭의 버튼을 클릭하면 각 진행률 막대가 결국 100 %에 도달했습니다. 나는 당신이 무엇을 기대하고 있는지 전혀 모른다.

0

빈 하위 및 작업 수신기를 모두 제거하면 문제를 쉽게 감지 할 수 있습니다.

관련 문제