case structure in vb.net!!!
-
in my project, i use toolbar toolbar in my buttons...i used case structure for the functions of each buttons in the toolbar but theres an error in it... my codes goes like this: Select Case Case 0 Dim subjects As New subjects subjects.Show() Me.Hide() Case 1 Dim file_maintenance As New file_maintenance file_maintenance.Show() Me.Hide() Case 2 Dim grade_entry As New grade_entry grade_entry.Show() Me.Hide() End Select is this code correct??? or this: dim keyin as integer Select Case keyIn Case 0 Dim subjects As New subjects subjects.Show() Me.Hide() Case 1 Dim file_maintenance As New file_maintenance file_maintenance.Show() Me.Hide() Case 2 Dim grade_entry As New grade_entry grade_entry.Show() Me.Hide() End Select in the first code, there is an error so i can't run my program... in the other code, the 1st button is only functioning... what is the really correct code for this???
-
in my project, i use toolbar toolbar in my buttons...i used case structure for the functions of each buttons in the toolbar but theres an error in it... my codes goes like this: Select Case Case 0 Dim subjects As New subjects subjects.Show() Me.Hide() Case 1 Dim file_maintenance As New file_maintenance file_maintenance.Show() Me.Hide() Case 2 Dim grade_entry As New grade_entry grade_entry.Show() Me.Hide() End Select is this code correct??? or this: dim keyin as integer Select Case keyIn Case 0 Dim subjects As New subjects subjects.Show() Me.Hide() Case 1 Dim file_maintenance As New file_maintenance file_maintenance.Show() Me.Hide() Case 2 Dim grade_entry As New grade_entry grade_entry.Show() Me.Hide() End Select in the first code, there is an error so i can't run my program... in the other code, the 1st button is only functioning... what is the really correct code for this???
Rharzkie wrote:
what is the really correct code for this???
What is the correct forum for this question because I really don't see anything to do with SQL or databases in here!?
Upcoming FREE developer events: * Glasgow: Agile in the Enterprise Vs. ISVs, Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... * Reading: SQL Bits My website
-
in my project, i use toolbar toolbar in my buttons...i used case structure for the functions of each buttons in the toolbar but theres an error in it... my codes goes like this: Select Case Case 0 Dim subjects As New subjects subjects.Show() Me.Hide() Case 1 Dim file_maintenance As New file_maintenance file_maintenance.Show() Me.Hide() Case 2 Dim grade_entry As New grade_entry grade_entry.Show() Me.Hide() End Select is this code correct??? or this: dim keyin as integer Select Case keyIn Case 0 Dim subjects As New subjects subjects.Show() Me.Hide() Case 1 Dim file_maintenance As New file_maintenance file_maintenance.Show() Me.Hide() Case 2 Dim grade_entry As New grade_entry grade_entry.Show() Me.Hide() End Select in the first code, there is an error so i can't run my program... in the other code, the 1st button is only functioning... what is the really correct code for this???
You would be better-off with the VB.Net forum. However, it looks like you haven't assigned any value to the keyIn variable.
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message".
-
in my project, i use toolbar toolbar in my buttons...i used case structure for the functions of each buttons in the toolbar but theres an error in it... my codes goes like this: Select Case Case 0 Dim subjects As New subjects subjects.Show() Me.Hide() Case 1 Dim file_maintenance As New file_maintenance file_maintenance.Show() Me.Hide() Case 2 Dim grade_entry As New grade_entry grade_entry.Show() Me.Hide() End Select is this code correct??? or this: dim keyin as integer Select Case keyIn Case 0 Dim subjects As New subjects subjects.Show() Me.Hide() Case 1 Dim file_maintenance As New file_maintenance file_maintenance.Show() Me.Hide() Case 2 Dim grade_entry As New grade_entry grade_entry.Show() Me.Hide() End Select in the first code, there is an error so i can't run my program... in the other code, the 1st button is only functioning... what is the really correct code for this???
-
in my project, i use toolbar toolbar in my buttons...i used case structure for the functions of each buttons in the toolbar but theres an error in it... my codes goes like this: Select Case Case 0 Dim subjects As New subjects subjects.Show() Me.Hide() Case 1 Dim file_maintenance As New file_maintenance file_maintenance.Show() Me.Hide() Case 2 Dim grade_entry As New grade_entry grade_entry.Show() Me.Hide() End Select is this code correct??? or this: dim keyin as integer Select Case keyIn Case 0 Dim subjects As New subjects subjects.Show() Me.Hide() Case 1 Dim file_maintenance As New file_maintenance file_maintenance.Show() Me.Hide() Case 2 Dim grade_entry As New grade_entry grade_entry.Show() Me.Hide() End Select in the first code, there is an error so i can't run my program... in the other code, the 1st button is only functioning... what is the really correct code for this???
Hi Rharzkie, In your first part of your code you didn't pass parameter for the case. It should be Select Case Case 0 Dim subjects As New subjects subjects.Show() Me.Hide() Case 1 Dim file_maintenance As New file_maintenance file_maintenance.Show() Me.Hide() Case 2 Dim grade_entry As New grade_entry grade_entry.Show() Me.Hide() End Select Senthil