Crash inside InitializeComponent()
-
Hi, I've an application which crashes inside InitializeComponent() method. It works on most of the computers but crashes on certain computers. If you need I can post the code of my InitializeComponent() method. Any ideas? Thanks.
-
Hi, I've an application which crashes inside InitializeComponent() method. It works on most of the computers but crashes on certain computers. If you need I can post the code of my InitializeComponent() method. Any ideas? Thanks.
-
SimpleData wrote:
you need I can post the code
Please do. No ideas as yet. :)
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest.
Honestly. It's the honest ones you want to watch out for...It is just designer generated code, nothing special. :) But there you go.
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(login));
this.label1 = new System.Windows.Forms.Label();
this.btnLogin = new System.Windows.Forms.Button();
this.txtUsername = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtPassword = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.cbTVmode = new System.Windows.Forms.CheckBox();
this.pbPartnerLogo = new System.Windows.Forms.PictureBox();
this.label6 = new System.Windows.Forms.Label();
this.cbWebSite = new System.Windows.Forms.ComboBox();
this.chAutoLogin = new System.Windows.Forms.CheckBox();
this.chRememberMe = new System.Windows.Forms.CheckBox();
this.panel2 = new System.Windows.Forms.Panel();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbPartnerLogo)).BeginInit();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();// This continues with property declerations of buttons, labels, pictureboxes and listboxes.
-
It is just designer generated code, nothing special. :) But there you go.
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(login));
this.label1 = new System.Windows.Forms.Label();
this.btnLogin = new System.Windows.Forms.Button();
this.txtUsername = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtPassword = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.cbTVmode = new System.Windows.Forms.CheckBox();
this.pbPartnerLogo = new System.Windows.Forms.PictureBox();
this.label6 = new System.Windows.Forms.Label();
this.cbWebSite = new System.Windows.Forms.ComboBox();
this.chAutoLogin = new System.Windows.Forms.CheckBox();
this.chRememberMe = new System.Windows.Forms.CheckBox();
this.panel2 = new System.Windows.Forms.Panel();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbPartnerLogo)).BeginInit();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();// This continues with property declerations of buttons, labels, pictureboxes and listboxes.
-
Hi, I've an application which crashes inside InitializeComponent() method. It works on most of the computers but crashes on certain computers. If you need I can post the code of my InitializeComponent() method. Any ideas? Thanks.
Hi, every WinForm app should have a try-catch around its Application.Run() statement; it would provide a safety net for all mishaps that could occur in the main form's construction. So try it like this:
public static void Main() {
try {
...
Application.Run(new Form1());
} catch(Exception exc) {
Console.WriteLine(exc.ToString());
}
}That should give you the stack trace and point you straight at the problem. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.
All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
modified on Sunday, February 14, 2010 7:03 AM
-
How do you load images into the Picture boxes that you are using? For a correct approach, have a look here.
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest.
Honestly. It's the honest ones you want to watch out for...Thank you for your answer, but according to the link you've given I am doing it correctly.
-
Hi, every WinForm app should have a try-catch around its Application.Run() statement; it would provide a safety net for all mishaps that could occur in the main form's construction. So try it like this:
public static void Main() {
try {
...
Application.Run(new Form1());
} catch(Exception exc) {
Console.WriteLine(exc.ToString());
}
}That should give you the stack trace and point you straight at the problem. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.
All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
modified on Sunday, February 14, 2010 7:03 AM
Thanks, I will try it and let you know.