RSS Forums RSS
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 2740 | Replies: 3
Reply
Join Date: Jan 2005
Posts: 8
Reputation: rooparaj is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rooparaj rooparaj is offline Offline
Newbie Poster

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

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 108
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

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

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

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

  #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  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 108
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

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

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:17 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC