Results 1 to 21 of 21

Thread: Form size problem ??!?!

  1. #1

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Form size problem ??!?!

    I have compiled a project which uses MDI forms.
    On my machine and numerous others it looks fine when you start it up.
    There are, however, a few PC's which decided to put a vertical and horizontal scroll bar on the screen implying the form is too big ?!?!

    Its not a screen resolution issue, as we all running 1024 x 768, and they don't have any extra toolbars that would take up space, so I am confused as to why these scrollbars appear on some of these PC's

    Anyone had a similar experience ?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Form size problem ??!?!

    Shot in the dark...are all the monitors the same size?

  3. #3

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Re: Form size problem ??!?!

    ha ha .... yes they are !

    All flat panel 17" monitors

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Form size problem ??!?!

    Doesnt it have something to do with the Desktop Settings?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  5. #5
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: Form size problem ??!?!

    It depends where the MDI Child form is opening. If it's right edge or bottom edge goes out of screen area, teh scroll bars would appear. So try to position the MDI child when it loads or set its Startup Position at design time to prevent this problem.

    Pradeep
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  6. #6

  7. #7

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Re: Form size problem ??!?!

    Quote Originally Posted by MartinLiss
    Put this someplace after the forms load. Are the results the same?

    VB Code:
    1. MsgBox Me.ScaleWidth
    2.     MsgBox Screen.Width
    OK I tried this and got the following results ....

    MDIMASTER.Screenwidth = 15360
    MDIMASTER.Scalewidth = 11145

    Therefore no, they are not the same. Bear in mind this is on MY PC, which is one of the PC's that DOESN'T get the scrollbar problems.

    [update]
    Just tried it one PC that does put the scrollbars on the screen, and the measurements are the same ?!?!!
    [/update]

    Would I expect to see a difference there ?

  8. #8
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Form size problem ??!?!

    Maybe different drivers?

  9. #9

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Re: Form size problem ??!?!

    Would display drivers really cause this ?
    I would have thought that would mean ANY app going on a PC could cause problems if thats the case.

  10. #10
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Form size problem ??!?!

    I've seen problems with laptop screens, and a few flat display screens.
    I also get strange color reproduction going from an XP laptop to an old 14" monitor running on W2K Pro. vbRed is vbBlue on the desktop. I think it's the 32 bit color on the laptop, though, but you'd think that Blue was Blue.

  11. #11

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Re: Form size problem ??!?!

    Ah I see what you mean now.
    I don't think display drivera are an issue though, as these PC's are all desktops, and although the monitors are slightly different (some black, some brown), they are all Samsung 17" models, and the base units are all the same make and mostly the same type as well.
    I think I may have to just "shrink" things down a touch in my project to allow for this problem.
    Thats annoying though, as its going to take time, and I hate not knowing the cause of something as it will now inevitably happen again.

  12. #12
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Form size problem ??!?!

    Have you tried swapping hardware around as a test?

    For instance, take your CPU over to someplace that has a problem, and hook their monitor up to your box. Or, take your monitor and hook it up to their box.

    I'm not really sure what the outcome would be, but it would be another test that may show something interesting.

  13. #13

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Re: Form size problem ??!?!

    Sort of.

    It seems none of it works if you kick it out of the upstairs window !

    I'm going to grab the disk from my other PC, set my existing disk to slave, spark it up and get off what I need, then reinstall Windows, or maybe even go the whole hog and re-format everything.
    Took me AGES to build up my p*rn collection too

  14. #14
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Form size problem ??!?!

    Quote Originally Posted by TheBionicOrange
    Took me AGES to build up my p*rn collection too
    Sometimes sacrifices must be made in order to further the common good.

  15. #15

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Re: Form size problem ??!?!

    Yeah but 40 gigs worth of sacrifice is a LOT of sacrificing

  16. #16
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Form size problem ??!?!

    Quote Originally Posted by TheBionicOrange
    OK I tried this and got the following results ....

    MDIMASTER.Screenwidth = 15360
    MDIMASTER.Scalewidth = 11145

    Therefore no, they are not the same. Bear in mind this is on MY PC, which is one of the PC's that DOESN'T get the scrollbar problems.

    [update]
    Just tried it one PC that does put the scrollbars on the screen, and the measurements are the same ?!?!!
    [/update]

    Would I expect to see a difference there ?
    Those aren't the same parameters I suggested you look at.

  17. #17
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: Form size problem ??!?!

    Just as I said in my earlier post, the scrollbars appear when one of the Child forms extend out of the scree area. So put this code in your form_load event of all child forms and the problem will be gone for ever.
    VB Code:
    1. Me.Move 0, 0      'Align to top left corner

    EDIT: To test just what I said, try dragging the mdi child form to the bottom right corner of the screen on the system where you are not getting the scroll bars, the scroll bars would appear.
    VB has a tendency to place the next loaded child form a bit shifted to the bottom right corner than the earlier child form.

    Pradeep
    Last edited by Pradeep1210; Jul 12th, 2005 at 02:24 AM.
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  18. #18

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Re: Form size problem ??!?!

    Nice idea Pradeep ... but thats not actually the affect I am after.

    When my app starts I have an MDI Master showing 2 MDI child forms.
    The first MDI child form is a bank of buttons in a column down the left hand side.
    The second MDI child form is a slim top-to-bottom of MDI master form on the right hand side.
    Any buttons pressed from the form on the left then show another MDI child in the space in the middle.
    I think this has got to be down to some kind of desktop setting, as mentioned earlier I think.
    Its only out a touch, and only on some PC's, but its enough to make these scroll bars appear.
    I think my only option is to go back into the project and shrink things a fraction.

    Thanks for the input though by everyone ... much appreciated.

  19. #19
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: Form size problem ??!?!

    You mean you have 2 MDI Child forms on either side of the MDI Parent window and you want to show all the rest of MDI Childs in the space between them?

    Pradeep
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  20. #20

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Re: Form size problem ??!?!

    Not quite ... I have 2 MDI child forms WITHIN the MDI master form, one on the left hand side and one on the right.
    The space between them is used for a 3rd MDI child form as and when they start clicking buttons.
    It is easier if I supply a screenshot ?

  21. #21
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: Form size problem ??!?!

    Quote Originally Posted by TheBionicOrange
    Not quite ... I have 2 MDI child forms WITHIN the MDI master form, one on the left hand side and one on the right.
    The space between them is used for a 3rd MDI child form as and when they start clicking buttons.
    It is easier if I supply a screenshot ?
    No, I got your point..
    You have MDI Child1 (vertical toolbar type), then the 3rd child form, then again an MDI Child form (vertical toolbar type) on the right.

    I think the approach is wrong.
    Instead put 2 picture boxes on MDI form one with Align=Left and other with Align=Right and put your buttons on them. Ths would replace your 2 MDI child toolbartype forms. Whenever you want to hide these two toolbars, just set the visible property of that picture box to true.

    Pradeep
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

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