Results 1 to 5 of 5

Thread: [RESOLVED] set mouse icon code

  1. #1

    Thread Starter
    PowerPoster make me rain's Avatar
    Join Date
    Sep 2008
    Location
    india/Hubli
    Posts
    2,208

    Resolved [RESOLVED] set mouse icon code

    please advise regarding this code
    HTML Code:
    Private Sub MSHFlexGrid_LinkShower_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    
     On Error Resume Next
     Me.MSHFlexGrid_LinkShower.MousePointer = flexCustom
     
     If Me.MSHFlexGrid_LinkShower.MouseCol = 1 Then
     Set Me.MSHFlexGrid_LinkShower.MouseIcon = LoadPicture(App.Path & "/ic/edit.ico")
     Me.LBL_LABEL.Visible = True
     
     'this portion of code working fine with if col = 1
     'but if col <> 1 then the loaded picture is not unloading
     'to load other picture
     
     Else
     
     Set Me.MSHFlexGrid_LinkShower.MouseIcon = LoadPicture(App.Path & "/ic/nomouse.bmp")
     Me.LBL_LABEL.Visible = False
        End If
        End Sub

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: set mouse icon code

    Does the flexgrid accept bitmaps as the MouseIcon property? Probably not. If you remove your On Error Resume Next statement, you will probably generate the error that describes the problem instead of hiding/ignoring the problem.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    PowerPoster make me rain's Avatar
    Join Date
    Sep 2008
    Location
    india/Hubli
    Posts
    2,208

    Question Re: set mouse icon code

    i had a try , condition 1 has worked fine
    but else portion generated error 380

    Code:
     'On Error Resume Next
     Me.MSHFlexGrid_LinkShower.MousePointer = flexCustom
     
     If Me.MSHFlexGrid_LinkShower.MouseCol = 1 Then
     Set Me.MSHFlexGrid_LinkShower.MouseIcon = LoadPicture(App.Path & "/ic/edit.ico")
     Me.LBL_LABEL.Visible = True
     
     'this ^ portion of code working fine with if col = 1
     'but if col <> 1 then the loaded picture is not unloading
     'to load other picture
     
     Else
     'getting error here invalid property value "run time error 380"
     Set Me.MSHFlexGrid_LinkShower.MouseIcon = LoadPicture(App.Path & "/ic/nomouse.bmp")
     Me.LBL_LABEL.Visible = False
        End If
        End Sub

  4. #4
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: set mouse icon code

    Quote Originally Posted by LaVolpe View Post
    Does the flexgrid accept bitmaps as the MouseIcon property? Probably not.
    Use an icon not a bitmap.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  5. #5

    Thread Starter
    PowerPoster make me rain's Avatar
    Join Date
    Sep 2008
    Location
    india/Hubli
    Posts
    2,208

    Red face Re: set mouse icon code

    yes thanks for your kind advises
    solved

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