Semi Transparrent Forms

Thread Solved

Join Date: Jul 2006
Posts: 45
Reputation: maheshsayani is an unknown quantity at this point 
Solved Threads: 2
maheshsayani's Avatar
maheshsayani maheshsayani is offline Offline
Light Poster

Semi Transparrent Forms

 
0
  #1
Jul 19th, 2006
Hi All
I Want To Create Semi Transparent Forms
I Had done work on Transparent forms but i need semi transparent form which we can see background text/image through this form in vb
please send me the solution for this
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Semi Transparrent Forms

 
0
  #2
Jul 19th, 2006
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
  2. Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
  3. Public Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Long, ByVal dwFlags As Long) As Long
  4.  
  5.  
  6. Public Const LWA_ALPHA = &H2&
  7. Public Const GWL_EXSTYLE = (-20)
  8. Public Const WS_EX_LAYERED = &H80000
  9.  
  10. Public Sub Phantomize_Window(hwnd As Long, bytOpacity)
  11. 'phantomize window
  12. Dim buf As String * 1024
  13. Call SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) Or WS_EX_LAYERED)
  14. Call SetLayeredWindowAttributes(hwnd, 0, bytOpacity, LWA_ALPHA)
  15. End Sub

Phantomize_Window Me.hwnd, 65
Last edited by Comatose; Jul 19th, 2006 at 7:56 pm.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 45
Reputation: maheshsayani is an unknown quantity at this point 
Solved Threads: 2
maheshsayani's Avatar
maheshsayani maheshsayani is offline Offline
Light Poster

Re: Semi Transparrent Forms

 
0
  #3
Jul 20th, 2006
Thanks For Your Help Mr Comatose
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC