Input MessageBox

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

Is there any way to create an input box with VS .NET 2003. I don't
want a full screen for one textbox and can't seem to find a way to do
this. If I missed the archive on this subject, please post a link.

Thanks
 
I suppose you are talking about PPC behaviour that forces all dialog
windows to be full screen windows. If it's so then you may workaround it
by using SetWindowPos P/Invoke to set manually window size/position:

for dialog Load event:

this.Capture = true;
IntPtr hwnd = OpenNETCF.Win32.Win32Window.Ge­tCapture();
this.Capture = false;

OpenNETCF.Win32.Win32Window.Se­tWindowPos(hwnd, 0, this.Location.X,
this.Location.Y, this.Width, this.Height, 0);

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
 
That did not work...I didn't receive any errors, but it still filled
up the whole screen. I made it a singleton form and called it like
this:

frmForgotten.Instance().Show()

Whether that's the problem or not, do you have any other suggestions?

Thanks
 
You have to set the border type of the window to 'none', and you also have
to set its position using '= new SetBounds (xx, xx)'...something like that.
I don't have .Net studio in front of me, so I can't remember exactly what
it does.

Your best bet is to create a new project called sample or something.
Change the properties on the main form to have no border. Resize the form.
Now, go in and look at the window's generated code. Those properties will
allow you make a form that is not full screen.
 
Back
Top