how to show different forms on different identification?
sory friend i'm new in vb.net. working on School Management System project. and dont now how to show different forms on different identification.
i have no any idea releated to this. need your help!
i have 3 main forms for 3 different actors (student's form "frm_student", teacher's form "frm_teacher", and Admin form "frm_admin).
and a Login form that have textbox names (id, name, password, category)
i want to work on "Category" like as (admin for frm_admin, teacher for frm_teacher, student for frm_student)
plz help me by sharing any piece of code in vb.net.
idea is this. if user write "admin" in txt_category, Frm_admin should apair.
if user write "teacher" in txt_category, Frm_teacher should apair.
if user write "student" in txt_category, Frm_student should apair.
(admin, teacher, student) these 3 actors are aleready saved in login database tabel.

When the user logs in return their category then:

SELECT category WHERE name = ?name AND password = ?password;

Then a simple IF statement decides what form to send them to based on the returned category and redirects as needed.
As an added advantage you don't need the user to remember what they need to type into that textbox to get to the right form.

As hericles have said. You can do it like this.

 If txt_category.Text = "Admin" Then
 Me.Hide()
 Frm_admin.Show() ' Or you can use .Visible = True()
 Else
 If txt_category.Text = "Student" Then
 Me.Hide()
 Frm_Student.Show()
 Else
 If txt_category.Text = "Teacher" Then
 Me.Hide()
 Frm_Teacher.Show()
 End If
 End If
 End If

Hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.