import tkinter as tk
from tkinter import PhotoImage, Label, Entry, Button, IntVar, Tk
class Main(tk.Tk):
def __init__(self):
super().__init__()
self.geometry('360x280')
self.grip = tk.Label(self, bg='#000', bd=0, height='2', width='56')
self.grip.place(x=0, y=-12)
self.grip.bind('<ButtonPress-1>', self.StartMove)
self.grip.bind('<ButtonRelease-1>', self.StopMove)
self.grip.bind('<B1-Motion>', self.OnMotion)
def StartMove(self, event):
self.x = event.x
self.y = event.y
def StopMove(self, event):
self.x = None
self.y = None
def OnMotion(self, event):
deltax = event.x - self.x
deltay = event.y - self.y
x = self.winfo_x() + deltax
y = self.winfo_y() + deltay
self.geometry('+%s+%s' % (x, y))
if __name__ == '__main__':
main = Main()
main['bg'] = '#222222'
main.title('Panel')
main.resizable(False, False)
main.update_idletasks()
main.overrideredirect(True)
x = (main.winfo_screenwidth() - main.winfo_reqwidth()) / 2
y = (main.winfo_screenheight() - main.winfo_reqheight()) / 2
main.wm_geometry('+%d+%d' % (x, y))
logg = 'putin'
passw = 'molodes'
def close():
main.destroy()
def logined():
if logine.get() == logg and loginep.get() == passw:
labela.place_forget()
labelag.place_forget()
logint.place_forget()
logintp.place_forget()
logine.place_forget()
loginep.place_forget()
enter.place_forget()
textlabel1.place_forget()
textlabel2.place(x=125, y=110)
else:
textlabel1.place(x=125, y=230)
close = Button(main, text='x', bd=0, fg='red', bg='#000', command=close)
close.place(x=345, y=-2)
textlabel1 = Label(main, text='ne poluchilos!', fg='red', bg='#222222', font='Bahnschrift 12')
textlabel1.place_forget()
textlabel2 = Label(main, text='a tu ne plox !', fg='green', bg='#222222', font='Bahnschrift 12')
textlabel2.place_forget()
labela = Label(main, text='Crack', bd=0, fg='white', bg='#222222', font='Bahnschrift 12')
labela.place(x=147, y=46)
labelag = Label(main, text='Me', bd=0, fg='green', bg='#222222', font='Bahnschrift 12')
labelag.place(x=191, y=46)
logint = Label(main, text='Login', bd=0, fg='white', bg='#222222', font='Bahnschrift 11')
logint.place(x=91, y=85)
logintp = Label(main, text='Password', bd=0, fg='white', bg='#222222', font='Bahnschrift 11')
logintp.place(x=91, y=130)
logine = Entry(main, bd=0, bg='#161616', font='Bahnschrift 11', width='22', fg='white')
logine.place(x=91, y=107)
loginep = Entry(main, bd=0, bg='#161616', font='Bahnschrift 11', width='22', fg='white', show='*')
loginep.place(x=91, y=152)
enter = Button(main, text='Enter', bd=0, bg='#222222', font='Bahnschrift 11', fg='green', activebackground='#222222', activeforeground='#040', command=logined)
enter.place(x=158, y=195)
main.mainloop()