Private Sub Form7_Load (sender As Object, As EventArgs e) Handles MyBase. Load Dim SQLTXT As String Cn=New SqlConnection (lj) SQLTXT="select date, water temperature, turbidity from yssj order by date" Da=New SqlDataAdapter (SQLTXT, cn) Dt=New DataTable Da. The Fill (dt) Chart1. The DataSource=dt
'Chart1. DataBind ()
Chart1. Series (0). XValueMember="date" Chart1. Series (0). YValueMembers="water" Chart1. Series (1). XValueMember="date" Chart1. Series (1). YValueMembers="turbidity "End Sub
Consult everybody a great god, and the above code in Private Sub Form7_Load, can realize the function of the above, but the same code in Private Sub Button1_Click, want to use the button no response, this is what reason!!!!!!!!!!
CodePudding user response:
Can't, you see the debugged, click on the button have triggered, Estimates may before you define multiple Button1_Click, pointed to the another function for the button is,