Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Form transparent

Empfohlene Antworten

Veröffentlicht

Hallo miteinander,

hab nach langer Zeit mal wieder ein Problem..

Wie mache ich die Form transparent? :confused:

Über form1.BackColor = XXX,

kann ich der Form sagen, daß sie die Farbe des Desktops übernehmen soll.

Wenn aber ein Wallpaper als Desktophintergrund genutzt wird, übernimmt die Form totzdem die Farbe des Desktops.

-> also nicht wirklich transparent... :(

Kann mir jemand helfen mit Tips, Code oder wenigstens n Schubser in die richtige Richtung? :D

öhm visible= false?

oder willst du das ganze halbtransparent machen?

öhm visible= false?

oder willst du das ganze halbtransparent machen?

Auf der Form ist noch ein Label, daß die aktuelle CPU-Geschwindikeit anzeigt.

Der Hintergrund des Labels ist Transparent.

Die Form wird gestartet, im Label zeigts die aktuelle CPU-Geschwindikeit und wird nach 10s automatisch beendet.

Die Form wird mit BorderStyle 0 gestartet, hat also nicht mal ne Leiste mit den 3 Standard-Buttons (min, max, X).

Will nur das alles Transparent ist und nur die CPU-Geschwindikeit zu sehen ist. :(

Offensichtlich hast du noch keine Google-Suche zu diesem Thema versucht, sonst wärst du beim ersten Link zu

http://spotlight.de/zforen/amvb/m/amvb-1068394939-82.html gekommen, der sagt:

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

Und du gibst ihm halt als alpha-Wert ... k.A. z.B. 50

Offensichtlich hast du noch keine Google-Suche zu diesem Thema versucht, sonst wärst du beim ersten Link zu

http://spotlight.de/zforen/amvb/m/amvb-1068394939-82.html gekommen, der sagt:

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

Und du gibst ihm halt als alpha-Wert ... k.A. z.B. 50

Isch habe gegoogelt! :) ,

Habe auch was gefunden, aber leider nicht so ganz das richtige bzw. ich hatte Probleme dies zuverstehen und anzupassen. :cool:

Ups.. was vergessen..

DANKE DIR!!!! :uli

Genau das was ich gesucht habe! :)

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.