VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This code helps to create a drop down menu using right click. N.B:Not Using the Menu Editor.

by Prabir Kumar Das (7 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB.NET
Difficulty: Unknown Difficulty
Originally Published: Sat 4th November 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This code helps to create a drop down menu using right click. N.B:Not Using the Menu Editor.

Rate This code helps to create a drop down menu using right click. N.B:Not Using the Menu Editor.



    CurrentX = X
    CurrentY = Y
    If Button = 2 Then
        Frame1.Left = CurrentX
        Frame1.Top = CurrentY
        Frame1.Visible = True
    ElseIf Button = 1 Then
        Frame1.Visible = False
    End If
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Command1.BackColor = &H8000000F
'Me.Command1.ForeColor = &H80000012

Command3.BackColor = &H8000000F
'COMMAND3.ForeColor = &H80000012

Command2.BackColor = &H8000000F
'Command2.ForeColor = &H80000012

Command4.BackColor = &H8000000F
'Command4.ForeColor = &H80000012


End Sub

Private Sub COMMAND1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Command2.BackColor = &H8000000F
'Command2.ForeColor = &H80000012

Command3.BackColor = &H8000000F
'Command3.ForeColor = &H80000012

Command4.BackColor = &H8000000F
'Command4.ForeColor = &H80000012

Command1.BackColor = &HC00000
'Command1.ForeColor = &HFFFFFF

Me.BalloonTipDemo1.ShowTip
Me.BalloonTipDemo1.TipColor = RGB(100, 150, 250)
Me.BalloonTipDemo1.TipText = "CLICK HERE TO SELECT MENU1"
Me.BalloonTipDemo1.TitleText = "SELECT MENU ITEM"
End Sub

Private Sub COMMAND2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Command1.BackColor = &H8000000F
'Command1.ForeColor = &H80000012

Command3.BackColor = &H8000000F
'Command3.ForeColor = &H80000012

Command4.BackColor = &H8000000F
'Command4.ForeColor = &H80000012

Command2.BackColor = &HC00000
'Command2.ForeColor = &HFFFFFF


Me.BalloonTipDemo1.ShowTip
Me.BalloonTipDemo1.TipColor = RGB(100, 150, 250)
Me.BalloonTipDemo1.TipText = "CLICK HERE TO SELECT MENU2"
Me.BalloonTipDemo1.TitleText = "SELECT MENU ITEM"


End Sub

Private Sub COMMAND3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Command1.BackColor = &H8000000F
'Command1.ForeColor = &H80000012

Command2.BackColor = &H8000000F
'Command2.ForeColor = &H80000012

Command4.BackColor = &H8000000F
'Command4.ForeColor = &H80000012

Command3.BackColor = &HC00000
'Command3.ForeColor = &HFFFFFF

Me.BalloonTipDemo1.ShowTip
Me.BalloonTipDemo1.TipColor = RGB(100, 150, 250)
Me.BalloonTipDemo1.TipText = "CLICK HERE TO SELECT MENU3"
Me.BalloonTipDemo1.TitleText = "SELECT MENU ITEM"

End Sub
Private Sub COMMAND4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Command1.BackColor = &H8000000F
'Command1.ForeColor = &H80000012

Command3.BackColor = &H8000000F
'Command3.ForeColor = &H80000012

Command2.BackColor = &H8000000F
'Command2.ForeColor = &H80000012

Command4.BackColor = &HC00000
'Command4.ForeColor = &HFFFFFF


Me.BalloonTipDemo1.ShowTip
Me.BalloonTipDemo1.TipColor = RGB(100, 150, 250)
Me.BalloonTipDemo1.TipText = "CLICK HERE TO SELECT MENU4"
Me.BalloonTipDemo1.TitleText = "SELECT MENU ITEM"

End Sub




'make sure all the controls are taken in the form.
'Please reply how you like our service
'Please reply to [email protected]


Download this snippet    Add to My Saved Code

This code helps to create a drop down menu using right click. N.B:Not Using the Menu Editor. Comments

No comments have been posted about This code helps to create a drop down menu using right click. N.B:Not Using the Menu Editor.. Why not be the first to post a comment about This code helps to create a drop down menu using right click. N.B:Not Using the Menu Editor..

Post your comment

Subject:
Message:
0/1000 characters