Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

form borderstyle ignorned if menu is present 2

Status
Not open for further replies.

hererxnl

Technical User
Jul 8, 2003
239
US
Hopefully someone can point me in the right direction here. I have a borderless form with several pictureboxes. When I include a menu, with visible set to false, vb ignores borderstyle = 0 (even if set at runtime) and imposed a fixed single border. I'm looking to include right click menus on the pictureboxes.

I can set controlbox to false and get a 1 px border but this looks bad in the graphical layout of the app.

Thanks in advance.
 
I generally use a seperate, never-made-visible form as the host for my popup menus which therefore avoids this issue
 
Thanks Mike. That's what I thought would say. I was hoping there'd be another way. Oh VB I love to hate you.
 
Sorry but I've got one more question now. Would the code then look like this:
Code:
Private Sub imgThumb_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
    
    If Button = 2 Then
        Load frmPopUpMenus
        Call frmPopUpMenus.PopupMenu(mnuDelete)
    End If

End Sub
I get mnuDelete as Variable Not Defined
 
Sorry to interrupt your conversation, but all i want is to help: I agree with strongm's soluntion, so hererxnl:

Private Sub imgThumb_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)

If Button = 2 Then
PopupMenu frmPopUpMenus.mnuDelete
End If

End Sub
 
Thanks TG. That's perfect, a star for the answer and re-reading a starred question.
 
I'm glad that helped you, although i do not use vb6 any more; + thanks for the star.
I read starred threads; many times there is a new or more questions from the person that started the thread... in the middle of the discussion.
(sorry for my english)
 
Maybe better to use the MouseUp Procedure with the same code for Logical Purposes.
A Right Click isn't really a right click until the Right Mouse Button has been released over the Image/Picturebox...

HTH

Jag14

yosherrs.gif

[tt]'Very funny, Scotty... Now Beam down my clothes.'[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top