473,657 Members | 3,021 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Subclassing window

Hi all.

Could smb provide an Internet site or smth explaining how to use function
SetWindowSubcla ss in vb.net? All examples found by me are in C++ :(

Thanks.
Mar 21 '07 #1
3 1757
>Could smb provide an Internet site or smth explaining how to use function
>SetWindowSubcl ass in vb.net?
Personally I'd use the NativeWindow class instead, it handles the
subclassing work for you.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Mar 21 '07 #2
Thanks, I'll check this out.

"Mattias Sjögren" <ma************ ********@mvps.o rgwrote in message
news:ea******** ******@TK2MSFTN GP05.phx.gbl...
Could smb provide an Internet site or smth explaining how to use function
SetWindowSubc lass in vb.net?

Personally I'd use the NativeWindow class instead, it handles the
subclassing work for you.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Mar 22 '07 #3
it is probably even enough to implement Imesagefilter interface in the form

for an example see

http://www.freevbcode.com/ShowCode.A...omizer&ID=5635

In this situation it was used to intercept messages from the webbrowser
control , and from the base form to change the default behavior of the form
HTH

regards

Michel Posseth

"Mattias Sjögren" <ma************ ********@mvps.o rgschreef in bericht
news:ea******** ******@TK2MSFTN GP05.phx.gbl...
Could smb provide an Internet site or smth explaining how to use function
SetWindowSubc lass in vb.net?

Personally I'd use the NativeWindow class instead, it handles the
subclassing work for you.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Mar 22 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2729
by: WhiteRavenEye | last post by:
Why can't I subclass any window except mine in VB? Do I have to write dll for this? I've tried to subclass it with SetWindowLong but without success... Does anyone know how to subclass window ANY window in VB? Thanks...
2
5154
by: BJörn Lindqvist | last post by:
A problem I have occured recently is that I want to subclass builtin types. Especially subclassing list is very troublesome to me. But I can't find the right syntax to use. Take for example this class which is supposed to be a representation of a genome: class Genome(list): def __init__(self): list.__init__(self) self = ....
11
3468
by: Brent | last post by:
I'd like to subclass the built-in str type. For example: -- class MyString(str): def __init__(self, txt, data): super(MyString,self).__init__(txt) self.data = data
3
1539
by: alotcode | last post by:
Hello: What is 'interprocess subclassing'? To give more context, I am writing in reference to the following remark: With the advent of the Microsoft Win32 API, interprocess subclassing was discouraged and made it a bit harder to code (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebgen/html/bho.asp) Thank you for your help.
2
2996
by: Alexander Wehrli | last post by:
Hi, I need to write a functionality to catch all Windows Messages from any Window (like spy++ does). I thought that would be possible by subclassing the window. So I wrote a class that inherts from NativeWindow, Assigned a Handle from another window and overrode the WndProc method. BUT, I never catch any message EXCEPT if I assign the handle of my own
2
6535
by: Laura Martignas | last post by:
Hi everybody I'm trying to subclass Winamp's main window in order to develop a software which will interact with Winamp. For testing, I'm trying to intercept the closing of this window via WM_CLOSE, by showing a MessageBox, but it doesn't work althoug the code seems to be correct. Do you notice a mistake ? My test program contains a form with 2 buttons : one button to activate subclassing, and the second button to desactivate it.
0
996
by: =?Utf-8?B?QW5kcmV3?= | last post by:
Hello, I followed the MS instructions to subclass Windows using C#.net (http://support.microsoft.com/kb/815775) as the follows. I then opened several Excel files, and selected anyone of them as foreground window. I was expecting to see windows message, saying WM_ACTIVATE, or something like that, however, to my surprise, I saw NO windows message when I randomly selected those Excel windows, (although I could see other window messages,...
16
2066
by: manatlan | last post by:
I've got an instance of a class, ex : b=gtk.Button() I'd like to add methods and attributes to my instance "b". I know it's possible by hacking "b" with setattr() methods. But i'd like to do it with inheritance, a kind of "dynamic subclassing", without subclassing the class, only this instance "b" ! In fact, i've got my instance "b", and another class "MoreMethods"
8
2842
by: Alcibiade | last post by:
HI, I should intercept messages of external windows. I have same problem descripted here http://bytes.com/forum/ thread515335.html I can't find declaration of SetWindowLongA for vb2005/2008 and some example for using it. Anyone could help me please? Thanks
0
8302
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8820
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8499
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8601
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5630
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.