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 


Flatten

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 6 Source Code
View previous topic :: View next topic  
Author Message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Wed Dec 16, 2009 7:50 pm    Post subject: Flatten Reply with quote

Here is a command that will "flatten" edit boxes, browser elements or any other element that has a sunken border.

Code:

  :flatten
  if @not(%1)
     error 2
  end
  dialog add,bitbtn,%1_t,@dlgpos(%1,T),@dlgpos(%1,L),@dlgpos(%1,W),2
  dialog add,bitbtn,%1_l,@dlgpos(%1,T),@dlgpos(%1,L),2,@dlgpos(%1,H)
  dialog add,bitbtn,%1_r,@dlgpos(%1,T),@diff(@sum(@dlgpos(%1,L),@dlgpos(%1,W)),2),2,@dlgpos(%1,H)
  dialog add,bitbtn,%1_b,@diff(@sum(@dlgpos(%1,H),@dlgpos(%1,T)),2),@dlgpos(%1,L),@dlgpos(%1,W),2
  dialog disable,%1_t
  dialog disable,%1_l
  dialog disable,%1_r
  dialog disable,%1_b
  exit


Example:
Code:

External VDSBrw60.dll
#define command,browser,flatten
#define function,browser
DIALOG CREATE,New Dialog,-1,0,240,160
REM *** Modified by Dialog Designer on 12/16/2009 - 14:45 ***
  DIALOG ADD,BROWSER,BROWSER1,33,34,40,40,http://www.google.com
  DIALOG ADD,EDIT,EDIT1,91,36,180,19,EDIT1
 
  flatten browser1
  flatten edit1
  DIALOG SHOW
 
  :evloop
  wait event
  goto @event()
 
  :close
  stop

  :flatten
  if @not(%1)
     error 2
  end
  dialog add,bitbtn,%1_t,@dlgpos(%1,T),@dlgpos(%1,L),@dlgpos(%1,W),2
  dialog add,bitbtn,%1_l,@dlgpos(%1,T),@dlgpos(%1,L),2,@dlgpos(%1,H)
  dialog add,bitbtn,%1_r,@dlgpos(%1,T),@diff(@sum(@dlgpos(%1,L),@dlgpos(%1,W)),2),2,@dlgpos(%1,H)
  dialog add,bitbtn,%1_b,@diff(@sum(@dlgpos(%1,H),@dlgpos(%1,T)),2),@dlgpos(%1,L),@dlgpos(%1,W),2
  dialog disable,%1_t
  dialog disable,%1_l
  dialog disable,%1_r
  dialog disable,%1_b
  exit

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vdsalchemist
Admin Team


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

PostPosted: Wed Dec 16, 2009 9:47 pm    Post subject: Reply with quote

Wow Shocked this is Cool and does not require a DLL Wink
_________________
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
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Thu Dec 17, 2009 1:49 am    Post subject: Reply with quote

Yeah, I have done this since using VDS 4, but never really made a command for it. Just a little trick that works nicely.
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Sun Apr 24, 2011 7:38 pm    Post subject: Reply with quote

code / ideal looks somewhat familiar Cool Good stuff!
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 6 Source Code 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 cannot attach files in this forum
You cannot download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group