Can anybody give answers for these 2 queries ??!!??

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jan 2005
Posts: 8
Reputation: rooparaj is an unknown quantity at this point 
Solved Threads: 0
rooparaj rooparaj is offline Offline
Newbie Poster

Can anybody give answers for these 2 queries ??!!??

 
0
  #1
Mar 29th, 2005
1.Compute CRC32 checksum, write a quick piece of code that accepts the packet of data and returns the CRC.
2.How do you use the Mouse OFF event
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Can anybody give answers for these 2 queries ??!!??

 
0
  #2
Mar 29th, 2005
I need a little more information than that! Mouse Off? Like, when the mouse leaves the form?
Reply With Quote Quick reply to this message  
Join Date: Jan 2005
Posts: 8
Reputation: rooparaj is an unknown quantity at this point 
Solved Threads: 0
rooparaj rooparaj is offline Offline
Newbie Poster

Re: Can anybody give answers for these 2 queries ??!!??

 
0
  #3
Mar 29th, 2005
Originally Posted by Comatose
I need a little more information than that! Mouse Off? Like, when the mouse leaves the form?
Even i dint get this meaning.I got this question when i was searching for vb interview question.
I got almost all the answers except these 2 . so i thought i may get answers from daniweb and i kept in forum.

Thax for ur reply
regards
Roopa raj
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Can anybody give answers for these 2 queries ??!!??

 
0
  #4
Mar 29th, 2005
Unless VB.Net has a mouse off event (which it might, I don't know), The answer is "there isn't one". I know VB6 doesn't have one. The only way to find out if the mouse has gone off the form is to use an api call. You need to use the getcursorpos api, and pass it the POINTAPI Type. This will effectively give you the current X Y coordinates of the mouse.
Then, you get the current X, Y coordinates of your form (maybe using getwindowrect, with type RECT), and then compare to see if the mouse falls within those boundaries. If it is within those boundaries, the mouse is on the form. If it's not, then it isn't. So you could use a timer control, and check every millisecond where the mouse is. As long as it's on your form, set a variable to true. When it leaves your form, set it false, and execute some kind of "off form" code. Another option, is to set a global hook on the mouse, and whenever you recieve a WM_MOUSEMOVE, check it's coordinates, compare, and execute.

As for the checksum, I found This neat information:
http://www.vbaccelerator.com/home/VB...32/article.asp
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC