Results 1 to 17 of 17

Thread: change cursor

  1. #1

    Thread Starter
    Banned
    Join Date
    Nov 2005
    Posts
    22

    Post change cursor

    is it possible to change the mouse cursor to a Bmp, JPG or GIF?

    would this be considered "malware"? if so delete this thread

    thanks

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: change cursor

    You can use an Icon or a Cursor file. Just set the MousePointer property of your Form to 99 - Custom and load a cursor or an icon file in the MouseIcon property.

  3. #3
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: change cursor

    It only stays in effect while your app is running, so it's not malware

  4. #4

    Thread Starter
    Banned
    Join Date
    Nov 2005
    Posts
    22

    Re: change cursor

    ok, so do you know how to do it?

  5. #5

    Thread Starter
    Banned
    Join Date
    Nov 2005
    Posts
    22

    Re: change cursor

    but i want it to just load a JPG or BMP, if possible. If its not, how would i make a cursor file or an icon file? besides using paint

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: change cursor

    You can use either Visual C++ or Microangelo to create icons.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: change cursor

    I bought Microangelo when I needed icon files. It is a great program.

  8. #8
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: change cursor

    Animated cursors are the best.

  9. #9

    Thread Starter
    Banned
    Join Date
    Nov 2005
    Posts
    22

    Re: change cursor

    well i made a cursor with microangelo trial, and now how do i set it on VB? i only want it if the program is open. is it possible to make it so i dont have the cursor when i send the program to people? and one last thing: if i make it the form pointer, wont it only be when the mouse is over the form?

  10. #10

    Thread Starter
    Banned
    Join Date
    Nov 2005
    Posts
    22

    Re: change cursor

    also, the cursor has a big white box around it, how do i get rid of it?

  11. #11
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: change cursor

    Microangelo has a color named screen which will be transparent.

  12. #12
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: change cursor

    Since a cursor is a shared resource you shouldn't change the cursor for other applications. It also depends on what cursor type you want to change, since there are many cursor resources loaded by Windows (normally 14).

    However if you are interested there are a couple of different API functions you can use to change the cursor. SetCursor is one (which is what VB use internally when you use a custom MouseIcon) and this function changes the current used cursor to use your cursor even for other applications (VB changes back the cursor when the mouse leave the window borders). SetSystemCursor is another function that is the same as opening the Mouse control panel applet and physically change one of the cursors. This is a system wide change that will destroy the earlier used cursor (not recommended).

  13. #13

    Thread Starter
    Banned
    Join Date
    Nov 2005
    Posts
    22

    Re: change cursor

    so there is no other way?

  14. #14

    Thread Starter
    Banned
    Join Date
    Nov 2005
    Posts
    22

    Re: change cursor

    any other way to do it at all?

  15. #15
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: change cursor

    Windows allows you to change the cursor using the functions I mentioned above. You can of course hide the actual cursor and monitor the cursor position to move and show whatever image you want. But if you want to change the real cursor that is used you can not do it in any other way then the ways Windows allows you to...

  16. #16

    Thread Starter
    Banned
    Join Date
    Nov 2005
    Posts
    22

    Re: change cursor

    yes, how would i do what you mentioned above?

  17. #17
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: change cursor

    Quote Originally Posted by GarrettDori
    any other way to do it at all?
    Yep there sure is:

    http://www.vbforums.com/showthread.p...42#post2248742

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