title image


Smiley Re: Form transparent machen
Hi



kann man so tun (allerdings erst ab Win2k)





Private Declare Function GetWindowLong Lib "user32" _

Alias "GetWindowLongA" (ByVal hWnd As Long, _

ByVal nIndex As Long) As Long



Private Declare Function SetWindowLong Lib "user32" _

Alias "SetWindowLongA" (ByVal hWnd As Long, _

ByVal nIndex As Long, ByVal dwNewLong As Long) As Long



Private Declare Function SetLayeredWindowAttributes _

Lib "user32" (ByVal hWnd As Long, _

ByVal crKey As Long, ByVal bAlpha As Byte, _

ByVal dwFlags As Long) As Long



Const LWA_COLORKEY = &H1

Const LWA_ALPHA = &H2

Const GWL_EXSTYLE = (-20)

Const WS_EX_LAYERED = &H80000

Const WS_EX_NOINHERITLAYOUT = &H100000





Private Sub Form_Load()

Dim hRslt As Long



hRslt = GetWindowLong(Me.hWnd, GWL_EXSTYLE)

hRslt = hRslt Or WS_EX_NOINHERITLAYOUT Or WS_EX_LAYERED

SetWindowLong Me.hWnd, GWL_EXSTYLE, hRslt



Me.BackColor = RGB(0, 255, 0)

SetLayeredWindowAttributes Me.hWnd, Me.BackColor, 0, LWA_COLORKEY



End Sub

take it easy, ansonsten Pille von:

Dr. Watson

(Flachdotore für angewandte Roßkuren)


Es werden nur ernste Runtime Errors kuriert! Bitte keine Kassenpatienten.
Sprechzeiten:
Sonntag: 10.00 bis 10.01 Uhr.



geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: