From: Bart Steur on 11 Oct 2005 05:57 The image underneath (lower in z-order) is a Kodak Image Control. It contains a Multi Image TIFF. I place highlights (annotations) on the tiff image. The highlights mark some textparts that need to be typed into the textbox(es) in the TRANSPARENT picturebox control. All I want to know, can you make a picturebox transparent. I've tried the way you can you to make a Form transparent (using SetLayeredWindowAttributes), but that doesn't work for a Picturebox. Anyone? "Jan Hyde" <StellaDrinker(a)REMOVE.ME.uboot.com> wrote in message news:t12nk1pmr9ae62u7dmnf96fmb7bcbb5td0(a)4ax.com... > "Bart Steur" <solnews(a)xs4all.nl>'s wild thoughts were > released on Tue, 11 Oct 2005 10:12:29 +0200 bearing the > following fruit: > >>What do you mean with Background hosted? > > I asume you have set the background of the form to a > picture? Ie the form is hosting the picture. > > Why not set the picture property of the *picture* box > instead > > J > >>"Jan Hyde" <StellaDrinker(a)REMOVE.ME.uboot.com> wrote in message >>news:ocsmk19feq1blq9k50pffmi3pc5opf64gm(a)4ax.com... >>> "Bart Steur" <bstnews(a)xs4all.nl>'s wild thoughts were >>> released on Mon, 10 Oct 2005 19:54:39 +0200 bearing the >>> following fruit: >>> >>>>I want the possiblity to move the textboxes around, since there can be >>>>more >>>>than one, the picturebox (as container) can grow quite large. Therefore >>>>I >>>>want it to be transparent, so the background is still (partially) >>>>readable. >>> >>> Why isn't the 'background' hosted in the picturebox. >>> >>> J >>> >>>> >>>>"Mike Williams" <Mike(a)WhiskyAndCoke.com> schreef in bericht >>>>news:die3om$pq9$1(a)newsg3.svr.pol.co.uk... >>>>> "Bart Steur" <solnews(a)xs4all.nl> wrote in message >>>>> news:uOBw3YazFHA.1256(a)TK2MSFTNGP09.phx.gbl... >>>>> >>>>>> The picturebox is a container for 1 or more text boxes. Underneath >>>>>> the picture box is a image with some text that needs to be typed into >>>>>> the textbox(es). >>>>> >>>>> You've got me confused there, Bart. If you don't want to see the >>>>> Picture >>>>> Box then why is it there? Why not simply place the Text Boxes >>>>> themselves >>>>> over the background image? Can you please be a bit more specific as to >>>>> exactly what it is you want to do. >>>>> >>>>> Mike >>>>> >>>>> >>>>> >>>>> >>>> >>> >>> >>> Jan Hyde (VB MVP) >>> >>> -- >>> Arrest: What you take when you are tired. (Leopold Fechtner) >>> >>> [Abolish the TV Licence - http://www.tvlicensing.biz/] >>> >> > > > Jan Hyde (VB MVP) > > -- > Lysdexia: a peech imspediment we live to learn with. (Ed Hexter) > > [Abolish the TV Licence - http://www.tvlicensing.biz/] >
From: Mike Williams on 11 Oct 2005 07:00 "Bart Steur" <solnews(a)xs4all.nl> wrote in message news:OP9H1okzFHA.3588(a)tk2msftngp13.phx.gbl... > The image underneath (lower in z-order) is a Kodak Image Control. > It contains a Multi Image TIFF. I place highlights (annotations) on the > tiff image. The highlights mark some textparts that need to be typed > into the textbox(es) in the TRANSPARENT picturebox control. All > I want to know, can you make a picturebox transparent. I've tried > the way you can you to make a Form transparent (using SetLayered > WindowAttributes), but that doesn't work for a Picturebox. I've written code years ago to make picture boxes transparent, but it doesn't seem to work on XP. There is probably another way of doing it, but I haven't got time to look into it at the moment. By the way, why did you not take up Jan's suggestion of using the Picture Box (rather than the Form) as the Kodak Image Control's container?Another way out would be to write code that checks at run time what controls are in the Picture Box and then moves then into the Form instead at the appropriate positions and then gets rid of the Picture Box altogether (or at least gets rid of its visual presence by setting its Visible property to False). That would certainly achieve the effect you seem to want (where the picture box is really only acting as a "design time" container). Try the following. The example is for a borderless picture box (which you could set to whatever backcolour you wanted so that you could easily see it in the IDE). It would, of course, also be possible to modify the code so as to automatically work correctly on picture boxes with borders as well. Anyway, try the following code (which assumes the name of your picture box is Picture1): Mike Private Sub Form_Load() Dim oldmode As Long, ctl As Control oldmode = Me.ScaleMode Me.ScaleMode = Picture1.ScaleMode On Error Resume Next For Each ctl In Controls If ctl.Container.Name = "Picture1" Then Set ctl.Container = Me ctl.Move ctl.Left + Picture1.Left, ctl.Top + Picture1.Top End If Next ctl Picture1.Visible = False Me.ScaleMode = oldmode End Sub
From: J French on 11 Oct 2005 07:36 On Tue, 11 Oct 2005 11:57:33 +0200, "Bart Steur" <solnews(a)xs4all.nl> wrote: >The image underneath (lower in z-order) is a Kodak Image Control. It >contains a Multi Image TIFF. I place highlights (annotations) on the tiff >image. The highlights mark some textparts that need to be typed into the >textbox(es) in the TRANSPARENT picturebox control. All I want to know, can >you make a picturebox transparent. I've tried the way you can you to make a >Form transparent (using SetLayeredWindowAttributes), but that doesn't work >for a Picturebox. Have you considered ditching the PictureBox and using a UserControl instead ? A compiled in UserControl certainly can be transparent - it also makes a good container Basically it is a Picturebox on steroids
From: Bart Steur on 11 Oct 2005 08:19 Now we're talking That's certainly a great idea. Thx Bart "J French" <erewhon(a)nowhere.uk> wrote in message news:434ba2fd.273530813(a)news.btopenworld.com... > On Tue, 11 Oct 2005 11:57:33 +0200, "Bart Steur" <solnews(a)xs4all.nl> > wrote: > >>The image underneath (lower in z-order) is a Kodak Image Control. It >>contains a Multi Image TIFF. I place highlights (annotations) on the tiff >>image. The highlights mark some textparts that need to be typed into the >>textbox(es) in the TRANSPARENT picturebox control. All I want to know, can >>you make a picturebox transparent. I've tried the way you can you to make >>a >>Form transparent (using SetLayeredWindowAttributes), but that doesn't work >>for a Picturebox. > > Have you considered ditching the PictureBox and using a UserControl > instead ? > > A compiled in UserControl certainly can be transparent > - it also makes a good container > > Basically it is a Picturebox on steroids
From: Bart Steur on 11 Oct 2005 08:26 No, that's not what I meant. Sorry. It should be semi-transparent, something like a fade or drop shadow. With SetLayeredWindowAttributes you can set the transparency from 0 (fully transparent) to 255 (Fully visible) Thats what I need for my picturebox. Sorry for setting you guys on the wrong track B. "J French" <erewhon(a)nowhere.uk> wrote in message news:434ba2fd.273530813(a)news.btopenworld.com... > On Tue, 11 Oct 2005 11:57:33 +0200, "Bart Steur" <solnews(a)xs4all.nl> > wrote: > >>The image underneath (lower in z-order) is a Kodak Image Control. It >>contains a Multi Image TIFF. I place highlights (annotations) on the tiff >>image. The highlights mark some textparts that need to be typed into the >>textbox(es) in the TRANSPARENT picturebox control. All I want to know, can >>you make a picturebox transparent. I've tried the way you can you to make >>a >>Form transparent (using SetLayeredWindowAttributes), but that doesn't work >>for a Picturebox. > > Have you considered ditching the PictureBox and using a UserControl > instead ? > > A compiled in UserControl certainly can be transparent > - it also makes a good container > > Basically it is a Picturebox on steroids
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: MapiReadMail() Next: Converting decimal to BCD (binary coded decimal)... |