-
creating a simple gui
hi all
sorry for the basic question, but i'm really looking for some advice. I want to set up a simple "test" app, consisting of a start screen, varius forms, and finally, a survey. I'm getting bogged down w/ "minor" things- whats the best way to have all the forms maximized, locked so they cant be resized or moved, and all keyboard shortcuts disabled unless i explicitly enable them for the app.
this "test" app will have multiple forms, so getting the basic gui down is kinda clutch. From there it's just pluggin in what i need. Any advice or help is greatly appreciated...
thanks
-Patrick
-
In your case, you may want to set 2 form properties.
WindowState = Maximized,
MaximizeBox = False
-
i did this, but you can still move the window around. I also tried locked (both t and f) and that didnt work...
also- whats the best way to design a form that will be full screen? Set the height and width? Or just change the design environment so the form is the actual size you want it to be?
-
I completely agree with 555
Put these lines in the form's load event. Or set the properties in the property window.
Me.WindowState = FormWindowState.Maximized
Me.MaximizeBox = False
Setting the WindowState property is the easiest way to make the form full screen, and it will make it so the form is unmoveable. You will have to disable the maximize button so the user can't restore the form to normal and then move or resize it on you. Just like 555 said.
:D
If you did set these properties and you can still move the form, then something very unusuall is happening. Attach your project and maybe someone can help figure out what is happening.
-
i dont know whats going on, but i created a new windows app, set the properties as said (Windows State- maximized/ Maximize box- false) and you can still move the window around!!!
also, i dont want the max, min and close buttons even visible!
how can i and which files should i attach? It doesnt allow the project or form1 ??
-
.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
-
thanks a million- i wonder why setting the other things didnt do it? (i copied the previous code, and it worked perfectly!)
now....how can i disable all keyboard shortcuts???
(Thanks again for all the reply's and help)
-
ugh.disable all shortcuts? That would be chore because other than 'listening' and capturing keyboard events, you would have to manually code each combination to look for..and im sure there are quite a few...
-
hmm, thats something i'll have to look into some more
---one last thing (sorry for all the nu-b questions!)
i want the app to be in maximized format; whats the best way to design each form? (meaning- should i make each form maximized in design mode, or is there some other, more efficient way to accomplish this?