|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Different window classI'm trying to create a form that will have different window class. I have overridden the CreateParams property of a form as follows: ~ Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams Get Dim tempCP As CreateParams = MyBase.CreateParams tempCP.ClassName = "PlaySmth.Class" Return tempCP End Get End Property ~ .... but I'm getting System.ComponentModel.Win32Exception. I think I have to register this new window class, but I can't do this without original class info. But ~ Dim WC as WNDCLASS GetClassInfo(0, Old_Class_Name, WC) ~ failed. So, does anyone know how to get info on old window class, or, maybe, a different way to change class of a window being created? Thanks in advance. Dragon >I think I have to register this new window class, but I can't do this Failed in what way?>without original class info. But > >~ > >Dim WC as WNDCLASS > >GetClassInfo(0, Old_Class_Name, WC) > >~ > >failed. Mattias -- Mattias Sjögren [MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup. > Failed in what way? I mean, GetClassInfo returned 0, and there were no changes in the WCstructure. Marshal.GetLastWin32Error gave me 87. I suspect the trouble is with first GetClassInfo parameter. I assumed that old class was created by OS, but it seems that it wasn't. Unfortunately, I have no idea what should I substitute for hInstance. Any suggestions?
performance difference in Webservice -'Normal' way
Update MS Access Database Records Obstruct the Developpers to Develop and Deploy a newer version Import DataRow WindowsForm Exception Addin problem - "invalid class string" A mathematical issue Calculating text width when printing Does it have unicode? Problem running exe in VB.NET |
|||||||||||||||||||||||