Results 1 to 40 of 47

Thread: VB6-MouseWheel With Any Control

Hybrid View

  1. #1

    Thread Starter
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

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

    ok, was fairly simple when managed to get my hands on VB

    Don't call the PictureBox 'Picture' - it's a reserved word - i renamed it picMain and then changed this part of the Select Case:
    VB Code:
    1. Case TypeOf ctl Is PictureBox
    2.             If Not ctl Is picMain Then
    3.                 PictureBoxZoom ctl, MouseKeys, Rotation, Xpos, Ypos
    4.             Else
    5.                 bHandled = False
    6.             End If

  2. #2
    Junior Member
    Join Date
    Aug 2006
    Posts
    18

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

    GREAT
    I think I have still to study and practise alot

    Thank you very much Bushmobile!

  3. #3
    New Member
    Join Date
    Aug 2006
    Posts
    2

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

    Hi bushmobile,

    I used your mousewheel code in an existing VB6 app and it worked fine. I altered it slightly because I'm using an MSHFlexgrid instead of an MSFlexgrid. I'm running into another problem though. In my MSHFlexgrid I list rows of invoices, some billed and some unbilled. The user has options to list all invoices, only billed invoices or only unbilled invoices. When the user takes the option to list only billed invoices, the program loops through the grid row by row and sets the .rowheight = 0 for those rows that are unbilled and and sets the .rowheight = -1 for rows that are billed. This code works great for hiding rows but for whatever reason, once the routine completes, the mousewheel no longer works on the grid. I tried all kinds of things to figure out where the problem is and everything seems to point to setting the rowheight to 0. I tried setting the rowheight to like 50 and that worked but it looked ugly. Any thoughts?

    Thanks.

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

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

    Quote Originally Posted by qvqnytowl
    everything seems to point to setting the rowheight to 0. I tried setting the rowheight to like 50 and that worked but it looked ugly. Any thoughts?
    How about not loading the grid with the records you don't want displayed? Are you loading it from a database? If so, the solution is simple - a Where clause in your select statement.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

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