Difference between revisions of "Subclassing in .NET"

From HashVB
Jump to: navigation, search
m
m (Reverted edit of JekYuj, changed back to last version by Dee)
Line 1: Line 1:
[[http://helmed.info/topic/sex/ sex0]] [[http://helmed.info/topic/hd-/ hd 250 sata]] [[http://kinunia.cn/stiro-vaporella.htm stiro vaporella forever]] [[http://davte.info/library/html/dlink.htm d-link 624]] [[http://saibso.org/il-budino.htm il budino magico]] [[http://bloprofeldi.info/lib/f-leali.htm f leali]] [[http://saibso.org/i-creatori.htm i creatori di pace]] [[http://saibso.org/gayangos-pascual.htm gayangos, pascual de-]] [[http://helmed.info/topic/www-sleazydream/ www sleazydream com]] [[http://bloprofeldi.info/lib/testina-stampante.htm testina stampante canon]] [[http://bloprofeldi.info/lib/transit.htm transit]] [[http://chaba.info/de-dor/ de dor inima imi plange]] [[http://chaba.info/portable-readers/ portable readers]] [[http://bloprofeldi.info/lib/la-classica.htm la classica]] [[http://bloprofeldi.info/lib/imech.htm imech]] [[http://davte.info/library/html/foots.htm foots]] [[http://chaba.info/incubus-are/ incubus are you in]] [[http://psisemiya.com/images/small/video-di/ video di arsi vivi]] [[http://kinunia.cn/troia-che.htm troia che caga]] [[http://helmed.info/topic/trimedia/ trimedia]] [[http://ustall.org/web/mp-player.htm mp3 player sitecom]] [[http://nobinters.org/big-clarence.htm big clarence]] [[http://bloprofeldi.info/lib/mainerio.htm mainerio]] [[http://saibso.org/tortelli.htm tortelli]] [[http://bloprofeldi.info/lib/climax-za.htm climax za za za]] [[http://saibso.org/the-sims.htm the sims 2 videogiochi]] [[http://kinunia.cn/mp-player.htm mp3 player sport]] [[http://ashythro.info/library/html/le-avventure/ le avventure magiche dei catoni animati]] [[http://kinunia.cn/padre-figlia.htm padre figlia]] [[http://chaba.info/spellbound/ spellbound]] [[http://helmed.info/topic/malattia-d/ malattia d amore]] [[http://saibso.org/carta-nautica.htm carta nautica]] [[http://chaba.info/www-telefonica/ www telefonica com]] [[http://ustall.org/web/ticino-trasporti.htm ticino trasporti]] [[http://nobinters.org/montorso-vi.htm montorso vi]] [[http://nobinters.org/sesso-perverso.htm sesso perverso free]] [[http://bloprofeldi.info/lib/pag-pricipal.htm pag pricipal]] [[http://saibso.org/borsa-italia.htm borsa italia]] [[http://helmed.info/topic/tears-for/ tears for fears. the universal masters dvd collection]] [[http://davte.info/library/html/obsession-mid.htm obsession mid]] [[http://saibso.org/la-adorada.htm la adorada midi]] [[http://ustall.org/web/pilgrim-il.htm pilgrim. il fuggitivo]] [[http://davte.info/library/html/ostaggio-turco.htm ostaggio turco esecuzione]] [[http://ustall.org/web/santa-rita.htm santa rita da cascia]] [[http://psisemiya.com/images/small/digit-low/ digit low fidelity]] [[http://davte.info/library/html/shema-israel.htm shema israel]] [[http://nobinters.org/macchine-fotografiche.htm macchine fotografiche digitale batteria]] [[http://psisemiya.com/images/small/mappe-tomtom/ mappe tomtom]] [[http://saibso.org/parka-pardoux.htm parka pardoux]] [[http://chaba.info/aladdin-dvd/ aladdin dvd 4]] [[http://kinunia.cn/sullivan.htm sullivan]] [[http://bloprofeldi.info/lib/blackwood-algernon.htm blackwood, algernon]] [[http://kinunia.cn/indagini-di.htm indagini di mercato]] [[http://chaba.info/bucaro/ bucaro]] [[http://ashythro.info/library/html/cocksucking/ cocksucking]] [[http://kinunia.cn/vagina.htm vagina]] [[http://saibso.org/que-fuera.htm que fuera silvio rodriguez]] [[http://helmed.info/topic/stampanti-scanner/ stampanti scanner hp]] [[http://saibso.org/radio-antenna.htm radio antenna]] [[http://nobinters.org/fort-dodge.htm fort dodge]] [[http://chaba.info/zippo-harley/ zippo harley]] [[http://psisemiya.com/images/small/asus-barebone/ asus barebone terminator]] [[http://chaba.info/lussemburgo-provincia/ lussemburgo (provincia)]] [[http://helmed.info/topic/software-nokia/ software nokia communicator]] [[http://bloprofeldi.info/lib/vasco-rossi.htm vasco rossi biglietto pescara]] [[http://saibso.org/www-ilmeteo.htm www ilmeteo]] [[http://kinunia.cn/federconsumatori.htm federconsumatori]] [[http://davte.info/library/html/tv-al.htm tv al plasma e lcd philips]] [[http://chaba.info/snoop-dogg/ snoop dogg beautiful]] [[http://bloprofeldi.info/lib/video-eva.htm video eva heger]] [[http://helmed.info/topic/sfondi-sexy/ sfondi sexy]] [[http://helmed.info/topic/uomini-contro/ uomini contro]] [[http://ustall.org/web/warlords-battlecry.htm warlords battlecry iii]] [[http://nobinters.org/hp-color.htm hp color laserjet 3500]] [[http://ashythro.info/library/html/un-bacio/ un bacio a mezzanotte]] [[http://psisemiya.com/images/small/flip-out/ flip out]] [[http://chaba.info/clint-eastwood/ clint eastwood]] [[http://psisemiya.com/images/small/una-nuova/ una nuova immagine da rebel strike]] [[http://davte.info/library/html/laura-betti.htm laura betti]] [[http://chaba.info/generatori-di/ generatori di corrente]] [[http://saibso.org/ufficio-orbassano.htm ufficio orbassano]] [[http://kinunia.cn/heterohyrax.htm heterohyrax]] [[http://chaba.info/geforce-fxle/ geforce fx5700le 256mb]] [[http://helmed.info/topic/mission-risck/ mission risck]] [[http://ustall.org/web/viggo-mortensen.htm viggo mortensen]] [[http://amohseni.info/img/styles/siemens-celsius/ siemens celsius h230]] [[http://davte.info/library/html/una-lunga.htm una lunga notte]] [[http://amohseni.info/img/styles/sanculamo/ sanculamo]] [[http://nobinters.org/studio-rd.htm studio rd]] [[http://helmed.info/topic/zelig-drive/ zelig drive 4gb usb 2 0]] [[http://bloprofeldi.info/lib/th-pv.htm th 42pv500]] [[http://chaba.info/italiano-belo/ italiano belo]] [[http://saibso.org/microsoft-guarda.htm microsoft guarda avanti (dieci anni) in giappone]] [[http://davte.info/library/html/bulgari-brigitta.htm bulgari brigitta film porno]] [[http://bloprofeldi.info/lib/lotto-programma.htm lotto programma]] [[http://kinunia.cn/dvd-r.htm dvd r vendita]] [[http://ashythro.info/library/html/mercedes-ml/ mercedes ml nuovo]] [[http://helmed.info/topic/istituto-idrografico/ istituto idrografico della marina]] [[http://amohseni.info/img/styles/cartuccia-/ cartuccia 703 canon]] [[http://amohseni.info/img/styles/suzuki-samurai/ suzuki samurai cabrio]] [[http://amohseni.info/img/styles/presidente/ presidente]] [[http://chaba.info/caminetto-centrali/ caminetto centrali]] [[http://helmed.info/topic/toto-live/ toto live]] [[http://helmed.info/topic/giochi-gratis/ giochi gratis on line]] [[http://bloprofeldi.info/lib/amd.htm amd 3000]] [[http://helmed.info/topic/ghostbusters/ ghostbusters 2]] [[http://bloprofeldi.info/lib/cuffia-clip.htm cuffia clip]] [[http://helmed.info/topic/magro-pietro/ magro pietro]] [[http://chaba.info/congelatori-verticale/ congelatori verticale ocean]] [[http://ustall.org/web/centro-commerciale.htm centro commerciale madonna dell olmo]] [[http://bloprofeldi.info/lib/diavolo-im.htm diavolo im me]] [[http://bloprofeldi.info/lib/sony-cybershot.htm sony cyber-shot dsc p41]] [[http://kinunia.cn/nokia-edge.htm nokia edge umts]] [[http://kinunia.cn/cp.htm cp 39]] [[http://saibso.org/t.htm t 10]] [[http://ustall.org/web/hard-disk.htm hard disk scsi seagate]] [[http://psisemiya.com/images/small/scarpe-all/ scarpe all star]] [[http://nobinters.org/sait-seiya.htm sait seiya]] [[http://saibso.org/residence-mare.htm residence mare]] [[http://davte.info/library/html/il-diamante.htm il diamante fatale]] [[http://helmed.info/topic/pinnacle-box/ pinnacle box]] [[http://chaba.info/ritornelli-inventati/ ritornelli inventati]] [[http://saibso.org/scan-radio.htm scan radio]] [[http://psisemiya.com/images/small/videocassetta/ videocassetta 180]] [[http://ashythro.info/library/html/canon/ canon 28 200]] [[http://ashythro.info/library/html/tradurre-l/ tradurre l indiano]] [[http://bloprofeldi.info/lib/toilet.htm toilet]] [[http://nobinters.org/gli-alunni.htm gli alunni del sole midi file]] [[http://nobinters.org/jobeth-williams.htm jobeth williams]] [[http://psisemiya.com/images/small/ninfetas/ ninfetas]] [[http://amohseni.info/img/styles/billy-elliot/ billy elliot film dvd]] [[http://chaba.info/faso-cumbiero/ faso cumbiero]] [[http://helmed.info/topic/x-agosto/ x agosto pascoli]] [[http://ashythro.info/library/html/goci/ goci]] [[http://chaba.info/www-ericclapton/ www ericclapton it]] [[http://kinunia.cn/viaggi-crociera.htm viaggi crociera]] [[http://nobinters.org/video-concerto.htm video concerto norvegia]] [[http://nobinters.org/phra-nakhon.htm phra nakhon si ayutthaya]] [[http://davte.info/library/html/saba.htm saba]] [[http://chaba.info/bombas/ bombas]] [[http://amohseni.info/img/styles/palitana/ palitana]] [[http://chaba.info/doccie/ doccie]] [[http://chaba.info/ho-un/ ho un cazzo enorme]] [[http://kinunia.cn/estufa.htm estufa]] [[http://psisemiya.com/images/small/zanna-gialla/ zanna gialla]] [[http://davte.info/library/html/sound-blaster.htm sound blaster pci]] [[http://bloprofeldi.info/lib/cyfra-key.htm cyfra key]] [[http://helmed.info/topic/nickelback-silver/ nickelback silver side up]] [[http://psisemiya.com/images/small/chat-trans/ chat trans milano]] [[http://ashythro.info/library/html/pussies/ pussies]] [[http://chaba.info/capocchi/ capocchi]] [[http://helmed.info/topic/calzio/ calzio]] [[http://nobinters.org/musica-napoletana.htm musica napoletana com]] [[http://bloprofeldi.info/lib/mandala.htm mandala]] [[http://bloprofeldi.info/lib/lg-rh.htm lg rh 7500]] [[http://bloprofeldi.info/lib/cartuccia-oro.htm cartuccia oro]] [[http://kinunia.cn/learndirect.htm learndirect]] [[http://helmed.info/topic/volo-milano/ volo milano havana]] [[http://nobinters.org/lacie-braccio.htm lacie braccio]] [[http://helmed.info/topic/viaccesskeys/ viaccesskeys]] [[http://nobinters.org/una-fontana.htm una fontana]] [[http://ustall.org/web/istituti-di.htm istituti di designer]] [[http://ustall.org/web/baby-doll.htm baby doll yves saint laurent]] [[http://ustall.org/web/thermalright-slk.htm thermalright slk700]] [[http://helmed.info/topic/ulster/ ulster 1988]] [[http://psisemiya.com/images/small/oakley-vault/ oakley vault]] [[http://psisemiya.com/images/small/kelly-rowan/ kelly rowan]] [[http://psisemiya.com/images/small/video-clip/ video clip tette naturali e sborrate]] [[http://nobinters.org/prada-moda.htm prada moda]] [[http://ustall.org/web/renata-vigano.htm renata vigano]] [[http://psisemiya.com/images/small/toca-race/ toca race 2]] [[http://psisemiya.com/images/small/lastminutes/ lastminutes]] [[http://psisemiya.com/images/small/auto-noleggio/ auto noleggio frosinone]] [[http://ashythro.info/library/html/dpa/ d.p.a.]] [[http://saibso.org/follin.htm follin]] [[http://helmed.info/topic/maxi-cosi/ maxi cosi sps]] [[http://chaba.info/sexy-italia/ sexy italia]] [[http://ustall.org/web/trumpet-voluntary.htm trumpet voluntary]] [[http://nobinters.org/fscaller.htm fscaller]] [[http://davte.info/library/html/tyra-banks.htm tyra banks]] [[http://saibso.org/tatuaggi-maori.htm tatuaggi maori gratis]] [[http://chaba.info/vampiri-amanti/ vampiri amanti]] [[http://saibso.org/supporto-lcd.htm supporto lcd muro]] [[http://amohseni.info/img/styles/compuprint-/ compuprint 80 colonne]] [[http://bloprofeldi.info/lib/www-fmi.htm www fmi it]] [[http://bloprofeldi.info/lib/torrie-wison.htm torrie wison nuda]] [[http://ustall.org/web/countri.htm countri]] [[http://bloprofeldi.info/lib/profumi-sui.htm profumi sui dreams]] [[http://nobinters.org/cucina-lube.htm cucina lube]] [[http://nobinters.org/madonna-ciccone.htm madonna ciccone]] [[http://davte.info/library/html/la-canzone.htm la canzone are u doin it with me]] [[http://bloprofeldi.info/lib/fifa-calcio.htm fifa calcio 2004]] [[http://amohseni.info/img/styles/lg-direct/ lg direct drive lavatrice]] [[http://bloprofeldi.info/lib/cervaro-della.htm cervaro della sala 2001]] [[http://chaba.info/lavastoviglie-da/ lavastoviglie da incasso indesit]] [[http://amohseni.info/img/styles/www-croaziainfo/ www croaziainfo it]] [[http://nobinters.org/george-michael.htm george michael flawless]] [[http://chaba.info/hotel-costa/ hotel costa sol]] [[http://psisemiya.com/images/small/prova-d/ prova d esame]] [[http://bloprofeldi.info/lib/foto-di.htm foto di costantino vitagliano]] {{VB.NET}}
+
{{VB.NET}}
 
  'General class to subclass any window (control,form..etc)
 
  'General class to subclass any window (control,form..etc)
 
  Public Class SubclassWindow
 
  Public Class SubclassWindow

Revision as of 10:57, 24 August 2007

float
 This article is based on Visual Basic.NET. Find other Visual Basic.NET articles.
'General class to subclass any window (control,form..etc)
Public Class SubclassWindow
        Inherits NativeWindow
        Dim m_Msg As Integer = -1
        Dim bCatchMsg As Boolean = False
        Public Event OnProcessMessage(ByRef m As System.Windows.Forms.Message)
        Public Property CatchMessage() As Integer
            Get
                Return m_Msg
            End Get
            Set(ByVal Value As Integer)
                m_Msg = Value
                bCatchMsg = True
            End Set
        End Property
        Protected Overloads Overrides Sub WndProc(ByRef m As Message)
            If bCatchMsg AndAlso m.Msg = m_Msg Then
                RaiseEvent OnProcessMessage(m)
                If Not m.Result.Equals(IntPtr.Zero) Then
                    Return
                End If
            End If
            MyBase.WndProc(m)
        End Sub
End Class

'###  Example How to use it #####'
'declare  
Dim withevents oSubclassTest as SubclassWindow
'then put the code in InitializeComponent or where you need
oSubclassTest = New SubclassWindow
With oSubclassCalendar
 .CatchMessage = WM_LBUTTONDOWN  ' or other message
 .AssignHandle(textbox1.Handle) ' or any control/form..etc
End With

'then catch the specific message within OnProcessMessage event
Private Sub SubclassWindow_OnProcessMessage(ByRef m As System.Windows.Forms.Message) Handles oSubclassTest.OnProcessMessage
        'insert your code here (processing...etc)
        '''''''''

        'to stop the message,set Result property: 
        m.Result = New IntPtr(1)
End Sub