Python Forum
[Tkinter] Displaying an image that can't be closed
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Displaying an image that can't be closed
#1
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()
Reply
#2
Why would you want to do this?
Reply
#3
(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
Reply
#4
Bad prank!
Reply
#5
(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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [closed] "checked" variable (attribute?) origin? paul18fr 4 508 Mar-05-2024, 04:20 PM
Last Post: deanhystad
  Displaying Image Files in a GUI vman44 1 1,777 Mar-02-2020, 02:18 AM
Last Post: Larz60+
  [Tkinter] Extrakt a Variable from a closed tkinter window hWp 5 3,770 Aug-23-2019, 09:01 PM
Last Post: woooee
  [WxPython] how to reopen a closed tab of wx.aui.Notebook? royer14 2 3,274 Feb-18-2019, 12:31 AM
Last Post: royer14
  Trouble displaying an image in PyQt4 Vysero 2 3,094 Jul-01-2018, 05:25 PM
Last Post: Alfalfa
  [PyQt] Whole application is closed by subwindows Alfalfa 1 7,378 Oct-03-2017, 03:22 PM
Last Post: Alfalfa

Forum Jump:

User Panel Messages

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