Link to home
Start Free TrialLog in
Avatar of James_stillman
James_stillman

asked on

labels on pictures

I want to put a label in front of a picturebox and have tried setting the zorder of the label to 0 to put it in front. but this does not work can I do this any other way
ASKER CERTIFIED SOLUTION
Avatar of deighton
deighton
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In your .frm code in ascii format in note pad it shouldl then look  something like

  Begin VB.PictureBox Picture1
      Height          =   1695
      Left            =   1440
      Picture         =   "TEST.frx":0000
      ScaleHeight     =   1635
      ScaleWidth      =   3795
      TabIndex        =   0
      Top             =   600
      Width           =   3855
      Begin VB.Label Label1
         Caption         =   "Label1"
         Height          =   375
         Index           =   0
         Left            =   1800
         TabIndex        =   1
         Top             =   480
         Width           =   1215
      End
   End
Avatar of Vbmaster
Vbmaster

In design time, select the label, use Ctrl+X to cut it out, select the picturebox, use Ctrl-V to paste it. Voilá.
Indeedy.

And the reason is that labels and other windowless controls cannot be z-ordered in front of windowed controls.

Just thought you'd be interested in that little snippet of useless (?) information.
Avatar of James_stillman

ASKER

Hey I don't know who to give the points to cos dieghton basically said the same as VBMaster, but did it in code.

An cheers caraf_q for the comment, Pretty useful i'd say I knew that I could put a label inside a picture box control, but didn't know why I couldn't place the label in front of the picture box, Cheers.

I reckon it's going to have to be deighton, cod he ansewered first.
 Cheers for the help Guys

James