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

Thread: VB6-MouseWheel With Any Control

  1. #41
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,817

    Re: VB6 - MouseWheel with Any Control (originally just MSFlexGrid Scrolling)

    Quote Originally Posted by VanGoghGaming View Post
    If you really want to experience the crash yourself, it's very easy to replicate. Slap a "Microsoft InkEdit Control" on a form, subclass it with your favorite method, don't even need to write any additional code, press F5 to run the project, close the form, the IDE will crash. To avoid the crash, unsubclass it explicitly.

    Just because unsubclassing on "WM_DESTROY" works for most controls doesn't mean it's a good practice but to each his own I guess...
    I did spend a bit of time looking at the InkEdit control, and apparently it doesn't issue a DestroyWindow call when the form it's on is destroyed. IMO, that's a bug in the InkEdit control, and a possible memory leak. I Googled, and apparently there some degree of discussion about this bug in the InkEdit control. Furthermore, this is the first time I've seen such a bug in a user control (as destroying any created hWnd is sort of a "first order of business" when writing such controls).

    ----------

    So, a couple of thoughts:

    1) I don't see a reason to generally change my style of subclassing because of a bug in one specific control. I've never used the InkEdit control, but, if I ever do, and I also wish to subclass it, I'll try and remember this.

    2) We're getting pretty far afield from the subject of this thread. So, if you (or anyone) wishes to discuss this further, I'd recommend starting a new thread over in the regular Q&A area.
    Last edited by Shaggy Hiker; Feb 5th, 2023 at 10:48 PM. Reason: Cleaned up after the other post was cleaned.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  2. #42
    Lively Member
    Join Date
    Jan 2008
    Posts
    67

    Re: VB6 - MouseWheel with Any Control (originally just MSFlexGrid Scrolling)

    Quote Originally Posted by bushmobile View Post
    subclassing works fine in the IDE (and the exe) unless the normal program flow is interrupted - for example, by pressing the stop button or attempting any runtime debugging.
    Is it not possible to capture the events of pressing the stop button or attempting any runtime debugging that does to remove hook at that moment?

    Some message or event has to happen when the stop or debug button is pressed.

  3. #43
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: VB6 - MouseWheel with Any Control (originally just MSFlexGrid Scrolling)

    Page 2 of this thread has been damaged in some way. The posts on page 1 are accessible, as are the posts on this page, but those on page 2 will probably never be. Whether or not this can be cleaned up remains to be seen.
    My usual boring signature: Nothing

  4. #44
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: VB6-MouseWheel With Any Control

    In an attempt to clean up the corrupted portion of page 2, I managed to screw up the entire thread. Fortunately, it was still in the buffer, so I moved all the posts that were good over to a new thread. I couldn't move the original post, as that would effectively move the entire thread...including the corruption, which then spread to the entire thread.

    Therefore, I moved the contents of the first post of the old thread into the first post of the current thread, which was the second post of the old thread.

    The posts that were on the second page are now lost, and almost certainly will remain so. Hopefully, there was nothing too important on there.
    Last edited by Shaggy Hiker; Apr 21st, 2023 at 10:12 AM.
    My usual boring signature: Nothing

  5. #45
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,817

    Re: VB6-MouseWheel With Any Control

    Thanks Shaggy. We (or definitely I) absolutely appreciate all you do.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  6. #46
    Lively Member
    Join Date
    Jan 2008
    Posts
    67

    Re: VB6 - MouseWheel with Any Control (originally just MSFlexGrid Scrolling)

    Quote Originally Posted by James Reynolds View Post
    Is it not possible to capture the events of pressing the stop button or attempting any runtime debugging that does to remove hook at that moment?

    Some message or event has to happen when the stop or debug button is pressed.
    I think I find the answer, is in a code of VbAccelerator, here I put code of VBAccelerator and Work perfect, not crash the IDE when Pres Stop Button and also Permit Debug, and is very Flexible and Easy to implement in Any Form or Control, you can subclass what you want with the messages you want to intercept, and the funny thing is that the code is from VBAccelerator from 2004!!!

    Here I put the VBAccelerator codes:
    https://www.vbforums.com/showthread....60#post5602660
    (In the message #53)
    Last edited by James Reynolds; Apr 21st, 2023 at 11:14 PM. Reason: Link Error

  7. #47
    Lively Member
    Join Date
    Jan 2008
    Posts
    67

    Re: VB6-MouseWheel With Any Control

    Sorry, not find how erase a message

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