dcsimg
Results 1 to 7 of 7

Thread: form size

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2013
    Posts
    33

    form size

    I created this small app on my laptop and removed the borders from the form and kept it to the maximum size allowed by visual studio that is 1370, 750.
    But when I ran the app in my computer (which has 42 inch monitor) it wasn the showing in fullscreen like it did in my laptop.. how do i set it to fullscreen no matter wat screen size the user uses??

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,242

    Re: form size

    There is no maximum size as such. It's just that the values you enter in Size are automatically edited to the screen size if you enter larger numbers. So you could do it by simply entering ridiculously high numbers into Me.Width and Me.Height in the form load event. You should be aware though that this way of doing things is not genuinely full screen in that awkward so-and-so's like me can override it to keep the taskbar visible for example. If there is no sizing and dragging capability, for us a form sized in this way is just a pain in the posterior as there will be parts of the window that we can never reach (without resetting the taskbar position). Unless you have an overwhelming reason for sizing in this way I really would suggest that you stick to maximising only.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  3. #3
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: form size

    Just set it to be maximised on startup (by setting the WindowState property to Maximised in the property section of the designer, then it will always fill the screen regardless of its size.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  4. #4
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,242

    Re: form size

    then it will always fill the screen regardless of its size.
    Er, no. It will fill the working area. The taskbar and any other reserved/fenced areas will restrict that which is not what the OP wants if he is setting at the maximum allowable size.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  5. #5
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: form size

    I guess we interpreted his question differently, as I thought that's what he wanted. He said all he did on his project was set the window to be as large as possible and that it worked correctly on his laptop - setting the form to a large size won't cover the taskbar even if the size you set is larger than the screen. So I assumed he just wants the form to fill the entire screen but not go over the taskbar as he didn't mention anything about that.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  6. #6
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,242

    Re: form size

    setting the form to a large size won't cover the taskbar
    It's so long since I used a taskbar without half a dozen customisations that I'd forgotten that. What happens with autohide? Does the window expand automatically when the taskbar 'disappears'. Genuinely can't remember. What about W8 also?
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  7. #7
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    5,638

    Re: form size

    Quote Originally Posted by Suraj S View Post
    ...But when I ran the app in my computer (which has 42 inch monitor) it wasn the showing in fullscreen like it did in my laptop..
    The size of a Form has nothing to do with the size of a monitor. The resolution set for Windows running on the PC hooked up to the 42 inch monitor is most probably higher which results in your Form looking smaller. If you raise the resolution on the laptop, you should see the same thing happening.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width