By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,815 Members | 1,152 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,815 IT Pros & Developers. It's quick & easy.

form stacking and visibility using transparency

P: n/a
How do I control the layering of 4 forms of identical size and position to
cause the desired form to be second from the top..

Form1 has my welcome screen etc.and the code for file manipulations etc. etc

Form2 has a foreground image of a decorative picture frame (,png image) with
a transparent center, and a tab control for the user to select .bmp
pictures to view.

Form3 has a "picturebox" into which is loaded the user.bmp file image
selected in form2

I display the user image using a "picutrebox" on Form3, and since the
picturebox is set to a size much larger than the form I can scroll it at
will even beyond the size of the form, with the user seeing only the portion
behind the transparen center of the picture frame.

II tried using just Form2, but if my image is used as the background, I
cannot over size it and manipulate the location and size, and of course, if
it is the foreground, then my image of the picture frame will not appear in
front of it.
So now I have the picture frame as forground image of Form2
Backgound color of Form2 as transparent.
So now the picture frame shows form1 or the desk top below.
I created form3 to display the user images, and scroll the picture as
needed.

Other than send to the top or send to the bottom, how do I control the
stacking of mutlple forms of identical size and location, so I can specify
which form is on top, and which comes 2nd 3rd etc in order to make use of
transparency in various layers. The use must not be able to move the forms.

thanx......joisey
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I would suggest not using forms. instead, perhaps just use stacked
panels on a form.

You can get control of the paint and transparency of a control by:

Me.SetStyle(System.Windows.Forms.ControlStyles.Dou bleBuffer, True)
Me.SetStyle(System.Windows.Forms.ControlStyles.All PaintingInWmPaint,
False)
Me.SetStyle(System.Windows.Forms.ControlStyles.Res izeRedraw, True)
Me.SetStyle(System.Windows.Forms.ControlStyles.Use rPaint, True)
Me.SetStyle(System.Windows.Forms.ControlStyles.Sup portsTransparentBackColor,
True)
MyBase.BackColor = System.Drawing.Color.Transparent

-Steve.

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.