| View previous topic :: View next topic |
| Author |
Message |
Quatre87 Valued Newbie
Joined: 07 Jan 2004 Posts: 25
|
Posted: Sun Aug 14, 2005 12:20 am Post subject: Invisible elements |
|
|
| Is it possible make invisible elements in a dialog? i mean, for example a text element without the silver background... |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Sun Aug 14, 2005 1:28 am Post subject: |
|
|
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 |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Tue Aug 16, 2005 5:59 pm Post subject: |
|
|
| As far as the text element goes you can use the TRANSPARENT style to make the text element background invisible. |
|
| Back to top |
|
 |
|
|
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
|
|