Click here to Skip to main content
16,005,241 members
Home / Discussions / C#
   

C#

 
GeneralRe: ArrayList of value types Pin
Luis Alonso Ramos23-Jul-05 15:10
Luis Alonso Ramos23-Jul-05 15:10 
GeneralRe: ArrayList of value types Pin
LongRange.Shooter25-Jul-05 10:17
LongRange.Shooter25-Jul-05 10:17 
QuestionConnection Database? Pin
pmasknguyen23-Jul-05 6:01
pmasknguyen23-Jul-05 6:01 
AnswerRe: Connection Database? Pin
Christian Graus23-Jul-05 11:05
protectorChristian Graus23-Jul-05 11:05 
QuestionHow to deal with Mouse Events & custom events in a component? Pin
Cheng Zhong23-Jul-05 5:53
Cheng Zhong23-Jul-05 5:53 
AnswerRe: How to deal with Mouse Events & custom events in a component? Pin
Anonymous23-Jul-05 18:35
Anonymous23-Jul-05 18:35 
GeneralRe: How to deal with Mouse Events & custom events in a component? Pin
Cheng Zhong24-Jul-05 2:36
Cheng Zhong24-Jul-05 2:36 
GeneralRe: How to deal with Mouse Events & custom events in a component? Pin
Anonymous24-Jul-05 7:12
Anonymous24-Jul-05 7:12 
I dont know if this helps

Sample class

Private Class MyListener

Inherits NativeWindow

Public Event MyMouseMove(ByVal sender As Object, ByVal e As EventArgs)

Const WM_MOUSEMOVE = &H200

Private ctrl As Control

Public Sub New(ByVal ctrl As Control)

AssignHandle(ctrl.Handle)

End Sub

Protected Overrides Sub WndProc(ByRef m As Message)

' Listen for operating system messages

If m.Msg = WM_MOUSEMOVE Then

RaiseEvent MyMouseMove(ctrl, New EventArgs)

End If

MyBase.WndProc(m)

End Sub

Protected Overrides Sub Finalize()

ReleaseHandle()

MyBase.Finalize()

End Sub

End Class

How to use

Dim WithEvents sl As MyListener

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

sl = New MyListener(TextBox1)

End Sub

Private Sub sl_MyMouseMove(ByVal sender As Object, ByVal e As
System.EventArgs) Handles sl.MyMouseMove

Me.Text = "My Mouse Move"

End Sub


Thanks

Alomgir Mih
Live Live King Size
GeneralUnhandled Exception Pin
Mingzhi_8623-Jul-05 2:59
Mingzhi_8623-Jul-05 2:59 
GeneralRe: Unhandled Exception Pin
EssOEss23-Jul-05 3:57
EssOEss23-Jul-05 3:57 
GeneralRe: Unhandled Exception Pin
Mingzhi_8623-Jul-05 17:46
Mingzhi_8623-Jul-05 17:46 
GeneralText in a listview column Pin
Haim Yulzari23-Jul-05 2:52
Haim Yulzari23-Jul-05 2:52 
GeneralRe: Text in a listview column Pin
Anonymous23-Jul-05 18:30
Anonymous23-Jul-05 18:30 
GeneralRe: Text in a listview column Pin
Haim Yulzari24-Jul-05 1:49
Haim Yulzari24-Jul-05 1:49 
Generalsigning and strong names Pin
dirkhelmet!@yahoo.com23-Jul-05 2:13
dirkhelmet!@yahoo.com23-Jul-05 2:13 
GeneralRe: signing and strong names Pin
Rob Graham23-Jul-05 4:19
Rob Graham23-Jul-05 4:19 
GeneralWSA Cancell Blocking Call Socket Exception Pin
meetsukant23-Jul-05 1:55
meetsukant23-Jul-05 1:55 
Generalexpression evaluation Pin
khalouda23-Jul-05 0:07
khalouda23-Jul-05 0:07 
GeneralRe: expression evaluation Pin
S. Senthil Kumar23-Jul-05 0:35
S. Senthil Kumar23-Jul-05 0:35 
GeneralRe: expression evaluation Pin
khalouda23-Jul-05 3:13
khalouda23-Jul-05 3:13 
GeneralRe: expression evaluation Pin
Dario Solera24-Jul-05 10:55
Dario Solera24-Jul-05 10:55 
GeneralProblem in adding bool check column to datagrid. Pin
amrutajoshi22-Jul-05 23:13
amrutajoshi22-Jul-05 23:13 
GeneralRe: Problem in adding bool check column to datagrid. Pin
Srinivas Jonnalagadda23-Jul-05 7:55
Srinivas Jonnalagadda23-Jul-05 7:55 
GeneralRe: Problem in adding bool check column to datagrid. Pin
Wyxlwiis23-Jul-05 10:35
Wyxlwiis23-Jul-05 10:35 
GeneralMarshal.PtrToStructure gives gibberish Pin
EssOEss22-Jul-05 22:41
EssOEss22-Jul-05 22:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.