Try this:
My understanding in theory is that you are not supposed to access the properties of a control on a form directly. Thats why all the items on a form are private. You can however create a Public function in the form that contains the control that will set the text property, then access...
Thanks for the help
I have tried putting the MyBase call in several places, but finally I figured out a solution. Instead of trying to process the QueryEndSession message in the WndProc for the form, I set a global integer that tells the form_closing event that the reason it is closing is...
Below is the code I am using in the overridden form's wndProc to capture a QueryEndSession message.
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
Select Case m.Msg
Case 17
KillWatchDog()
Application.Exit()
End Select
MyBase.WndProc(m)
End Sub
I am capturing...
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
Debug.WriteLine("In wndproc")
End Sub
If this code is anywhere in my main form when I call mainFrm.Show() it throws the
"Error Cannot get windows handle"
NewWindow2 event
The NewWindow2 event will fire from the WebBrowser control if a popup is in the process of being generated. If you set the cancel event to e.Cancel = true, then the window will be blocked. Keep in mind that this will block all popup's.
Formatting?
If the database item is null the first time you load the datetimepicker you change the format. Do you need to change the format back to long, short etc.. when you have a valid database value? It may keep showing blank because the format is preventing it from showing anything else.
Code from Module
I created a Module with the following code. It compiled ok but I didn't bother to try and firing the event or passing the instance of the textbox to a form or anything.
Module MainMod
Public WithEvents text1 As New System.Windows.Forms.TextBox
Public Sub Main()
End Sub...
I am writing an application that uses a comControl to talk to the super IO controller on a motherboard. Everything works fine until I include the wndproc method in the form code to process some of the wnd messages. When the wnproc is present I get the following error when the control is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.