SunQuest
           Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old November 9th, 2003, 04:21 AM
toughcoder toughcoder is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 49 toughcoder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 sec
Reputation Power: 6
Send a message via Yahoo to toughcoder
Unhappy Plz help with this code

Greetings Every1,
Look at this code,
------------------------------------------------------
Dim Draw as Boolean
Dim MX as Single,MY as single

Private Sub Form_MouseDown(Button as Integer,Shift as Integer,X as integer,Y as Integer)
Draw=True
MX=X
MY=Y
End Sub

Private Sub Form_MouseMove(Button as Integer,Shift as Integer,X as integer,Y as Integer)
if Draw=False Then Exit Sub
Line(MX,MY)-(MX+5,MY+5),,BF
MX=X
MY=Y
End Sub

Private Sub Form_MouseUp(Button as Integer,Shift as Integer,X as integer,Y as Integer)
Draw=False
End Sub

----------------------------------------------
If the mouse is moved slowly, the effect is good, but if u move it a bit sudden, the squares are drawn hithero. I want to emulate the MS-Paint bursh effect. Any possible solutions. Plz help

Reply With Quote
  #2  
Old November 10th, 2003, 04:32 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via MSN to cleverpig
I have tried your code..It's happened as your said:i move the mouse suddenly,the sequares are drawn hithero..I think it's luck of the line method...U can try to use "lineto" win32 api function.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Plz help with this code


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway