Wrox Programmer Forums
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 4th, 2005, 02:17 AM
Authorized User
 
Join Date: Mar 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default Transparent Frame

Ok, this is starting to annoy me, so hopefully someone can help me out with this ;p

Anywho, I want to be able to use a transparent frame that I can put other controls on it. I cant seem to get the regular frame to be transparent.

I decided then to attempt to make my own control. Here I can set BackStyle to transparent, and ControlContainer to true. When I use the control, it is transparent like I wanted it to be, however when I place a control on top of it, it also is transparent ><.

I want to do this so I can turn the visibility of frames layered on top of each other on and off according to menu item, this way I dont have to use another frame, nor do I have to turn multiple objects visibility on and off.

Thanks in advance!
 
Old April 4th, 2005, 11:08 AM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

My frame which I just tried became invisible when I set the borderstyle to none.

Can't you do what you are trying by changing the z-order of the frames?
 
Old April 4th, 2005, 01:05 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The best way to do it is to put in frames only the components that needs to be set visible according to other conditions, like clicking on a menu as in your case, and leave the 'common' controls out (or put them in yet another Frame, as I prefer).
Marco
 
Old April 4th, 2005, 04:51 PM
Authorized User
 
Join Date: Mar 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

oops, in one part of my post I stated "this way I dont have to use another frame", I meant to say form instead of frame.

See, what I would like to do is this. Say there is a menu with 3 options. Also (as marco stated), common controls that deal with all options are not contained within a frame.

Now, there is 3 frames (which are layered on top of each other). I wanted these to be transparent because I have an image as the background of the application. Controls that deal with option 1, are contained in frame1, controls that deal with option2 are contained in frame2, etc.

The frame really doesnt make much relevance to the applications usage. This is something I wanted for simplicity. Since the controls are layered on top of each other, when option1 is changed to option2, all I need to do is say frame1.visibility = false, frame2.visibility=true, instead of stating visibilities for a nice amount of controls.

I hope I made more sense this time ;p
 
Old April 4th, 2005, 06:15 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

sure you can make a usercontrol transparent...
start a new standard exe project, and set the Picture property of the main form to an image (from a file) Add a new usercontrol in it, set its BackStyle to 0 (transparent), and add few controls in it (like a button, a textbox and so on). Now close the usercontrol designer (it is important, otherwise you can't load it) and double click its icon in the toolbox. You'll see a the control added into you form, with its components painted on top of the form picture (that is, you see the form through the control)
Marco





Similar Threads
Thread Thread Starter Forum Replies Last Post
Transparent Label morteza57 C# 5 February 15th, 2008 04:36 PM
How to set one frame src from other frame akumarp2p ASP.NET 1.x and 2.0 Application Design 2 March 13th, 2007 04:13 AM
Transparent Encryption Abbas Classic ASP Professional 2 July 31st, 2006 02:04 PM
parsing form data from frame to other frame audio-catalyst Classic ASP Basics 5 January 3rd, 2006 02:57 PM
Call right frame Page_Load event from left frame. ochanarachel Classic ASP Basics 0 January 28th, 2005 05:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.