Mouse back event? 
Author Message
 Mouse back event?

What would be the best way to trap the "Back" button that a lot of mice have
to back up a page in Explorer? It doesn't trigger any mouse event, not sure
where else to look.

Thanks... Darren



Thu, 11 Aug 2005 09:30:10 GMT  
 Mouse back event?

Quote:
> What would be the best way to trap the "Back" button that a lot
> of mice have to back up a page in Explorer? It doesn't trigger
> any mouse event, not sure where else to look.

   Public Const WM_XBUTTONDOWN As Integer = &H20B
   Public Const WM_XBUTTONUP As Integer = &H20C
   Public Const WM_XBUTTONDBLCLK As Integer = &H20D

   Protected Overrides Sub WndProc( _
      ByRef m As System.Windows.Forms.Message)

      MyBase.WndProc(m)
      Select Case m.Msg
         Case WM_XBUTTONDOWN
         Case WM_XBUTTONUP
         Case WM_XBUTTONDBLCLK
      End Select
   End Sub

See also the docs to these messages.

Armin



Thu, 11 Aug 2005 20:07:04 GMT  
 Mouse back event?
Hmm that seams to catch every mouse event except the one I'm after. Hitting
the back button doesn't trigger it at all:/

Thanks for the help though.

Darren


Quote:

> > What would be the best way to trap the "Back" button that a lot
> > of mice have to back up a page in Explorer? It doesn't trigger
> > any mouse event, not sure where else to look.

>    Public Const WM_XBUTTONDOWN As Integer = &H20B
>    Public Const WM_XBUTTONUP As Integer = &H20C
>    Public Const WM_XBUTTONDBLCLK As Integer = &H20D

>    Protected Overrides Sub WndProc( _
>       ByRef m As System.Windows.Forms.Message)

>       MyBase.WndProc(m)
>       Select Case m.Msg
>          Case WM_XBUTTONDOWN
>          Case WM_XBUTTONUP
>          Case WM_XBUTTONDBLCLK
>       End Select
>    End Sub

> See also the docs to these messages.

> Armin



Thu, 11 Aug 2005 21:45:42 GMT  
 Mouse back event?
I found what I needed while playing around with something else. The Back
button is part of the Keys enumeration.

Darren


Quote:
> What would be the best way to trap the "Back" button that a lot of mice
have
> to back up a page in Explorer? It doesn't trigger any mouse event, not
sure
> where else to look.

> Thanks... Darren



Fri, 12 Aug 2005 04:00:00 GMT  
 Mouse back event?

Quote:
> Hmm that seams to catch every mouse event except the one I'm
> after. Hitting the back button doesn't trigger it at all:/

> Thanks for the help though.

You took notice of the select case statement? Works well here.

Armin



Fri, 12 Aug 2005 01:37:15 GMT  
 Mouse back event?
Hi DRamey,

Have you tired the WM_XBUTTONDOWN/WM_XBUTTONUP messages? They are posted
when you press or release the button. You can override the WndProc method
of that control to trap these messages and fire your custom event when the
messages are caught.

Handling and Raising Events
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconevents.asp

Hope this helps.

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

Quote:

>Newsgroups: microsoft.public.dotnet.languages.vb
>Subject: Mouse back event?
>Lines: 7
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

>Date: Sun, 23 Feb 2003 01:30:10 GMT
>NNTP-Posting-Host: 66.56.137.241

>X-Trace: twister.southeast.rr.com 1045963810 66.56.137.241 (Sat, 22 Feb
2003 20:30:10 EST)
>NNTP-Posting-Date: Sat, 22 Feb 2003 20:30:10 EST
>Organization: RoadRunner - Triad
>Path:

cpmsftngxa06!TK2MSFTNGP08.phx.gbl!cppssbbsa01.microsoft.com!news-out.cwix.co
m!newsfeed.cwix.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.news2me.com!newsfeed
-west.nntpserver.com!hub1.meganetnews.com!nntpserver.com!news-west.rr.com!cy
clone.tampabay.rr.com!news-post.tampabay.rr.com!twister.southeast.rr.com.POS
TED!53ab2750!not-for-mail

- Show quoted text -

Quote:
>Xref: cpmsftngxa06 microsoft.public.dotnet.languages.vb:92027
>X-Tomcat-NG: microsoft.public.dotnet.languages.vb

>What would be the best way to trap the "Back" button that a lot of mice
have
>to back up a page in Explorer? It doesn't trigger any mouse event, not sure
>where else to look.

>Thanks... Darren



Fri, 12 Aug 2005 14:11:22 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. mouse move event detected with no mouse movement?!?

2. HOWTO: Disable user mouse input but still allow software to play mouse events

3. changing Mouse to left handed an back

4. Events back from a DLL?

5. Windows Form and call back events

6. Backing up Event Logs

7. Backing up the Event Log to a central location

8. trap back() event

9. Back to back Excel & Word VBA macros

10. Link back from a URL without pressing BACK button

11. Link back from a URL without pressing BACK button

12. VB6 back to back mpgs

 

 
Powered by phpBB® Forum Software