Hi guys,
I have a problem, I cannot converted the value of Integer type, which it cannot converted to 'System.Drawing.Point' and 'System.Windows.Forms.Control'.
Both errors is highlighting on this statement
Code:Form1.ContextMenu1.Show(Form1.MousePosition.X, MousePosition.Y)
Error I have received which the errors is highlighting on MousePosition.X and MousePosition.Y statement:
Value of type 'Integer' cannot be converted to 'System.Drawing.Point'
Value of type 'Integer' cannot be converted to 'System.Windows.Forms.Control'.
Class library code:
Code:Public Class NoRightClickFlashControl Inherits AxShockwaveFlashObjects.AxShockwaveFlash Private Const WM_RBUTTONDOWN As Integer = &H204 Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) Select Case m.Msg Case WM_RBUTTONDOWN Form1.ContextMenu1.Show(Form1.MousePosition.X, MousePosition.Y) m.Result = New IntPtr(1) Return End Select MyBase.WndProc(m) End Sub End Class
Form1 code:
End ClassCode:Public Class Form1 Friend WithEvents ContextMenuStrip1 As System.Windows.Forms.ContextMenuStrip = New ContextMenuStrip Friend WithEvents PlayToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem = New ToolStripMenuItem Friend WithEvents StopToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem = New ToolStripMenuItem Friend WithEvents ForwardToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem = New ToolStripMenuItem Friend WithEvents ReverseToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem = New ToolStripMenuItem Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub
Please can you help me to solution the errors I have received on form1.contextmenu1.show statement??
Thanks,
Mark




Reply With Quote