Surpressing textbox Popup window 
Author Message
 Surpressing textbox Popup window

Hello.
I want to create my own custom popup menus.  My problem is this:

I Want to right click on a textbox and have my popup menu appear, but the
thing is that Windows popup menu comes in first.

I want to surpress the the defult popup window so that I can show myne (on
the first mouse click)

Im told there is a API call to disable the menu, but I  dont know what it
is.  Can anyone here help me?

PS: I DONT WANT TO USE AN EXTERNAL OCX FILE TO REMOVE THE MENU
---
Im Using Visual Basic 4 ENT
Platform: Windows 95

--
Yours Truly,
  -Ray G




Thu, 05 Oct 2000 03:00:00 GMT  
 Surpressing textbox Popup window

You could try subclassing the textbox and capturing the WM_POPUPMENU
message, but since you're using vb4 and don't want to use OCXs, here's what
you can do:

in the MouseUp event write:

  if button=vbrightbutton then
      text1.enabled=false
      // Do your stuff here
      text1.enabled=true
  end if

Best regards, Kaufman Alex.

Quote:

>Hello.
>I want to create my own custom popup menus.  My problem is this:

>I Want to right click on a textbox and have my popup menu appear, but the
>thing is that Windows popup menu comes in first.

>I want to surpress the the defult popup window so that I can show myne (on
>the first mouse click)

>Im told there is a API call to disable the menu, but I  dont know what it
>is.  Can anyone here help me?

>PS: I DONT WANT TO USE AN EXTERNAL OCX FILE TO REMOVE THE MENU
>---
>Im Using Visual Basic 4 ENT
>Platform: Windows 95

>--
>Yours Truly,
>  -Ray G





Thu, 05 Oct 2000 03:00:00 GMT  
 Surpressing textbox Popup window

Ray-
        The commonly recommended way is to quickly
disable/enable the Textbox. This didn't work for me
under some circumstances- I don't remember what
the problem was. Try this- works for me...
Joe

__________________snip____________________________________-
Option Explicit
Private Declare Function SendMessage Lib "user32" _
   Alias "SendMessageA" (ByVal hwnd As Long, _
   ByVal wMsg As Long, ByVal wParam As Long, _
   lParam As Any) As Long
'-------------------------------------------------
Private Const WM_RBUTTONDOWN = &H204

Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
   Dim lRetVal As Long
   If Button = vbRightButton Then
      lRetVal = SendMessage(Me.hwnd, WM_RBUTTONDOWN, 0, 0)
      Call PopupMenu(mnuPopUp)
   End If
End Sub
___________snip_______________________________________________
--
***********************************************************

Microsoft Developer MVP- Visual Basic
Check out Yankee Clipper Plus (April 1998
PCWorld magazine "Best Free Stuff Online")
www.tiac.net/users/lvasseur/ycphome.html
"He preaches well that lives well, quoth Sancho; that's
all the divinity I understand." Miguel de Cervantes
**********************************************************
PS- Please reply to the newsgroup- except in the
case of flames, insults, etc. (Don't bother.)



Quote:
> Hello.
> I want to create my own custom popup menus.  My problem is this:

> I Want to right click on a textbox and have my popup menu appear, but the
> thing is that Windows popup menu comes in first.

> I want to surpress the the defult popup window so that I can show myne
(on
> the first mouse click)

> Im told there is a API call to disable the menu, but I  dont know what it
> is.  Can anyone here help me?

> PS: I DONT WANT TO USE AN EXTERNAL OCX FILE TO REMOVE THE MENU
> ---
> Im Using Visual Basic 4 ENT
> Platform: Windows 95

> --
> Yours Truly,
>   -Ray G





Thu, 05 Oct 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Surpressing textbox Popup window

2. Residente programme / Resident Programs /// Yellow PopUp-Help-Windows / gelbes Hilfe-PopUp-Fenster

3. ShowModelessDialog (window.open) Restriction with the amount of popup windows that can be displayed

4. ShowModeless Window + Restriction with the amount of popup windows that can be displayed

5. Pass Parameter from popup window to mather window..

6. Popup Windows, Focus and knowing when to window.close

7. Popup Windows, Focus and knowing when to window.close

8. how can I get the windows popup window for files

9. TextBox Popup

10. textbox right-click popup menu

11. right-click popup menu on a textbox

12. Disable Textbox popup menu

 

 
Powered by phpBB® Forum Software