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 


Invisible elements

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


Joined: 07 Jan 2004
Posts: 25

PostPosted: Sun Aug 14, 2005 12:20 am    Post subject: Invisible elements Reply with quote

Is it possible make invisible elements in a dialog? i mean, for example a text element without the silver background...
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


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

PostPosted: Sun Aug 14, 2005 1:28 am    Post subject: Reply with quote

Quatre87,
Sorry Quatre there is no simple way to achieve this with VDS. You would have to use the Win32 API Region functions and clear the region where the text element is located. The hard part is clearing the text elements background and not its text. The API functions you should look at is CombineRgn, SetWindowRgn, GetWindowRgn, CreateRoundRectRgn, CreateRectRgn, and etc...

There is many sites with Visual Basic code that you could probably translate to the VDS 5.x @lib function.

http://msdn.microsoft.com

http://www.vbaccelerator.com/home/VB/Code/Libraries/Graphics_and_GDI/Changing_Window_Shapes/Creating_Geometric_Window_Shapes/WinShap_Project_Files_zip_WinShape_frm.asp

Sorry I cannot be of more help at this time. Soon there will be a easier way to do this. For now this is a very complex issue that you are asking for a solution for which cannot be achieved with the basic commands/functions of VDS.
My only other suggestion would be to put the text onto a graphic and place the graphic on a Bitmap element. The pixel at the X = 0 Y = 0 of the bitmap will be the transparent color for the bitmap.

Code:

DIALOG CREATE,New Dialog,-1,0,542,304,INVISIBLE
  DIALOG ADD,STYLE,STYLE1,,12,B,FF8040,BLACK
REM *** Modified by Dialog Designer on 8/13/2005 - 21:31 ***
  DIALOG ADD,BUTTON,BUTTON1,206,200,64,24,BUTTON1
  # Put some text on the bitmap and border the text with a solid color
  # Then the text will be visible but the background of the bitmap will not
  DIALOG ADD,BITMAP,BITMAP1,83,163,0,0,mybitmap.bmp,,INVISIBLE
  DIALOG SHOW

:EVLOOP
  WAIT EVENT
  %E = @event()
  if %E
    goto %E
  end
goto evloop
:CLOSE

EXIT
:BUTTON1BUTTON
  Info Do something really cool now.
goto evloop

_________________
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
Aslan
Valued Contributor
Valued Contributor


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

PostPosted: Tue Aug 16, 2005 5:59 pm    Post subject: Reply with quote

As far as the text element goes you can use the TRANSPARENT style to make the text element background invisible.
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