Click here to Skip to main content
15,911,132 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem in FolderBrowserDialog Pin
sudhi16427-Feb-09 2:01
sudhi16427-Feb-09 2:01 
AnswerRe: Problem in FolderBrowserDialog Pin
musefan27-Feb-09 2:04
musefan27-Feb-09 2:04 
GeneralRe: Problem in FolderBrowserDialog Pin
sudhi16427-Feb-09 2:38
sudhi16427-Feb-09 2:38 
Questionconvert word to jpeg Pin
yesu prakash27-Feb-09 0:24
yesu prakash27-Feb-09 0:24 
AnswerRe: convert word to jpeg Pin
Calin Tatar27-Feb-09 0:54
Calin Tatar27-Feb-09 0:54 
GeneralRe: convert word to jpeg Pin
yesu prakash27-Feb-09 1:29
yesu prakash27-Feb-09 1:29 
GeneralRe: convert word to jpeg Pin
Calin Tatar27-Feb-09 1:34
Calin Tatar27-Feb-09 1:34 
QuestionHow to get the application data folder for each user ? Pin
Member 395385627-Feb-09 0:16
Member 395385627-Feb-09 0:16 
AnswerRe: How to get the application data folder for each user ? Pin
Alan N27-Feb-09 0:54
Alan N27-Feb-09 0:54 
AnswerRe: How to get the application data folder for each user ? Pin
Member 395385627-Feb-09 0:57
Member 395385627-Feb-09 0:57 
AnswerRe: How to get the application data folder for each user ? Pin
PIEBALDconsult27-Feb-09 4:31
mvePIEBALDconsult27-Feb-09 4:31 
QuestionHow to pass button and form in a method ? Pin
soulidentities27-Feb-09 0:04
soulidentities27-Feb-09 0:04 
AnswerRe: How to pass button and form in a method ? Pin
musefan27-Feb-09 0:12
musefan27-Feb-09 0:12 
GeneralRe: How to pass button and form in a method ? Pin
soulidentities27-Feb-09 3:21
soulidentities27-Feb-09 3:21 
Answer[Message Deleted] Pin
Prajeesh27-Feb-09 0:29
Prajeesh27-Feb-09 0:29 
Rantyou mean you with u Pin
Deresen27-Feb-09 0:51
Deresen27-Feb-09 0:51 
GeneralRe: you mean you with u Pin
soulidentities27-Feb-09 3:06
soulidentities27-Feb-09 3:06 
GeneralRe: you mean you with u Pin
Deresen27-Feb-09 3:15
Deresen27-Feb-09 3:15 
GeneralRe: you mean you with u Pin
soulidentities27-Feb-09 3:28
soulidentities27-Feb-09 3:28 
GeneralRe: you mean you with u Pin
Deresen27-Feb-09 3:52
Deresen27-Feb-09 3:52 
GeneralRe: you mean you with u Pin
soulidentities27-Feb-09 3:58
soulidentities27-Feb-09 3:58 
GeneralRe: you mean you with u [modified] Pin
Mirko198027-Feb-09 3:52
Mirko198027-Feb-09 3:52 
Let's see if I understood what you mean.
You want to pass to the showForm method the type of form to show and then show the kind of form desired.

If it's so, you can use reflection in the following way:

void ShowForm(Type formType)
{
    Form frm = Activator.CreateInstance(formType) as Form; // your type must be some kind of form
    if (frm != null)
    {
        frm.Show(); // showing the form
    }
    else
    {
        // formType is not a form, handle the error
    }
}


Is this what you wanted to do?

modified on Friday, February 27, 2009 11:14 AM

GeneralRe: you mean you with u Pin
soulidentities27-Feb-09 3:59
soulidentities27-Feb-09 3:59 
AnswerRe: How to pass button and form in a method ? Pin
Megidolaon27-Feb-09 1:06
Megidolaon27-Feb-09 1:06 
Questiontracking the eye algorithm Pin
sanforjackass26-Feb-09 23:49
sanforjackass26-Feb-09 23:49 

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.