Subclassing in .NET

From HashVB
Revision as of 07:46, 19 August 2007 by Spammer-JekYuj (Talk)

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