Python Forum

Full Version: Displaying an image that can't be closed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to display an image on the desktop that cannot be closed, or at least not without opening Task Manager.

I have a code that displays a frameless image, but it can easily be terminated with the task bar.I want to eliminate that possibility. If I can remove the task from the taskbar (sort of like "hiding the task") that would be even better (but if that's not possible then the first option is alright as well Tongue )

I am using Python 3.5 by the way, maybe that's important

from tkinter import Toplevel, Tk, Label, PhotoImage

win = Tk()

win.attributes('-alpha', 0.0)
win.iconify()

window = Toplevel(win)
window.geometry("500x500+100+100")
window.overrideredirect(1)

photo = PhotoImage(file="test.png")

label = Label(window, image=photo)
label.pack()

win.mainloop()
Why would you want to do this?
(Feb-14-2018, 11:40 PM)Larz60+ Wrote: [ -> ]Why would you want to do this?
I want to make that for a prank. I don't want to do anything else besides placing an image on the middle of their desktop, but if they can close it directly then it's not very effective Big Grin

That's also the reason why I want it to remain on the Task Manager, so that I can close it easily
Bad prank!
(Feb-15-2018, 02:18 AM)Larz60+ Wrote: [ -> ]Bad prank!
You mean bad like, cruel or bad like underwhealming? Now I'm just curious to know