Python Forum
win32gui not transparent a color, just transparent all the wwindow
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
win32gui not transparent a color, just transparent all the wwindow
#1
Hello everyone.
I am trying to make a transparent back ground for a Gamemaker studio window,
I fill the background with color (255,255,128)

This is my code:
# '''
import win32gui
import win32con
import winxpgui
import win32api
import subprocess
import time

time.sleep(1)
hwnd = win32gui.FindWindow(None, 'myGame'); #It is my game's name

win32gui.SetWindowLong (hwnd, win32con.GWL_EXSTYLE, win32gui.GetWindowLong (hwnd, win32con.GWL_EXSTYLE ) | win32con.WS_EX_LAYERED )
win32gui.SetLayeredWindowAttributes(hwnd, win32api.RGB(*(255,0,128)), 10, win32con.LWA_ALPHA)
# '''
It just transparent all the window, not a background;
The Notepad's window too.

Thank you for help me.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Transparent window background, but not text on it muzicman0 7 3,094 Feb-02-2024, 01:28 AM
Last Post: Joically
  [Tkinter] COMPLEX! Transparent Canvas Linux AceScottie 7 2,010 Jun-21-2023, 06:44 PM
Last Post: AceScottie
  [Tkinter] Transparent Canvas finndude 8 10,469 Oct-02-2022, 01:48 PM
Last Post: joe_momma
  win32gui DQT 1 1,018 Jul-21-2022, 08:10 AM
Last Post: menator01
  Make Label Text background (default color) transparent using tkinter in python barry76 1 24,169 Nov-28-2019, 10:19 AM
Last Post: Larz60+
  [Tkinter] How can we make the background transparent ? MrDrumX_ 1 11,309 Apr-27-2019, 09:57 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020