Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Share Your Creations
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Share Your Creations Show your developed application to Basic4ppc community. Please include source code if possible.


Sun Monitor


Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 10-25-2007, 02:37 AM
alfcen's Avatar
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu
Posts: 424
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Gentlemen,

Just a small 3D bitmap or some shades of color. I have been putting together web sites for years.

I totally lack of in-depth knowledge of the frameworks, nor do I own ability of constructing DLLs with #Develop. On top of this, I have a talent to introduce new bugs as my senile, rusty brain attempts to add functionality.

Most of my apps are enhanced by dzt's and Filippo's irreplaceable DLLs.

In short, I am truly happy to have you at my side
Reply With Quote
  #12 (permalink)  
Old 10-25-2007, 07:20 AM
Senior Member
 
Join Date: May 2007
Posts: 187
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default Gauges

Hi
Until there are controls in the shape of gauges, I used poligons (Erel's suggestion) as demonstrated here:

.....
triangle(track,40)
Form5.FPolygon(alX,0,alY,0,4,Rgb(TRK.R,TRK.G,TRK.B ),f)
Form5.FPolygon(alX,0,alY,0,4,cBlack)
....
Sub Triangle(angle,k)
angle = angle * cPI / 180
s = Sin(angle)
c = Cos(angle)
alX.Item(0) = center_x + k * s
alY.Item(0) = center_y - k * c
alX.Item(1) = center_x + 6 * c + 7 *s
alY.Item(1) = center_y - 7 * c + 6 * s
alX.Item(2) = center_x + 10 * s
alY.Item(2) = center_y - 10 * c
alX.Item(3) = center_x - 6 * c + 7 * s
alY.Item(3) = center_y - 7 * c - 6 * s
End Sub
.....

and it is drawn on the background of an image of a map, so an image of the instrument is the same.
Attached Images
File Type: jpg gauge.jpg (45.6 KB, 15 views)
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #13 (permalink)  
Old 10-25-2007, 08:05 AM
alfcen's Avatar
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu
Posts: 424
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Very nice, David,

Your method allows scaling, thick lines, etc. A true alternative.

A control would require a vector graphic as background image rather than a bitmap to allow virtually limitless scaling of the control's dimensions.
Reply With Quote
  #14 (permalink)  
Old 10-25-2007, 03:38 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,689
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Being inspired by seeing alfcens' gauges I've been playing with pictures and polygons to make analogue gauges. To make it easier I've taken derez' code above, added a bit to it and parameterized it to make playing with different pointer shapes easier. Someone might be interested so I've posted it below. You can make a surprising number of different pointer styles by playing with different parameters!
Attached Images
File Type: jpg Clock.jpg (3.7 KB, 15 views)
Attached Files
File Type: sbp Pointer.sbp (2.3 KB, 12 views)
Reply With Quote
  #15 (permalink)  
Old 10-25-2007, 07:55 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,134
Default

Looks great!
You should zip the picture (with the code) as the forum changes its size and causes the large clock to be in a wrong size.
Reply With Quote
  #16 (permalink)  
Old 10-26-2007, 08:37 AM
alfcen's Avatar
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu
Posts: 424
Awards Showcase
Beta Tester 
Total Awards: 1
Default

That's a gorgeous gauge, agraham.
Reply With Quote
  #17 (permalink)  
Old 10-26-2007, 10:43 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,689
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by Erel View Post
Looks great!
You should zip the picture (with the code) as the forum changes its size and causes the large clock to be in a wrong size.
Zipped!
Attached Files
File Type: zip Clock.zip (4.8 KB, 14 views)
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:18 PM.


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