Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Code Samples & Tips
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Code Samples & Tips Share your recent discoveries and ideas with other users.


rubber banding


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-22-2008, 02:41 PM
Junior Member
 
Join Date: Apr 2007
Location: Steinheim, Germany
Posts: 39
Default rubber banding

Hi,
maybe usefull for some GPS apps and track drawings:
Code:
Sub Globals
	'Declare the global variables here.
	Dim Type(sx,sy,ex,ey)m As Int16
	draw = ""
End Sub

Sub App_Start
	Form1.Show
	Form1.ForeLayer = true
End Sub


Sub Form1_MouseDown (x,y)
	m.sx = x
	m.sy = y
	Form1.Circle(x,y,5,cRed,F)
	draw = true
End Sub

Sub Form1_MouseMove (x,y)
                         If draw = true Then
		m.ex = x
		m.ey = y
		Else
			m.ex = m.sx
			m.ey = m.sy
	End If
	Form1.FErase(0,0,Form1.Width,Form1.Height)
	Form1.FLine(m.sx,m.sy,m.ex,m.ey,cGreen)
End Sub

Sub Form1_MouseUp (x,y)
	Form1.Line(m.sx,m.sy,x,y,cGreen)
	Form1.Circle(m.sx,m.sy,5,cRed,F)
	Form1.Circle(m.ex,m.ey,5,cRed,F)
	draw = false
End Sub
__________________
Thanks for all
wolfgang
___________________
Desktop: Dual Core 2.2 GHz, XP SP2
Device: IPAQ 3970 WM 2003, Asus 632N WM5
GPS: Clip-on Bluetooth, Navman 3000
Reply With Quote
Reply



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

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
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 06:13 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0