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 


Element "Virtually" out of a dialog

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Marcelito Escort
Newbie


Joined: 22 Jun 2004
Posts: 10

PostPosted: Mon Jun 28, 2004 1:15 pm    Post subject: Element "Virtually" out of a dialog Reply with quote

How can I do to place an element in a pos <0.
This is an example of what i´m trying to do:

Code:

DIALOG CREATE,New Dialog,-1,0,240,351
DIALOG ADD,LINE,LINE1,30,104,113,358
DIALOG ADD,BUTTON,up,42,18,64,24,,,up
DIALOG ADD,BUTTON,down,259,23,64,24,down
DIALOG SHOW
:menu
wait event
goto @event()
:close
Stop
:upbutton
dialog setpos,line1,@diff(@dlgpos(line1,T),10),104
goto menu
:downbutton
dialog setpos,line1,@sum(@dlgpos(line1,T),10),104
goto menu


When you push the down button LINE1 goes down and "virtually" out of the dialog. When you push the up button LINE1 goes up untill Top >0
How can i get the same effect? like with the down button...
Is it imposible to place an element in a pos -x?

Thanks a lot....

Post has been edited by Vic to make it use the [code:1:b0324d684e] tag
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Mon Jun 28, 2004 1:46 pm    Post subject: Reply with quote

It's not possible using DIALOG SETPOS, because VDS treats a negative top or left position as null, in order that you can change the width or height without having to specify the top and left position.

There's probably an API way to do it...

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
Garrett
Moderator Team


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

PostPosted: Mon Jun 28, 2004 2:52 pm    Post subject: Reply with quote

Jules, would WINDOW POSITION,~ELEMENT,-10,-10 work?
_________________
'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
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Jun 28, 2004 3:01 pm    Post subject: Reply with quote

Garrett wrote:
Jules, would WINDOW POSITION,~ELEMENT,-10,-10 work?


Garrett, wouldn't it be WINDOW POSITION,@winexists(~ELEMENT),-10,-10? Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Mon Jun 28, 2004 3:11 pm    Post subject: Reply with quote

If you use the window position command, please note that you have to give the position relative to the screen, not to the dialog itself... Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Garrett
Moderator Team


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

PostPosted: Mon Jun 28, 2004 6:53 pm    Post subject: Reply with quote

FreezingFire wrote:
Garrett wrote:
Jules, would WINDOW POSITION,~ELEMENT,-10,-10 work?


Garrett, wouldn't it be WINDOW POSITION,@winexists(~ELEMENT),-10,-10? Smile


Eeeee.... Yeah, that's what I meant Embarassed

_________________
'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
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Tue Jun 29, 2004 12:37 pm    Post subject: Reply with quote

I dunno. WINDOW POSITION is basically a wrapper round an API call, so it might work, except that getting the handle of the dialog element you want to move isn't as simple as using @winexists().

@winexists() only gets you main windows. You would have to walk through the child windows to find the handle of the child you want, pretty much like the Window Spy does. The good news is that you only have to do this once, because once the element is created its handle will stay the same for the duration of the program.

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
Marcelito Escort
Newbie


Joined: 22 Jun 2004
Posts: 10

PostPosted: Tue Jun 29, 2004 5:27 pm    Post subject: Reply with quote

and... how can i get the handle of an especific element in my dialog?
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Wed Jun 30, 2004 4:14 pm    Post subject: Reply with quote

Marcelito Escort wrote:
and... how can i get the handle of an especific element in my dialog?


%%Handle = @winexists(~MyEditBox)

Just make sure you put the '~' char infront of the name of the element. This will work for most elements with the exception of the bitmap and text elements since these use the Win32 GDI api to bitblt and textout the bitmaps and text to the VDS dialog. In other words any VDS element that is a Windows control you will be able to get the Window handle for it.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Wed Jun 30, 2004 5:39 pm    Post subject: Reply with quote

Of course it does! For some reason, I was thinking about getting the handle of an element from another application. @winexists() can get the handle of an application's own elements (if they have one). Thanks for correcting my mistake.
_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
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