Application start minimized - why?

P

PeterZ

Hi,

I have an app with a main form, when I deploy it to the PDA it starts up
minimized, ie. you can't tell its running until you click on tasks!

I tried:
Form.WindowState = Normal
Form.WindowState = Maximized

Regardless what setting I apply it always starts minimized.

Any ideas why?

Cheers,
PeterZ
 
G

Guest

In your form load event:

Me.WindowState = FormWindowState.Maximized ' Hide the Taskbar.
 
N

nzpcmad

I had the same problem. The "SetForegroundWindow" code found here:

"Re: New problem - Now Forms doesn't show."

in this group fixes it.

Thanks
 
P

PeterZ

Worked it out!
In case anyone else is interested - I was missing the following line in the
Windows Form generated code section:


this.ClientSize = new System.Drawing.Size(236, 266);


It goes right towards the end of the abovementioned section, here's a
snippet:

..
..
..
..
//
// Form1
//
this.BackColor = System.Drawing.Color.Black;
this.ClientSize = new System.Drawing.Size(236, 266); //<---- That's the
succer!
this.Controls.Add(this.panelGPS);
this.Controls.Add(this.panelGPSmsg);
this.Controls.Add(this.mapX);
this.Controls.Add(this.mapX2);
this.Controls.Add(this.picRedraw);
this.Controls.Add(this.lblW);
this.Controls.Add(this.label10);
this.Controls.Add(this.panelNoData);
this.Controls.Add(this.lblY);
this.Controls.Add(this.lblX);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.lblMode);
this.Controls.Add(this.label1);
this.Controls.Add(this.label7);
this.Controls.Add(this.toolbar);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Menu = this.mainMenu1;
this.Text = "Assigned at runtime";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
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