Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

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

Rotating arrow

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-11-2007, 12:49 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default Rotating arrow

This is an example of using the form's ForeLayer property with the Polygon method to create a rotating arrow.
The position of each coordinate is calculated using this formula:
New X = X * Cos(degree) - Y * Sin(degree)
New Y = Y * Cos (degree) + X * Sin(degree)

As we are using the forelayer there is no need to redraw the background.
Attached Images
File Type: jpg Picture1.jpg (18.3 KB, 75 views)
Attached Files
File Type: sbp Arrow.sbp (1.2 KB, 241 views)
Reply With Quote
  #2 (permalink)  
Old 06-08-2007, 08:42 AM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default letter - number

Hi Erel
Thank you for this example - it was helpful for me.
Took me a while to understand why when I type the code I get an error, and if I copy it from youe example - it runs.
The problem is that "l" and "1" in the program look very similar (the name of the array is alX)
see photo.
David
Attached Images
File Type: jpg alx.JPG (10.6 KB, 69 views)
Reply With Quote
  #3 (permalink)  
Old 06-08-2007, 09:13 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

I see your point.
Next time it will be named list1 as it is more clear.
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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
ide and arrow keys dennishea Questions (Windows Mobile) 0 09-22-2008 09:45 PM
Capturing the arrow keys on the desktop Louis Questions (Windows Mobile) 1 08-31-2007 09:01 PM


All times are GMT. The time now is 09:35 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0