|
| Author |
Message |
LondonLad
Joined: 04 Oct 2007 Posts: 31
|
Posted: Mon Feb 25, 2008 2:18 pm Post subject: MousePointer |
|
|
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 |
|
 |
Mike Williams
Joined: 04 Oct 2007 Posts: 1309
|
Posted: Mon Feb 25, 2008 10:42 pm Post subject: Re: MousePointer |
|
|
"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 |
|
 |
Bob Butler
Joined: 04 Oct 2007 Posts: 1081
|
Posted: Mon Feb 25, 2008 3:14 pm Post subject: Re: MousePointer |
|
|
"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 |
|
 |
Mike Williams
Joined: 04 Oct 2007 Posts: 1309
|
Posted: Mon Feb 25, 2008 11:50 pm Post subject: Re: MousePointer |
|
|
"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
Mike |
|
| Back to top |
|
 |
MikeD
Joined: 04 Oct 2007 Posts: 3348
|
Posted: Tue Feb 26, 2008 12:07 am Post subject: Re: MousePointer |
|
|
"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 |
|
 |
LondonLad
Joined: 04 Oct 2007 Posts: 31
|
Posted: Wed Feb 27, 2008 7:49 am Post subject: Re: MousePointer |
|
|
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 |
|
 |
MikeD
Joined: 04 Oct 2007 Posts: 3348
|
Posted: Wed Feb 27, 2008 12:59 pm Post subject: Re: MousePointer |
|
|
"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 |
|
 |
LondonLad
Joined: 04 Oct 2007 Posts: 31
|
Posted: Wed Feb 27, 2008 11:53 am Post subject: Re: MousePointer |
|
|
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 |
|
 |
|