msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MousePointer

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB General Discussions
Author Message
LondonLad



Joined: 04 Oct 2007
Posts: 31

PostPosted: Mon Feb 25, 2008 2:18 pm    Post subject: MousePointer Reply with quote

Hi
I am using the CommonDialog.ShowPrinter when the user clicks on the Print
Button I want to set the MousePointer to 11 (Hour Glass) and after .Enddoc
revert to MousePointer 0.
Can anyone help please?

Archived from group: microsoft>public>vb>general>discussion
Back to top
View user's profile Send private message
Mike Williams



Joined: 04 Oct 2007
Posts: 1309

PostPosted: Mon Feb 25, 2008 10:42 pm    Post subject: Re: MousePointer Reply with quote

"LondonLad" wrote in message @microsoft.com...

> I am using the CommonDialog.ShowPrinter when the
> user clicks on the Print Button I want to set the
> MousePointer to 11 (Hour Glass) and after .Enddoc
> revert to MousePointer 0.

Dim p1 As Long
CommonDialog1.ShowPrinter
p1 = Me.MousePointer
Me.MousePointer = 11
Printer.Print "Hello World"
Printer.EndDoc
Me.MousePointer = p1

Mike
Back to top
View user's profile Send private message
Bob Butler



Joined: 04 Oct 2007
Posts: 1081

PostPosted: Mon Feb 25, 2008 3:14 pm    Post subject: Re: MousePointer Reply with quote

"Mike Williams" wrote in message $KGX9dIHA.536@TK2MSFTNGP06.phx.gbl...
> "LondonLad" wrote in message
> @microsoft.com...
>
>> I am using the CommonDialog.ShowPrinter when the
>> user clicks on the Print Button I want to set the
>> MousePointer to 11 (Hour Glass) and after .Enddoc
>> revert to MousePointer 0.
>
> Dim p1 As Long
> CommonDialog1.ShowPrinter
> p1 = Me.MousePointer
> Me.MousePointer = 11

I'd use: Me.MousePointer = vbHourglass

and I've found that it often needs a "Me.Refresh" and/or "DoEvents" to take
effect

> Printer.Print "Hello World"
> Printer.EndDoc
> Me.MousePointer = p1
>
> Mike
>
>
Back to top
View user's profile Send private message
Mike Williams



Joined: 04 Oct 2007
Posts: 1309

PostPosted: Mon Feb 25, 2008 11:50 pm    Post subject: Re: MousePointer Reply with quote

"Bob Butler" wrote in message @TK2MSFTNGP04.phx.gbl...

>> Me.MousePointer = 11
>
> I'd use: Me.MousePointer = vbHourglass

Doesn't really matter because I have a feeling it's not the answer the OP
wanted anyway. I just threw it in as a "quickie" to start the ball rolling
Wink

Mike
Back to top
View user's profile Send private message
MikeD



Joined: 04 Oct 2007
Posts: 3348

PostPosted: Tue Feb 26, 2008 12:07 am    Post subject: Re: MousePointer Reply with quote

"LondonLad" wrote in message @microsoft.com...
> Hi
> I am using the CommonDialog.ShowPrinter when the user clicks on the Print
> Button I want to set the MousePointer to 11 (Hour Glass) and after .Enddoc
> revert to MousePointer 0.
> Can anyone help please?

And what problem are you having doing this?

--
Mike
Microsoft MVP Visual Basic
Back to top
View user's profile Send private message
LondonLad



Joined: 04 Oct 2007
Posts: 31

PostPosted: Wed Feb 27, 2008 7:49 am    Post subject: Re: MousePointer Reply with quote

Hi Mike Williams,Bob and MikeD
Thanks for your posts this has solved my problem, I just could not seem to
get the results before.
Sorry I have not posted a reply before had some problems login in, not sure
why.

Question
Can you please explain why a variable is used in the example, just so I
understand the solution

"MikeD" wrote:

>
> "LondonLad" wrote in message
> @microsoft.com...
> > Hi
> > I am using the CommonDialog.ShowPrinter when the user clicks on the Print
> > Button I want to set the MousePointer to 11 (Hour Glass) and after .Enddoc
> > revert to MousePointer 0.
> > Can anyone help please?
>
> And what problem are you having doing this?
>
> --
> Mike
> Microsoft MVP Visual Basic
>
>
>
Back to top
View user's profile Send private message
MikeD



Joined: 04 Oct 2007
Posts: 3348

PostPosted: Wed Feb 27, 2008 12:59 pm    Post subject: Re: MousePointer Reply with quote

"LondonLad" wrote in message @microsoft.com...
> Hi Mike Williams,Bob and MikeD
> Thanks for your posts this has solved my problem, I just could not seem to
> get the results before.
> Sorry I have not posted a reply before had some problems login in, not
> sure
> why.
>
> Question
> Can you please explain why a variable is used in the example, just so I
> understand the solution


Not sure why you're thanking me. I didn't help you any.

I presume you're referring to Mike Williams' example?

He's using the variable to temporarily store whatever the previous
mousepointer value was so that very same value can be restored.


--
Mike
Microsoft MVP Visual Basic
Back to top
View user's profile Send private message
LondonLad



Joined: 04 Oct 2007
Posts: 31

PostPosted: Wed Feb 27, 2008 11:53 am    Post subject: Re: MousePointer Reply with quote

Hi MikeD
I thanked you Mike for taking the time to reply to my post and I am sure you
would have given a answer when I answered your question 'And what problem
are you having doing this?' but as I said could not seem to log in and Mike
Williams gave me a solution.
I am always very grateful for the time people give to this forum to us non
trained VB programmers.
Cheers

"MikeD" wrote:

>
> "LondonLad" wrote in message
> @microsoft.com...
> > Hi Mike Williams,Bob and MikeD
> > Thanks for your posts this has solved my problem, I just could not seem to
> > get the results before.
> > Sorry I have not posted a reply before had some problems login in, not
> > sure
> > why.
> >
> > Question
> > Can you please explain why a variable is used in the example, just so I
> > understand the solution
>
>
> Not sure why you're thanking me. I didn't help you any.
>
> I presume you're referring to Mike Williams' example?
>
> He's using the variable to temporarily store whatever the previous
> mousepointer value was so that very same value can be restored.
>
>
> --
> Mike
> Microsoft MVP Visual Basic
>
>
>

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> VB General Discussions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group