|
-
Aug 31st, 2000, 06:34 PM
#1
Thread Starter
Frenzied Member
how do I get that? I tried brining it to front, and the other to back, it doesn't work, any other suggestions?
NXSupport - Your one-stop source for computer help
-
Aug 31st, 2000, 06:40 PM
#2
For a fast flash:
Code:
Do
Label1.Visible = Not Label1.Visible: DoEvents
Loop
For a bit of a pause:
Code:
Private Declare Sub Sleep Lib "kernel32" _
(ByVal dwMilliseconds As Long)
Do
Label1.Visible = Not Label1.Visible: DoEvents
Call Sleep(100)
Loop
-
Aug 31st, 2000, 06:41 PM
#3
Junior Member
Labels are not allowed to be 'on-top' of other objects. What you can do is make a textbox, set it to BorderStyle = 0, and set the background color to 192,192,192. Fiddle with the Locked property and whatnot to emulate a label.
(¯`·.¸¸.·´¯`·->Cromas<-·´¯`·.¸¸.·´¯)
Teenage Programmer
Formerly known as ShadowCrawler
E-Mail: [email protected]
ICQ: 9872708
AIM: VotchOut
-
Aug 31st, 2000, 06:45 PM
#4
I don't think he wanted to flash the label but to put it in front of an other control.
I'm sorry to disappoint you but you can't!
A Label is a windowless control. VB draws the text of the caption directly on the form.
What you can do is to put the label in an other container like a PictureBox.
Just resize the PictureBox to the size of the label and set the BorderStyle to 0 - None.
The picture can be placed in front of your flash control.
Best regards
-
Aug 31st, 2000, 06:48 PM
#5
Oh! Welcome back "the teenage programmer formerly known as ShadowCrawler"! Long time no see!
-
Aug 31st, 2000, 07:07 PM
#6
Thread Starter
Frenzied Member
what I ment was the ShockWave Flash control, not to make the label visible and then not
a textbox woun't work, what I need is a completely transparnt object to be on top of everything else I was thinking of a transparent form but I would like something else
NXSupport - Your one-stop source for computer help
-
Aug 31st, 2000, 07:19 PM
#7
I knew that...I was just testing you :)
Try using the .ZOrder property.
Code:
Label1.ZOrder = vbBringToFront
ShockWave1.ZOrder = vbSendToBack
-
Aug 31st, 2000, 07:23 PM
#8
Thread Starter
Frenzied Member
acctually what you wanted was:
Code:
Private Sub Form_Load()
Label1.ZOrder vbBringToFront
flash1.ZOrder vbSendToBack
End Sub
but it doesn't work
NXSupport - Your one-stop source for computer help
-
Sep 2nd, 2000, 04:26 AM
#9
Well since a label can't be used why don't you create your own user control?
You want the background to be transparent which makes it a little harder because you can't use the Print statement on a UserControl with a transparent background.
But it's just a little harder.
The trick is to use the MaskPicture and MaskColor properties.
Start a new Active-X Control project and add two picture boxes to the UserControl.
Set the following properties for PictureBoxes:
Picture1[*]Name = picMask[*]AutoRedraw = True[*]BackColor = vbWhite[*]BorderStyle = 0 - None[*]Visible = False[/list]Picture2[*]Name = picCaption[*]AutoRedraw = True[*]BorderStyle = 0 - None[*]Visible = False[/list]Now set the following properties for the UserControl
[*]Name = <Whatever>[*]BackStyle = 0 - Transparent[*]MaskColor = vbWhite[/list]
Now add the following code to get a Caption property.
Code:
Private m_Caption As String
Public Property Get Caption() As String
Caption = m_Caption
End Property
Public Property Let Caption(ByVal New_Caption As String)
m_Caption = New_Caption
'clear both picture boxes and
'print the new caption to them
picMask.Cls
picMask = LoadPicture()
picMask.Print New_Caption
picMask = picMask.Image
picMask.Cls
picCaption = LoadPicture()
picCaption.Print New_Caption
picCaption = picMask.Image
'set the MaskPicture and Picture properties
'of the UserControl
UserControl.MaskPicture = picMask
UserControl.Picture = picCaption
PropertyChanged "Caption"
End Property
'Load property values from storage
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
Me.Caption = PropBag.ReadProperty("Caption", "")
End Sub
'Write property values to storage
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("Caption", m_Caption, "")
End Sub
The PictureBoxes is never visible but they have to be of the same size as the UserControl. So add the following code in the Resize event.
Code:
Private Sub UserControl_Resize()
picMask.Move 0, 0, ScaleWidth, ScaleHeight
picCaption.Move 0, 0, ScaleWidth, ScaleHeight
'call the Property Let Caption procedure to
'reprint the caption
Me.Caption = m_Caption
End Sub
Good luck!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|