Click here to Skip to main content
15,908,661 members
Home / Discussions / C#
   

C#

 
GeneralRe: zipping an xml file [modified] Pin
musefan8-Feb-10 7:03
musefan8-Feb-10 7:03 
AnswerRe: zipping an xml file Pin
harold aptroot8-Feb-10 7:33
harold aptroot8-Feb-10 7:33 
QuestionSolving (string) and creating the screen - Ex.: CreateScreen("screenTest") Pin
User 68218818-Feb-10 4:06
User 68218818-Feb-10 4:06 
AnswerRe: Solving (string) and creating the screen - Ex.: CreateScreen("screenTest") Pin
Not Active8-Feb-10 4:20
mentorNot Active8-Feb-10 4:20 
GeneralRe: Solving (string) and creating the screen - Ex.: CreateScreen("screenTest") Pin
User 68218818-Feb-10 4:38
User 68218818-Feb-10 4:38 
AnswerRe: Solving (string) and creating the screen - Ex.: CreateScreen("screenTest") Pin
V.8-Feb-10 4:24
professionalV.8-Feb-10 4:24 
GeneralRe: Solving (string) and creating the screen - Ex.: CreateScreen("screenTest") Pin
User 68218818-Feb-10 4:37
User 68218818-Feb-10 4:37 
AnswerRe: Solving (string) and creating the screen - Ex.: CreateScreen("screenTest") [modified] Pin
rhuiden8-Feb-10 4:43
rhuiden8-Feb-10 4:43 
I would use something like this...

	private void CreateScreen(string FullName, params object[] args)
{
    Type t ;
    Form f;
    
    t = Type.GetType(FullName);
    
    if (t != null) {
        f = Activator.CreateInstance(t, args) as Form;
        if (f != null) {
            f.Show();
        }
    }
}


This would also allow you to pass arguments to the constructor. You may also have to pass the Full name of the Form including the Namespace. I don't remember how Type.GetType() works.

Edit: Sorry, forgot I was in C#.
modified on Monday, February 8, 2010 11:02 AM

GeneralRe: Solving (string) and creating the screen - Ex.: CreateScreen("screenTest") Pin
User 68218818-Feb-10 11:47
User 68218818-Feb-10 11:47 
Questioncontrols in richtextbox Pin
asdf232118-Feb-10 3:19
asdf232118-Feb-10 3:19 
QuestionMultiple Clients Running One Server Application Pin
Bob Steel-Smith8-Feb-10 3:16
Bob Steel-Smith8-Feb-10 3:16 
AnswerRe: Multiple Clients Running One Server Application Pin
Keith Barrow8-Feb-10 3:42
professionalKeith Barrow8-Feb-10 3:42 
GeneralRe: Multiple Clients Running One Server Application Pin
Bob Steel-Smith8-Feb-10 4:23
Bob Steel-Smith8-Feb-10 4:23 
GeneralRe: Multiple Clients Running One Server Application Pin
Keith Barrow8-Feb-10 5:23
professionalKeith Barrow8-Feb-10 5:23 
GeneralRe: Multiple Clients Running One Server Application Pin
Bob Steel-Smith8-Feb-10 7:01
Bob Steel-Smith8-Feb-10 7:01 
GeneralRe: Multiple Clients Running One Server Application Pin
Keith Barrow8-Feb-10 9:29
professionalKeith Barrow8-Feb-10 9:29 
GeneralRe: Multiple Clients Running One Server Application Pin
Bob Steel-Smith8-Feb-10 16:34
Bob Steel-Smith8-Feb-10 16:34 
GeneralRe: Multiple Clients Running One Server Application Pin
Keith Barrow8-Feb-10 23:40
professionalKeith Barrow8-Feb-10 23:40 
QuestionData sync between two sql server? Pin
Tridip Bhattacharjee8-Feb-10 2:22
professionalTridip Bhattacharjee8-Feb-10 2:22 
AnswerRe: Data sync between two sql server? Pin
Not Active8-Feb-10 2:55
mentorNot Active8-Feb-10 2:55 
AnswerRe: Data sync between two sql server? Pin
Giorgi Dalakishvili8-Feb-10 19:47
mentorGiorgi Dalakishvili8-Feb-10 19:47 
QuestionHigh DPI Issue Pin
musefan8-Feb-10 1:42
musefan8-Feb-10 1:42 
QuestionReturning web controls from a web service Pin
Vaibhav06108-Feb-10 1:27
Vaibhav06108-Feb-10 1:27 
AnswerRe: Returning web controls from a web service Pin
Not Active8-Feb-10 2:00
mentorNot Active8-Feb-10 2:00 
AnswerRe: Returning web controls from a web service Pin
kevinnicol8-Feb-10 2:20
kevinnicol8-Feb-10 2:20 

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.