I'm student. I need help. I create "information management system". I want to press the button and program shut down. What is this code?
But this is error box. I press "ok" and program close
exit()
Put that in the event handler for your button. What that looks like depends on what GUI you are using
Are you using a GUI?
why not show code.
def girisYap():
kAdi = isim.get()
parola = sifre.get()
if kAdi == bilgiler[0] and parola == bilgiler[1]:
messagebox.showinfo("Bilgilendirme","Giriş Başarılı!")
import sistemgiris
else:
messagebox.showerror("Bilgilendirme","Kullanıcı/Şifre Hatalı!")
I want if is ok, let that screen turn off and open import.
Yes i use gui
Quote:Yes i use gui
And which one might that be?
Ok in tkinter do this:
import sys
def quit():
windowname.destroy()
sys.exit(0)
# just after window defined (root, or toplevel name, or whatever you call it) add
windowname.protocol('WM_DELETE_WINDOW', quit)
...
of course you must change 'windowname' to name of your window,
like root.protcol(...)
and
root.destroy()
Please don't PM, use the forum so all can benefit
I showed how to do this in post 7