Click here to Skip to main content
15,898,036 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionUsing C# class in VB.Net Pin
danasegaranea31-Oct-07 23:36
danasegaranea31-Oct-07 23:36 
AnswerRe: Using C# class in VB.Net Pin
darkelv31-Oct-07 23:46
darkelv31-Oct-07 23:46 
AnswerRe: Using C# class in VB.Net Pin
Dave Kreskowiak1-Nov-07 2:25
mveDave Kreskowiak1-Nov-07 2:25 
AnswerRe: Using C# class in VB.Net Pin
Luc Pattyn1-Nov-07 4:10
sitebuilderLuc Pattyn1-Nov-07 4:10 
GeneralRe: Using C# class in VB.Net Pin
Ri Qen-Sin12-Nov-07 15:49
Ri Qen-Sin12-Nov-07 15:49 
QuestionSql 2000 to sql2005 Pin
ramyasangeet31-Oct-07 20:19
ramyasangeet31-Oct-07 20:19 
AnswerRe: Sql 2000 to sql2005 Pin
Vimalsoft(Pty) Ltd31-Oct-07 22:35
professionalVimalsoft(Pty) Ltd31-Oct-07 22:35 
QuestionQuestion on Calling a Windows Forms Pin
Leo Lai31-Oct-07 16:10
Leo Lai31-Oct-07 16:10 
Dear all,

I need to write a sub procedure to show a specified window form, based on the criteria and options choose by user. But it seems the code is so long and also maybe expand later.

Private Sub CallSubForm(ByVal Criteria As String, ByVal UserOption As Integer)

IF Criteria = "A" Then
IF UserOption = 1 Then
FormMainA1.Show()
Elseif UserOption = 2 Then
FormMainA2.Show()
Else
FormMainA3.Show()
End if

Elseif Criteria = "B" Then
IF UserOption = 1 Then
FormMainB1.Show()
Elseif UserOption = 2 Then
FormMainB2.Show()
Else
FormMainB3.Show()
End if

Elseif Criteria = "C" Then
Elseif Criteria = "D" Then

:
:
:

End if

End Sub


Can I pass the name of specified form to a procedure and show it out ?

Like this:

Private Sub CallSubForm(ByVal FormName As String)

:
:

End Sub



Many Thanks !!!


Leo
AnswerRe: Question on Calling a Windows Forms Pin
Mycroft Holmes31-Oct-07 22:12
professionalMycroft Holmes31-Oct-07 22:12 
QuestionWell coded or not? Pin
Sam Heller31-Oct-07 12:16
Sam Heller31-Oct-07 12:16 
AnswerRe: Well coded or not? Pin
Luc Pattyn31-Oct-07 12:24
sitebuilderLuc Pattyn31-Oct-07 12:24 
AnswerRe: Well coded or not? Pin
Paul Conrad31-Oct-07 14:05
professionalPaul Conrad31-Oct-07 14:05 
QuestionButton handler Pin
fxcapt31-Oct-07 12:15
fxcapt31-Oct-07 12:15 
AnswerRe: Button handler Pin
Luc Pattyn31-Oct-07 12:28
sitebuilderLuc Pattyn31-Oct-07 12:28 
GeneralRe: Button handler Pin
fxcapt31-Oct-07 13:18
fxcapt31-Oct-07 13:18 
GeneralRe: Button handler Pin
Luc Pattyn31-Oct-07 14:11
sitebuilderLuc Pattyn31-Oct-07 14:11 
GeneralRe: Button handler Pin
fxcapt31-Oct-07 16:17
fxcapt31-Oct-07 16:17 
QuestionRead/Write PCL Pin
Fingerstyler31-Oct-07 11:52
Fingerstyler31-Oct-07 11:52 
AnswerRe: Read/Write PCL Pin
Dave Kreskowiak1-Nov-07 14:24
mveDave Kreskowiak1-Nov-07 14:24 
GeneralRe: Read/Write PCL Pin
Fingerstyler1-Nov-07 16:13
Fingerstyler1-Nov-07 16:13 
GeneralRe: Read/Write PCL Pin
Dave Kreskowiak1-Nov-07 17:48
mveDave Kreskowiak1-Nov-07 17:48 
GeneralRe: Read/Write PCL Pin
Fingerstyler5-Nov-07 9:00
Fingerstyler5-Nov-07 9:00 
QuestionSQL Assistance with ISNULL Pin
digicd131-Oct-07 9:27
digicd131-Oct-07 9:27 
AnswerRe: SQL Assistance with ISNULL Pin
pmarfleet31-Oct-07 10:07
pmarfleet31-Oct-07 10:07 
GeneralRe: SQL Assistance with ISNULL Pin
digicd131-Oct-07 10:38
digicd131-Oct-07 10:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.