Page 2 of 2 FirstFirst 12
Results 41 to 59 of 59

Thread: Form Question - About Min and Max

  1. #41

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Form Question - About Min and Max

    Well it didn't work fine for me. I almost jumped out of my chair when I saw the results.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  2. #42
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: Form Question - About Min and Max

    So what happened?

    When I tested it it simply prevented the window from minimizing or maximizing when you clicked the buttons, not even a flicker.

    If it didn't work for you then something must be different. Would be good to tell us what happened and show us what code you used if you want to peruse it.

    Of course you could cheat and just display and image of the buttons that doesn't do anything

  3. #43

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Form Question - About Min and Max

    I used the code you posted. When I click on Max it zooms up to full screen then zooms back down to normal. When I click on Min it zooms to the task bar then comes back to normal. I'm using XP on, I guess a slow PC - 930 Mhz and 256 MB Ram. Maybe that's got a lot to do with it what do you think?


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  4. #44
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: Form Question - About Min and Max

    I guess. I tested on XP SP3 but on a Quad core 3.2ghz with 4gigs of ram and a high end video card,

    Did not even flicker when I tested it here.

    256 megs of ram is very low for XP, I don't think i have ever ran it with less than 512 on any system
    Do you have shared video on it as well?

  5. #45
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: Form Question - About Min and Max

    Here's XP 2 GHz and 512 ram and flickers a little
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  6. #46
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    6,748

    Re: Form Question - About Min and Max

    Code:
    Private Sub Form_Resize()
      If Me.WindowState <> vbNormal Then Me.WindowState = vbNormal
    End Sub
    With this code you will always see something happening on the screen.
    Because before the WindowState needs to be set to vbNormal it first has to have another state.
    All depends on the version of windows and the windows animations what you will see on the screen.

    Just use the method provided by Bonnie.

  7. #47
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: Form Question - About Min and Max

    Quote Originally Posted by jmsrickland View Post
    I used the code you posted. When I click on Max it zooms up to full screen then zooms back down to normal. When I click on Min it zooms to the task bar then comes back to normal. I'm using XP on, I guess a slow PC - 930 Mhz and 256 MB Ram. Maybe that's got a lot to do with it what do you think?
    Doesn't surprise me. Like I said before, it won't be clean. Bonnie's subclassing method should be clean though since it supposedly discards the message before it has a chance to produce any effect.
    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

    Copy/move files using Windows Shell | I'm not wanted

    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

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  8. #48
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: Form Question - About Min and Max

    Hard for me to imagine having to develop on a PC as slow as the one in post #43

    In the last 8 years I have given away 4 PCs that were quite a bit stronger than that.

    The good thing about a slow pc without much ram is that if your software works on it then it should work on anything the customer has.

    For a long time I used a P3 600mhz system for that reason but eventually replaced it with a P4 2.8ghz which is the slowest PC I own at the moment and is being taken out of service as it too is to slow, it is after all over 10 years old.

  9. #49
    Frenzied Member
    Join Date
    Apr 2012
    Posts
    1,272

    Re: Form Question - About Min and Max

    Quote Originally Posted by Niya View Post
    Bonnie's subclassing method should be clean though since it supposedly discards the message before it has a chance to produce any effect.
    What he said. That's the bullet-proof way of avoiding flicker - eat the message!
    If you don't know where you're going, any road will take you there...

    My VB6 love-children: Vee-Hive and Vee-Launcher

  10. #50
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: Form Question - About Min and Max

    Quote Originally Posted by DataMiser View Post
    Hard for me to imagine having to develop on a PC as slow as the one in post #43
    I don't think you can even buy a PC that slow anymore. That's like what cavemen used.
    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

    Copy/move files using Windows Shell | I'm not wanted

    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

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  11. #51

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Form Question - About Min and Max

    I have had this PC since the days of Win95 or Win98, not sure. I have never had a reason to buy a new one. Someday I will but not yet


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  12. #52
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: Form Question - About Min and Max

    Quote Originally Posted by jmsrickland View Post
    I have never had a reason to buy a new one. Someday I will but not yet
    What do you use that for ? NotePad ?
    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

    Copy/move files using Windows Shell | I'm not wanted

    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

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  13. #53

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Form Question - About Min and Max

    Funny, ha ha. It does what I need, runs well, never had a problem with it. All I have ever done was to upgrade OS's, add a DVD drive, add a nice graphics adapter as well as a nice sound card. Fast enough for me, my graphics are just fine, my Internet is fine, everything is just fine.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  14. #54
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: Form Question - About Min and Max

    Hmm....well I like to play games from time to time and a system that primitive won't run any game I have except for Doom. I suppose if you're just using it for office stuff, surfing the internet, programming and watching videos even a 133 MHz would suffice.
    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

    Copy/move files using Windows Shell | I'm not wanted

    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

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  15. #55

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Form Question - About Min and Max

    I don't get into games unless I write them then it's never a game where speed counts


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  16. #56
    Member lmstearn's Avatar
    Join Date
    Dec 2016
    Location
    Australia
    Posts
    58

    Re: Form Question - About Min and Max

    Had to reduce the Power Plan for this rig as it has to be left on for the hibernate not working. So not too far off the 133 Mhz. :P
    @Bonnie West, thanks for the code.
    Just a couple of things with forms without control boxes, I think SC_RESTORE is default so:
    Code:
     Select Case wParam And GWL_STYLE
    Case SC_CLOSE, SC_MAXIMIZE, SC_MINIMIZE', SC_SIZE 'works too, but not so well with Aero Snap
    And if the subclassing is attempted before the form is shown, it won't work at all.
    The IDE Edit & Continue debugging says no to it as well (verification?). All IDE actions are "suspended" but for the F5 continuation. So might be an idea to disable it when running the IDE.
    Last edited by lmstearn; May 26th, 2019 at 06:39 AM.

  17. #57
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: Form Question - About Min and Max

    133mhz! I do not think I have saw anything that slow since the mid 90s

  18. #58
    Member lmstearn's Avatar
    Join Date
    Dec 2016
    Location
    Australia
    Posts
    58

    Re: Form Question - About Min and Max

    And JMS has upgraded the OS on it as well. It has to be some kind of record to be running W8-W10 on it, unless you are permanently in safe mode.
    Another ghost from the 90's: MCI! My code uses MCI through a timer which works well enough, but sometimes when applying SC_MAXIMIZE on the subclassed form in XP (just for fun you understand), sometimes pops out this mysterious and wonderful thing, the MCI Command Window.
    Nothing much Google throws up on this pure white & wondrous fixture which encompasses the whole screen (SC_MAXIMIZE you know) with nothing on it but MCI Command Window in the title bar. A command window sans the console- certainly an undocumented feature!
    Last edited by lmstearn; May 27th, 2019 at 07:30 AM.

  19. #59
    Lively Member
    Join Date
    May 2017
    Posts
    81

    Re: Form Question - About Min and Max

    To sum up:
    Name:  slide_9.jpg
Views: 171
Size:  40.6 KB

Page 2 of 2 FirstFirst 12

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