#include "fivewin.ch"
//----------------------------------------------------------------------------//
function Main()
local cImage, oImage
local oDlg
cImage := "c:\fwh\bitmaps\alphabmp\widgets.bmp" // your image file
DEFINE DIALOG oDlg SIZE 500,400 PIXEL TRUEPIXEL
@ 20, 20 XIMAGE oImage SOURCE cImage SIZE 256,256 OF oDlg
@ 20,300 BTNBMP PROMPT "Spin" SIZE 160,40 PIXEL OF oDlg FLAT ;
ACTION Spin( oImage )
ACTIVATE DIALOG oDlg CENTERED
return nil
//----------------------------------------------------------------------------//
function Spin( oImage )
local nStep := 5
local n
for n := 1 to 1000 / nStep
oImage:Rotate( nStep )
SysWait( 0.005 * nStep )
next
return nil
//----------------------------------------------------------------------------//
#include "fivewin.ch"
function Main()
local cImage, oImage
local oDlg
cImage := "..\bitmaps\alphabmp\widgets.bmp" // your image file
DEFINE DIALOG oDlg SIZE 500,400 PIXEL TRUEPIXEL TRANSPARENT
@ 20, 20 XIMAGE oImage SOURCE cImage SIZE 256,256 OF oDlg NOBORDER
@ 20,300 BTNBMP PROMPT "Spin" SIZE 160,40 PIXEL OF oDlg FLAT ;
ACTION Spin( oImage )
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT BuildBrush( oDlg )
return nil
// -------------
function BuildBrush( oDlg )
local oImage, oBrush, aRect := oDlg:GetRect()
DEFINE IMAGE oImage FILENAME "..\bitmaps\backgrnd\blustone.bmp"
oBrush := TBrush():new( ,,,, ResizeBmp( oImage:hBitmap, aRect[4], aRect[3], .T. ) ) // 1 = stretch, 2 : fitoutside, 3:fitinside
oImage:End()
oDlg:SetBrush( oBrush )
oBrush:End()
return nil
//----------------
function Spin( oImage )
local nStep := 5
local n
for n := 1 to 1000 / nStep
oImage:Rotate( nStep )
SysWait( 0.005 * nStep )
next
return nil
Enrico Maria Giordano wrote:Maybe you can get the number from the current rotation angle?
EMG
nageswaragunupudi wrote:Do not put the arrow inside ximage rectangle. Place it as separate bitmap on the right side of ximage.
Visually user can read the number
Through program you should derive the number from oImage:nRotation
ukoenig wrote:Converted and repainted to a real alphablended PNG
maybe You like it
http://www.pflegeplus.com/IMAGES/Roulette.png
regards
Uwe
nageswaragunupudi wrote:oImage:nRotate --> Degrees
nDegrees := oImage:nRotate % 360
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: jmartial and 98 guests