Click here to Skip to main content
15,921,371 members
Home / Discussions / C#
   

C#

 
QuestionCan you use functions like sprintf in c# Pin
IrishSonic2-Sep-03 5:59
IrishSonic2-Sep-03 5:59 
AnswerRe: Can you use functions like sprintf in c# Pin
flipdoubt2-Sep-03 7:04
flipdoubt2-Sep-03 7:04 
AnswerRe: Can you use functions like sprintf in c# Pin
leppie2-Sep-03 12:14
leppie2-Sep-03 12:14 
GeneralThanks, will check it out. Pin
IrishSonic2-Sep-03 22:06
IrishSonic2-Sep-03 22:06 
GeneralOffice Xp Task Panel Pin
Sanjay Rastogi2-Sep-03 3:15
Sanjay Rastogi2-Sep-03 3:15 
GeneralSingleCall and Threads Forever Pin
Member 4744652-Sep-03 2:32
Member 4744652-Sep-03 2:32 
GeneralWin32 API Wrapper Pin
vikramlinux1-Sep-03 23:34
vikramlinux1-Sep-03 23:34 
GeneralRe: Win32 API Wrapper Pin
J. Dunlap2-Sep-03 9:20
J. Dunlap2-Sep-03 9:20 
GeneralTrouble with 'set' accessor Pin
mikeirwin1-Sep-03 20:01
mikeirwin1-Sep-03 20:01 
GeneralRe: Trouble with 'set' accessor Pin
Ista2-Sep-03 7:01
Ista2-Sep-03 7:01 
GeneralRe: Trouble with 'set' accessor Pin
mikeirwin2-Sep-03 9:21
mikeirwin2-Sep-03 9:21 
GeneralWriting and reading binary data Pin
padcom131-Sep-03 14:53
padcom131-Sep-03 14:53 
GeneralRe: Writing and reading binary data Pin
James T. Johnson1-Sep-03 16:57
James T. Johnson1-Sep-03 16:57 
GeneralRe: Writing and reading binary data Pin
James T. Johnson1-Sep-03 17:08
James T. Johnson1-Sep-03 17:08 
GeneralRe: Writing and reading binary data Pin
padcom132-Sep-03 5:01
padcom132-Sep-03 5:01 
GeneralRe: Writing and reading binary data Pin
Eric Gunnerson (msft)2-Sep-03 9:48
Eric Gunnerson (msft)2-Sep-03 9:48 
QuestionHow to call a form using reflection Pin
Ista1-Sep-03 14:20
Ista1-Sep-03 14:20 
AnswerRe: How to call a form using reflection Pin
James T. Johnson1-Sep-03 16:35
James T. Johnson1-Sep-03 16:35 
You can use the static method, Type.GetType, passing in the full class name of your form. Assuming that assembly has been loaded into the AppDomain a Type object for your form will be returned.

You can then use one of the Activator.CreateInstance overloads to create a new instance of the class represented by that Type object. Cast the returned object back to a Form and you can use it as normal.

public Form GetForm(string className)
{
  Form form = null;
  
  Type formType = Type.GetType(className);
  
  if( formType == null )
    return null;
  
  form = (Form) Activator.CreateInstance(formType);
 
  return form;
}
Its untested, but that should work for you.

James

At Jethro Tull's August 28, 2003 concert Ian Anderson mentioned that the group would be performing a medley of title tracks. The songs were "Songs from the Wood", "Too Old to Rock and Roll; Too Young to Die"; and from the Heavy Horses album, "Stairway to Heaven"
GeneralRe: How to call a form using reflection Pin
leppie1-Sep-03 18:50
leppie1-Sep-03 18:50 
GeneralRe: How to call a form using reflection Pin
James T. Johnson2-Sep-03 2:28
James T. Johnson2-Sep-03 2:28 
GeneralRe: How to call a form using reflection Pin
leppie2-Sep-03 7:08
leppie2-Sep-03 7:08 
QuestionIterate through class properties? Pin
vedbu1-Sep-03 13:33
vedbu1-Sep-03 13:33 
AnswerRe: Iterate through class properties? Pin
Ista1-Sep-03 14:14
Ista1-Sep-03 14:14 
AnswerRe: Iterate through class properties? Pin
Jim Stewart1-Sep-03 15:44
Jim Stewart1-Sep-03 15:44 
GeneralRe: Iterate through class properties? Pin
vedbu2-Sep-03 13:26
vedbu2-Sep-03 13:26 

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.