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
// formType is not a form, handle the error
I can't realy understand your examples (your naming is srtoa off), but if you just try to pass a button and a form to a method, they are objects like everything else.
void PassButton(Button myButton)
//Do stuff with myButton
void PassForm(Form myForm)
//Do stuff with myForm
//Form is the class from which your own for is derived, you can cast it to
//any form you want or use your selfmade Form (like F_Main)
1) Republic of Ireland algorithm? Never heard of it.
2) This does sound suspiciously like a google question and google will serve you a delicious feast of answers if you try.
3) Find out what you want to do and come back with any problems you have doing it.
That's all. Any more of these half brained antics and I'll start getting grumpy.
i'm using first time code project i don't know how to ask a qestion properly.actually the problem is my project is in vb6.0 now we r changing to c#.net .in vb project backend is ms-access in that text is encrypted.that text will be appear oriya in c#.net.that's y i'm trying to converting .i take one windows application one textbox n button in the textbox i write english word wen i clicked on the button that word will be changed to oriya language.i searched in google but the xamples r coming but those r webapplications.
Ok, welcome to codeproject. Click my signature link, it will tell you the rules. A few key points to remember;
-we are not employees and you are not the boss, if you want code write it, or go to www.rentacoder.com and pay for it.
-never ask for code, never.
-this forum is more for specific problems, if you get stuck compiling and can't figure out an error, questions about specific methods or algorithms
i want to decrypt the text(means anytype of text)in to oriya language in c#.net wat's the code
That's easy. The code is the one on the front of your credit card, along with the security number on the back. Once you've sent it to me and I've subtracted my fee from your card, I'll send you the code.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith