Click here to Skip to main content
15,891,184 members
Home / Discussions / C#
   

C#

 
GeneralRe: Major performance hit when writing binary data to a com port. Pin
Dan Neely8-May-06 8:03
Dan Neely8-May-06 8:03 
GeneralRe: Major performance hit when writing binary data to a com port. Pin
Dan Neely8-May-06 9:23
Dan Neely8-May-06 9:23 
QuestionLoading SQL Server DataBases Into A combo Box Using C# Pin
NightAttack8-May-06 5:07
NightAttack8-May-06 5:07 
AnswerRe: Loading SQL Server DataBases Into A combo Box Using C# Pin
J4amieC8-May-06 5:17
J4amieC8-May-06 5:17 
Questiona simple question about forms ? Pin
cmpeng348-May-06 4:59
cmpeng348-May-06 4:59 
AnswerRe: a simple question about forms ? Pin
SoftcodeSoftware8-May-06 5:30
SoftcodeSoftware8-May-06 5:30 
AnswerRe: a simple question about forms ? Pin
Stefan Troschuetz8-May-06 5:52
Stefan Troschuetz8-May-06 5:52 
AnswerRe: a simple question about forms ? Pin
led mike8-May-06 6:07
led mike8-May-06 6:07 
Change your Program.cs file to this:

static class Program
{
	public static ApplicationContext CurrentContext;
	/// <summary>
	/// The main entry point for the application.
	/// </summary>
	[STAThread]
	static void Main()
	{
		Application.EnableVisualStyles();
		Application.SetCompatibleTextRenderingDefault(false);
		CurrentContext = new ApplicationContext(new Form1());
		Application.Run(CurrentContext);
	}
}

Then in your handler to close Form1 do this.

Form2 dlg = new Form2();
dlg.Show();
Program.CurrentContext.MainForm = dlg;
base.Close();






"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum

led mike
Questionfeston Pin
saarkk8-May-06 4:58
saarkk8-May-06 4:58 
AnswerRe: feston Pin
Judah Gabriel Himango8-May-06 5:44
sponsorJudah Gabriel Himango8-May-06 5:44 
QuestionRe: feston Pin
saarkk8-May-06 6:05
saarkk8-May-06 6:05 
AnswerRe: feston Pin
Stefan Troschuetz8-May-06 6:47
Stefan Troschuetz8-May-06 6:47 
GeneralRe: feston Pin
saarkk8-May-06 7:02
saarkk8-May-06 7:02 
GeneralRe: feston Pin
Stefan Troschuetz8-May-06 7:48
Stefan Troschuetz8-May-06 7:48 
QuestionRe: feston Pin
saarkk8-May-06 9:31
saarkk8-May-06 9:31 
GeneralRe: feston Pin
lmoelleb8-May-06 21:17
lmoelleb8-May-06 21:17 
QuestionGet the control under mouse button Pin
freshonlineMax8-May-06 4:50
freshonlineMax8-May-06 4:50 
AnswerRe: Get the control under mouse button Pin
Robert Rohde8-May-06 4:57
Robert Rohde8-May-06 4:57 
GeneralRe: Get the control under mouse button Pin
freshonlineMax8-May-06 6:45
freshonlineMax8-May-06 6:45 
AnswerRe: Get the control under mouse button Pin
Le centriste8-May-06 4:59
Le centriste8-May-06 4:59 
Questionprinting a simple text line ? (or some data or even a page) Pin
cmpeng348-May-06 4:42
cmpeng348-May-06 4:42 
AnswerRe: printing a simple text line ? (or some data or even a page) Pin
Judah Gabriel Himango8-May-06 5:46
sponsorJudah Gabriel Himango8-May-06 5:46 
QuestionAdd/Change wireless settings through C# Pin
Søren Alsbjerg Hørup8-May-06 4:25
Søren Alsbjerg Hørup8-May-06 4:25 
QuestionComments: how to use "<" in comments... what is the escape sequence? Pin
Patrick Klug8-May-06 4:20
Patrick Klug8-May-06 4:20 
AnswerRe: Comments: how to use &quot;&lt;&quot; in comments... what is the escape sequence? Pin
Tarakeshwar Reddy8-May-06 4:46
professionalTarakeshwar Reddy8-May-06 4:46 

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.