forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


resize bitmap [SOLVED]

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Wed Dec 15, 2010 11:54 pm    Post subject: resize bitmap [SOLVED] Reply with quote

Hi to all,

i would like resize a bitmap onfly moving 2 trakbar
1 for height
1 for width


mantain bitmap position centered on dialog (if possible)
but at now I don't work and I don't understand why.....maybe I' to
much stupid Stupid
There is my code:
Code:
%%IcoA = @IniRead(Generale,IcoA,40)
%%IcoL = @IniRead(Generale,Icol,40)

  DIALOG CREATE,Configurazione,-1,0,259,226,Ontop,Smallcap Child
  DIALOG ADD,STYLE,STYLE2,Verdana,10,B,,
  DIALOG ADD,STYLE,STYLE1,Times New Roman,,,,
  DIALOG ADD,GROUP,GROUP1,6,33,174,176,Dimensione Icona,,STYLE1
  DIALOG ADD,BITMAP,ICONA,83,104,32,32,#f.bmp,,STRETCH
  DIALOG ADD,BITBTN,Salva,161,223,32,32,#Conferma.BMP
  DIALOG ADD,BITBTN,Chiudi,190,223,32,32,#Annulla.bmp
  DIALOG ADD,TRACKBAR,Larghezza,185,20,180,32,10|152|1,%%IcoL,Larghezza Icona,CLICK,LEFT,HAND
  DIALOG ADD,TRACKBAR,Altezza,6,-2,35,175,10|152|1,%%IcoA,Altezza Icona,VERTICAL,CLICK,HAND
  DIALOG ADD,TEXT,Tx,28,215,,,X: %%IcoL,,STYLE2
  DIALOG ADD,TEXT,Ty,52,216,,,Y: %%IcoA,,STYLE2
  DIALOG SHOW
:cLoop 
  Wait Event
  %%eC = c@Event()
  Goto %%eC
 
:cSalvaButton
IniFile Write,Generale,IcoA,%%IcoA 
IniFile Write,Generale,IcoL,%%IcoL
Goto cClose


:cAltezzaClick 
%%IcoA = @Abs(@DlgText(Altezza))
Dialog SetPos,ICONA,24,36,%%Icoa,%%Icol
Dialog Set,Ty,Y: %%IcoA
Goto cLoop

:cLarghezzaClick 
%%IcoL = @DlgText(Larghezza)
Dialog SetPos,ICONA,24,36,%%Icoa,%%Icol
Dialog Set,Tx,X: %%IcoL
Goto cLoop

:cClose
:cChiudiButton
Dialog Close
While @Event()
Wend
Exit


Someone can help me please?
Many tnx in advance


Last edited by Tdk161 on Mon Dec 20, 2010 11:51 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Fri Dec 17, 2010 4:28 am    Post subject: Reply with quote

Tommy Sools has a DLL somewhere on the main site that will help you with manipulating images. It might be part of the VDSDLL package. I've used which ever DLL it is for such things as making screen zoomers, color pickers and screen captures.
_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sat Dec 18, 2010 12:34 am    Post subject: Reply with quote

For a start you will be limited to "100" with the vertical bar. You will also need to make the min "0" else zero will be at the position you set for min. This needs to fixed if there is ever another version of VDS.

You will have to do some math to the "top" and "left" attributes of the bitmap if you want to keep it centered. e.g. decrease the top pos for every 2 increments and increase for for every 2 decrements on the vertical bar

Hope that points you in the right direction
Back to top
View user's profile Send private message Send e-mail
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Mon Dec 20, 2010 11:51 pm    Post subject: Reply with quote

Very Happy Solved, Many tnx to all
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group