Create nonresize and nonmovable window

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to create a window in Wince device using CF,which must satisfy the
following conditions:
1) nonresize
2) nonmovable
3) don't set WindowState = FormWindowState.Maximized
4) have X icon in the title bar


Anyone know the answer?

thanks,
wyghf
 
1) On CE Windows are non-resizable anyway

2)
//In the absence of OnMove being exposed:
protected override void OnPaint(PaintEventArgs e) {
// assuming you always want it positioned at 7,7
this.Bounds=new Rectangle(7,7,this.Width,this.Height);
base.OnPaint (e);
}

3) Don't. Simply size it bfore showing it

4) Play with form.minimizebox/maximizebox/controlbox to show whatever you
want

Cheers
Daniel
 
Thanks.It works.
But there is a problem I don't like: when moving,there is a dash rectangle.
How to avoid it just like the form is maximized?
 
Not sure... maybe size the form two pixels larger in both directions and
place it at 1,1 or try different values for the FormBorderStyle...

Cheers
Daniel
 
Back
Top