Results 1 to 30 of 30

Thread: [RESOLVED] WithEvents (or something like it)

Threaded View

  1. #1

    Thread Starter
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    10,910

    Resolved [RESOLVED] WithEvents (or something like it)

    See post it in the codebank, here for the solution I wound up using.



    Here's the problem I'm trying to work out:

    • I've got a form with MANY labels on it, most being a few different control arrays.
    • This form must be allowed to be dragged around by any "gray space" including any label, rather than just the title bar.
    • I'd like to build a "generic" routine I call to get this "dragging" job done. It will monitor for dragging of the form, any labels, and other specifically specified controls. But I'd like to NOT have to specifically specify the labels.
    • If possible, I'd like to accomplish this without sub-classing, as I often still debug these forms and enjoy being able to click the IDE STOP button while working on them.


    Any/all ideas on how to get this accomplished would be greatly appreciated. Above, I said "I've got a form" that needs this. In reality, I've got several, with more to come, and I'm tired of attaching mouse_down events to all the labels on the form each time I do this. It'd be much better if I could just call a generic routine and have it all done for me.

    Thanks In Advance,
    Elroy

    p.s. The "dragging" part is not the problem. It's having a generic routine that can catch the events of all the labels on the form, even when some of those labels are control arrays.
    Last edited by Elroy; Apr 12th, 2017 at 01:05 PM.
    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.

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