AutoScaleMode.Font crashes program


P

Paul

Windows Forms, .net 2.0, vs2005, xp pro.

Setting AutoScaleMode.Font (or Dpi) on my main form crashes my program on some computers. If I set it to None or Inherit program runs ok. It's a very simple form with a picturebox, combobox and a slider.

..net 1.1 is not be installed on at least one of the problem computers. Is 1.1 sometimes required for 2.0 apps to run correctly?

Error:

EventType : clr20r3 P1 : myapp.exe P2 : 1.0.2816.19350
P3 : 46eebd1c P4 : myapp P5 : 1.0.2816.19350 P6 : 46eebd1c
P7 : e P8 : 1 P9 : system.nullreferenceexception
 
Ad

Advertisements

P

Paul

Still not working. Anyone have any ideas? The code is mostly from the AlphaBlend demo on CodeProject. The program runs on the development system every time. But it fails on a new XP install with only .net 2.0 installed. Kind of looks like a bug in the framework.

//
// Form1
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(755, 405);
this.Controls.Add(this.panel1);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.pictureBox1);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Form1";
this.Text = "Alpha Blend Demo";
this.Load += new System.EventHandler(this.Form1_Load);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top