944,047 Members | Top Members by Rank

Ad:
Jul 19th, 2006
0

Semi Transparrent Forms

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 2
Light Poster
maheshsayani is offline Offline
45 posts
since Jul 2006
Jul 19th, 2006
0

Re: Semi Transparrent Forms

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.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Jul 20th, 2006
0

Re: Semi Transparrent Forms

Thanks For Your Help Mr Comatose
Reputation Points: 10
Solved Threads: 2
Light Poster
maheshsayani is offline Offline
45 posts
since Jul 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Selection.End(xlDown).Select
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Please Help me in learning





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC