hi Vb
For Some Reason My Pop Up Blocker wont work
but if i debug the application it will work for some reason please help me
error code below:
And Here is my code For Pop BlockerCode:************** Exception Text ************** System.InvalidCastException: Unable to cast object of type 'System.Windows.Forms.MouseEventArgs' to type 'System.ComponentModel.CancelEventArgs'. at WarezEditionBrowser.PopUpDialog._Lambda$__1(Object a0, EventArgs a1) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Please Help Me It Works In debug Mode But Not When i release it get the error at the topCode:Imports System.Windows.Forms Public Class PopUpDialog Private Sub Yes_Button_Click(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles Yes_Button.Click On Error Resume Next Me.DialogResult = System.Windows.Forms.DialogResult.Yes If System.Windows.Forms.DialogResult.Yes Then e.Cancel = True End If End Sub Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles No_Button.Click Me.DialogResult = System.Windows.Forms.DialogResult.No If System.Windows.Forms.DialogResult.No Then PopUpBlocked.Show() End If Me.Close() End Sub End Class
thanks




Reply With Quote