Results 1 to 9 of 9

Thread: creating a simple gui

  1. #1

    Thread Starter
    New Member zenimpulse's Avatar
    Join Date
    Jun 2002
    Location
    New York
    Posts
    8

    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

  2. #2
    New Member
    Join Date
    Jun 2002
    Posts
    2
    In your case, you may want to set 2 form properties.

    WindowState = Maximized,
    MaximizeBox = False

  3. #3

    Thread Starter
    New Member zenimpulse's Avatar
    Join Date
    Jun 2002
    Location
    New York
    Posts
    8
    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?

  4. #4
    Addicted Member wolfofthenorth's Avatar
    Join Date
    Jan 2001
    Location
    Tatooine
    Posts
    169
    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.


    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.
    That which does not kill us, only makes us stronger.

  5. #5

    Thread Starter
    New Member zenimpulse's Avatar
    Join Date
    Jun 2002
    Location
    New York
    Posts
    8
    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 ??

  6. #6
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    .FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  7. #7

    Thread Starter
    New Member zenimpulse's Avatar
    Join Date
    Jun 2002
    Location
    New York
    Posts
    8
    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)

  8. #8
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    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...
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  9. #9

    Thread Starter
    New Member zenimpulse's Avatar
    Join Date
    Jun 2002
    Location
    New York
    Posts
    8
    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width