locked
Can I ONLY assign a pix to the pointer of the mouse in VB and VB UserForms and NOT in VBA? RRS feed

  • Question

  • I had two info notes. One referred to setting pointer to 99 and then could assign a pix to the pointer of the mouse.

    Other loaded an icon file, form with listbox two command button with code to change pix of mouse pointer to and from the default pix.

    I seem to recall that Microsoft had an "extra cost fun pack". Sort of like the themes, like for Halloween the desktop pix was a haunted house, the default mouse pointer was a skeleton hand sounds for system events like "close" had a Halloween twist to the sound.  Might have been for Win98


    Mark J

    Monday, August 15, 2016 9:24 PM

Answers

  • Hi PuzzleByWord,

    Yes, Mouse Icon and Mouse Pointer are only available in the User Form.

    these options are not available in the Form in Access.

    but the similar option for Mouse Pointer in Access is Cursor on Hover.

    but it have only 2 options. (1) Default (2) Hand Cursor

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by PuzzledByWord Friday, August 26, 2016 4:51 AM
    Friday, August 26, 2016 2:13 AM

All replies

  • Hi Mark. Not sure how you're doing it in VB  but if you're using API, then it should also work in VBA.
    Monday, August 15, 2016 9:27 PM
  • theDBguy,

    Sorry I was not clear.

    I was not able to do this in VB or VBA and not sure how to find out how to use API for this.

    I only had copy of Microsoft example for a Listbox, While learning about ListBoxes I Never even tried  to fill, and get one or all items boxes, use code due to needed a "icon file" that seemed to have more than one pix in the file. Seemed file was only for someone with a subscription to MSDN.

    I was unable to figure out to have more than one pix in a file. At the time I copied the note, was about sometime in 2010 or before.

    Mark J


    Mark J

    Monday, August 15, 2016 10:14 PM
  • Hi Mark. Can you describe exactly what it is you're trying to accomplish? If you're talking about something you downloaded or copied, can we see it please? Thanks.
    Tuesday, August 16, 2016 1:53 AM
  • Hi Puzzledbyword,

    First of all I want to confirm you are codding using VB.Net or using VBA in VBE.

    you had mentioned about the User Forms. in which Application you create this Form? Access?

    you are talking about Win98.

    here I inform you that support till office 2003 had already closed.

    in the os support for win xp is closed.

    so first please confirm and clear all the environments and provide us some more detail regarding your issue.

    I am not able to understand with description you had mentioned above.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, August 16, 2016 4:55 AM
  • Deepak

    I did find more info.   found my notes, notes dated from before 7/1/2010 so took awhile to find.

    did find part of code that was part of UserForm initialize event

    in my limited experience, so far, I can ONLY have a UserForm initialize event in a product that allows adding a "UserForm" to a project.

    in my version of Access I can insert a standard module or a class module but NOT a UserForm.

    But I can insert a UserForm in word and excel all I have to do is click on Developer on the
    Ribbon. then click on Visual Basic, then click on Insert on ribbon then pick Procedure or Userform or Module or Class Module.  Just checked EXACT STEPS TO GET TO SAME SPOT IN Excel.

    I am using Win7 Ultimate 64 bit, Office Pro 2013 64 bit  That came with Access, Excel and Word.

    The heading from Microsoft was MousePointer and MouseIcon Property

    that sample code  did use object.LoadPicture

    the only other recent code I found dealing property of both items was  in Microsoft sample code page using C++ and maybe and API call.

    by the way part of the code referenced setting the MousePointer  value to 99  (I was able to do 5 minutes ago in word) that in a "UserForm" in the property window.  a value of 99 displays  fmMousePointerCustom

    I hope this added info makes my post clearer.

    the reference to older code was only an attempt to demonstrate or explain what I am trying to do.


    Mark J

    Thursday, August 18, 2016 8:54 AM
  • Here are the API calls to load a cursor file for VBA.

    Note that the file must be in the Windows .CUR or .ANI format.

    Matthias Kläy, Kläy Computing AG

    Thursday, August 18, 2016 1:35 PM
  • Hi puzzledbyword,

    you had mentioned,"in my version of Access I can insert a standard module or a class module but NOT a User Form."

    Access gives you the feature to create a Form by user interface so there is no need to create a user form in VBE.

    in other Applications there is no any kind of feature to add form by user interface so they give feature to create user form via VBE.

    so there is no way to create a user form in VBE for Access.

    here I want to confirm with you that are you trying to use the code mentioned in the link below? 

    MouseIcon, MousePointer Properties Example

    if yes then I want to inform you that example code is general example for all office applications.

    its not specific with Access Application.

    so may be because of this reason you get confused that the example is working in other applications but not working in Access.

    The reason is as I informed you above Access doesn't have feature of User Form.

    so to run that example in Access you can create a Form by User interface and you can use the "On Load" event of the Form.

    the code that is inside the UserForm_Initialize() you need to copy it and paste it inside the "On_load" Event.

    after that you will able to run that example in Access also.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 19, 2016 5:22 AM
  • Deepak,

    The link is ALMOST an exact copy of my copy of the page per my recall.

    I do NOT have my copy of the example with me.

    BUT at this time I am sure there was more.  Something like before this will work you must set two properties on a property sheet BEFORE this will work.

    I now know where two copies of this example are.

    I will make a very careful check of what I think was extra settings that must be made, THAT DO NOT SHOW ON THIS PAGE of link. 

    and make a very careful copy of those extra settings, one I found the other I did not find.

    I will get the extra info to you as soon as I can.

    Mark J


    Mark J

    Sunday, August 21, 2016 5:39 AM
  • Hi puzzlebyword,

    if you provide link or demo code to reproduce the issue then it is better for us to understand your issue.

    so that we can try to provide you a suitable suggestion to solve your issue.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, August 22, 2016 5:55 AM
  • Deepak,

     This link of yours

    MouseIcon, MousePointer Properties Example

    is ALMOST exact copy of my copy in my notes.

    ONLY difference I could see was in MY copy a MSDN NOTE or REMARK before the sample code.

    Note was to Use "MouseIcon" I had to set MousePointer to fmMousePointerCustom FIRST.

    Yes that was done in code of your link and my copy.

    I did find "MouseIcon" and "MousePointer" in a "UserForm" in Word and Excel in the property sheets. (I didn't check other Office Products).

    I did NOT find either "MousePointer or MoueIcon"  in Access for a command button or a form or a form detail.

    I thought I could change anything I found in a "property sheet" in code using VBA.

    BUT, if I didn't find what I wanted in a "property sheet" then I could not change in VBA.

    Creating this Question.

    Sorry about the delay in my response, I had some difficulty in getting back sooner. a problem reoccurred,  one sip of plain water would and did make me incapable of doing anything for 6-8 hrs, and afterwards too weak to do much of anything. Even look for or at my notes on this. This, first day up so, first day I could respond.

    Mark J


    Mark J

    Thursday, August 25, 2016 8:39 AM
  • Hi PuzzleByWord,

    Yes, Mouse Icon and Mouse Pointer are only available in the User Form.

    these options are not available in the Form in Access.

    but the similar option for Mouse Pointer in Access is Cursor on Hover.

    but it have only 2 options. (1) Default (2) Hand Cursor

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by PuzzledByWord Friday, August 26, 2016 4:51 AM
    Friday, August 26, 2016 2:13 AM
  • Deepak,

    Thank you for getting back to me with the answer.

    it is a kind of good new bad news thing I guess.

    good I was not missing something that was in plain sight.   and bad news was I couldn't find because it wasn't there in the first place.

    Thanks again.

    Now I won't be wasting time trying to find or do something not possible.

    Mark J


    Mark J

    Friday, August 26, 2016 4:51 AM