Results 1 to 19 of 19

Thread: Please test me...

  1. #1

    Thread Starter
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205

    Talking Please test me...

    I'm just writing a module to handle the resizing of forms, and scale them accurately for different screen resolutions, and for maximising small forms.

    The idea is to prevent 'whitespace' when a user clicks the maximise button, or more to the point, when screen res'es differ from design machine -> user machine.

    Can yous have a squiz at the attached module?

    Just whack it in a project, and from your Form_Load event :
    Call InitSize(Me)

    Then in the Form_Resize event:
    Call ScaleControls(Me)



    Obviously, there's a time and a place for the use of this thing, but I want input on what needs fixing - I kinda hacked this out with no real direction, so feedback is good.

    Cheers.

    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  2. #2
    Si_the_geek
    Guest

    Re: Please test me...

    Originally posted by rjlohan
    Can yous have a squiz at the attached module?

    nope, sorry... no can do!

  3. #3
    PowerPoster Arc's Avatar
    Join Date
    Sep 2000
    Location
    Under my rock
    Posts
    2,336
    You might want to actually attach the module.
    -We have enough youth. How about a fountain of "Smart"?
    -If you can read this, thank a teacher....and since it's in English, thank a soldier.


  4. #4
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Talking Someones lost the plot...Oh, I've found it.

    Hmmmmm...you win a scooby snack if you manage to post your code here within the next 30 mins, otherwise it's death for you matey.

    Note to self: Attach code...

  5. #5
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    Gee, thanks, it worked like a charm!!

    I have a suggestion though. Can you attach the code module to the next post?


    PS: OK, we have had enough fun at the expense of your oversight, so if you really post the code or attach the code to the next post, I promise to give it a try.

    And don't mind the sarcasm, I thought I would be the first to do that, but then I found that others had already done it and so there was no point in stressing the point further.

    .
    Last edited by honeybee; Feb 1st, 2002 at 04:57 AM.
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  6. #6
    Bouncy Member darre1's Avatar
    Join Date
    May 2001
    Location
    Peterborough, UK
    Posts
    3,828
    well,

    you've had 5 replies now, and no complaints of bugs yet

    well done.
    Confucious say, "Man standing naked in biscuit barrel not necessarily ****ing crackers."

    Don't forget to format your code in your posts

  7. #7

  8. #8
    Bouncy Member darre1's Avatar
    Join Date
    May 2001
    Location
    Peterborough, UK
    Posts
    3,828
    good work boys and girls
    Confucious say, "Man standing naked in biscuit barrel not necessarily ****ing crackers."

    Don't forget to format your code in your posts

  9. #9
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    OK, rj probably forgot to attach the module here, but he did so in Chit Chat, and so if any of you are serious about the testing, please visit Chit Chat.

    rj, the code seems to work alright, but I don't like the change of font in the labels. I think you did it on purpose, but if the font is changed, the label caption is completely distorted.

    Yeah, and this happens only after the form has been resized once or more times. Not on Form_Load().

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  10. #10
    Bouncy Member darre1's Avatar
    Join Date
    May 2001
    Location
    Peterborough, UK
    Posts
    3,828
    not bad!

    i agree with honeybee regarding the fonts on the label caption though.

    just an idea, what about if you could specify what it does with the controls, i.e. resizes proportionally, moves propertionally or both (you've got "both" at the mo), that would be good.

    You could also get it to check the Tag property for each control etc for strings, that you could then add functionality for in your main resizing module.

    i.e. if the control has the Tag "ignore" then just ignore that control.

    stuff like that...

    keep it up.
    Confucious say, "Man standing naked in biscuit barrel not necessarily ****ing crackers."

    Don't forget to format your code in your posts

  11. #11
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    And since .NET includes the anchor and other features (or so I have learnt) such code would be rendered useless in .Net (or so I suspect).

    Good attempt, all the same.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  12. #12

  13. #13
    Bouncy Member darre1's Avatar
    Join Date
    May 2001
    Location
    Peterborough, UK
    Posts
    3,828

    Re: Well ...

    Originally posted by honeybee
    And since .NET includes the anchor and other features (or so I have learnt) such code would be rendered useless in .Net (or so I suspect).

    Good attempt, all the same.

    .
    what's this "anchor" feature???
    Confucious say, "Man standing naked in biscuit barrel not necessarily ****ing crackers."

    Don't forget to format your code in your posts

  14. #14
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    Originally posted by darre1


    what's this "anchor" feature???
    Check out Karl Moore's articles on VB.Net. It has a feature, a couple of properties to all controls I think, which lets you 'stick' a control on the form, and it is automaticall resized/moved if you resize the form.

    This would work with simple resizing, and I don't think it provides for different resolutions.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  15. #15
    Bouncy Member darre1's Avatar
    Join Date
    May 2001
    Location
    Peterborough, UK
    Posts
    3,828
    you got a link for me then?

    please (there i said it)
    Confucious say, "Man standing naked in biscuit barrel not necessarily ****ing crackers."

    Don't forget to format your code in your posts

  16. #16

    Thread Starter
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    Ok, ha ha guys, I'm a dumbarse, thankyou.

    It'll be in this module, promise.

    Thanks for the feedback so far.

    I don't have .Net, so this is still useful to me at the moment.

    The label font doesn't actually change, it just resizes to a 'scaled' size, based on the new width/height of said label. Same with combo boxes.

    just an idea, what about if you could specify what it does with the controls, i.e. resizes proportionally, moves propertionally or both (you've got "both" at the mo), that would be good.
    Not sure what you mean. The controls will resize according to the size of said controls and the form they're in, as specified at design time. So if a button takes up 10% of the form at d-t, when you resize the form, it will still be 10%.
    At least, that's what I wanted it to do...

    Thanks again.
    Attached Files Attached Files
    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  17. #17
    Frenzied Member Mega_Man's Avatar
    Join Date
    Mar 2001
    Location
    North of England, South-East of Iceland
    Posts
    1,067
    I like it, If I were going to use it, I would probably customise it for myself but nonetheless, a very usefull piece of code.

    Mega.
    "If at first you don't succeed, then skydiving is not for you"

  18. #18
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I don't like it...

    It's too scary...everything moves and such. Like...possessed or something.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  19. #19

    Thread Starter
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    Originally posted by The Hobo
    I don't like it...

    It's too scary...everything moves and such. Like...possessed or something.
    What do you mean? The idea is that everything maintains its scale size and location when a form is resized.

    Mega -> Cheers.
    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

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