Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transparent Progress Bar 1

Status
Not open for further replies.

MrMoocow

Programmer
May 19, 2001
380
US
I need a progress bar (free) with a transparent background, does any1 know of one. Brad,
Free mp3 player,games and more.
 
Option Explicit
Private Const WS_EX_TRANSPARENT = &H20&
Private Const GWL_EXSTYLE = (-20)
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long


Private Sub Command1_Click()
MakeWindowedControlTransparent ProgressBar1
End Sub

Private Function MakeWindowedControlTransparent(ctlControl As Control) As Long
Dim result As Long
ctlControl.Visible = False
result = SetWindowLong(ctlControl.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT)
ctlControl.Visible = True ' Use the visible property as a quick VB way of forcing a repaint with the new style
MakeWindowedControlTransparent = result
End Function
 
Do you mean, so you can like, have it float and perhaps show what is behind it?...like using win2k's transparency features? Regards,
Anth:cool:ny
----------------------------------------
"You say [red]insanity[/red] like it's a BAD THING!"
 
I think he means semi-transparent...does that function do that? Regards,
Anth:cool:ny
----------------------------------------
"You say [red]insanity[/red] like it's a BAD THING!"
 
He means a transparent background - or at least that is what he specifically asks for at the start of the thread. I'll grant that the later descripton can possibly be misinterpreted to suggest a semi-transparency requirement, but I think that is the wrong interpretation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top