Click here to Skip to main content
15,916,019 members
Home / Discussions / C#
   

C#

 
GeneralDisplaying data from database into a checkbox list Pin
M3L18-May-04 22:47
M3L18-May-04 22:47 
GeneralRe: Displaying data from database into a checkbox list Pin
Heath Stewart19-May-04 4:13
protectorHeath Stewart19-May-04 4:13 
GeneralNetwork listener Pin
mhmoud rawas18-May-04 22:26
mhmoud rawas18-May-04 22:26 
QuestionDisposing Collection of IDisposable? Pin
Dr Herbie18-May-04 22:26
Dr Herbie18-May-04 22:26 
AnswerRe: Disposing Collection of IDisposable? Pin
Daniel Turini18-May-04 22:43
Daniel Turini18-May-04 22:43 
GeneralDesign Time Property Window Pin
acidcrush18-May-04 22:19
acidcrush18-May-04 22:19 
GeneralRe: Design Time Property Window Pin
Heath Stewart19-May-04 4:08
protectorHeath Stewart19-May-04 4:08 
Generalproblem with using VNC hooking Pin
fu018-May-04 22:03
fu018-May-04 22:03 
problem with using VNC hooking
--------------------------------------------------------------
i have got a vnchood.dll and its source code.
the vnchood.dll use a global hook to monitor the desktop's changed area. i want to implement it in my c# project. but i dont know how to use it.

after my study on the source code ,i draw a conclusion: the hook posts messages to its calling thread, and the thread handle the coming message and to do something.
in my c# project,i invoke peekMessage() to gain the message from the hook. but the message seems wrong for it is always an invalide massage.

here is my part code:

private void hookthread()
{
while(true)
{
if(PeekMessage( ref msg,IntPtr.Zero,0,0,1))
{
if ( msg.message == UPDATEMSG )
{
idle_skip = true;
Console.WriteLine("hwnd:"+msg.hwnd);
}
else if ( msg.message == MOUSEMSG )
{
idle_skip = true;
Console.WriteLine("hwnd:"+msg.hwnd);
}
else if ( msg.message == WNDMSG )
{
Console.WriteLine("hwnd:"+msg.hwnd);
}
else if ( msg.message == WM_QUIT )
{
break;
}
else if ( msg.message == WM_USER )
{
Console.WriteLine("hwnd:"+msg.hwnd);
}
else if ( msg.message == WM_USER+2 )
{
Console.WriteLine("hwnd:"+msg.hwnd);
}
else if ( msg.message == WM_USER+1 )
{
}
else
{
TranslateMessage(ref msg); <--- the Loop always be here
DispatchMessage(ref msg);
idle_skip = true;
}
}
else
{
dosomthing();
}
}

---------------------------------
can u give me a suggestion ? or other C# sample using VNC hooking ?
GeneralRe: problem with using VNC hooking Pin
Dave Kreskowiak19-May-04 3:24
mveDave Kreskowiak19-May-04 3:24 
GeneralSockets question Pin
Vladimir Georgiev18-May-04 20:47
Vladimir Georgiev18-May-04 20:47 
GeneralRe: Sockets question Pin
Roman Rodov18-May-04 21:07
Roman Rodov18-May-04 21:07 
GeneralRe: Sockets question Pin
Vladimir Georgiev19-May-04 2:44
Vladimir Georgiev19-May-04 2:44 
GeneralRe: Sockets question Pin
Heath Stewart19-May-04 4:02
protectorHeath Stewart19-May-04 4:02 
Generalconnecting user controls in c sharp Pin
samithas18-May-04 19:33
samithas18-May-04 19:33 
GeneralRe: connecting user controls in c sharp Pin
etfintnick19-May-04 2:03
etfintnick19-May-04 2:03 
GeneralRe: connecting user controls in c sharp Pin
Heath Stewart19-May-04 3:55
protectorHeath Stewart19-May-04 3:55 
Generalregd C# classes Pin
karteek18-May-04 19:21
karteek18-May-04 19:21 
GeneralRe: regd C# classes Pin
Charlie Williams18-May-04 19:52
Charlie Williams18-May-04 19:52 
GeneralRe: regd C# classes Pin
sreejith ss nair18-May-04 20:21
sreejith ss nair18-May-04 20:21 
GeneralRe: regd C# classes Pin
etfintnick19-May-04 2:06
etfintnick19-May-04 2:06 
GeneralC# Class Pin
sreejith ss nair18-May-04 17:20
sreejith ss nair18-May-04 17:20 
GeneralRe: C# Class Pin
TigerNinja_18-May-04 18:17
TigerNinja_18-May-04 18:17 
GeneralRe: C# Class Pin
Stefan Troschuetz18-May-04 20:53
Stefan Troschuetz18-May-04 20:53 
GeneralRe: C# Class Pin
sreejith ss nair18-May-04 21:22
sreejith ss nair18-May-04 21:22 
GeneralRe: C# Class Pin
Colin Angus Mackay18-May-04 22:53
Colin Angus Mackay18-May-04 22:53 

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.