Inicio
Buscar
Ingresar
Registrarse
Starfield: el juego que revolucionará el espacio y la tecnología
Hack x Crack - Comunidad de Seguridad informática
»
Programación
»
Otros
»
Interfaz de Login con Python [Tkinter]
Imprimir
Páginas: [
1
]
Ir Abajo
Autor
Tema: Interfaz de Login con Python [Tkinter] (Leído 7551 veces)
R3LI4NT
{ L4 } Geek
Mensajes: 396
El poder del usuario radica en su ANONIMATO.
Interfaz de Login con Python [Tkinter]
«
en:
Octubre 02, 2021, 11:10:51 pm »
Código Python:
Código: Python
from
tkinter
import
*
from
PIL
import
ImageTk
,
Image
class
LoginSys:
def
__init__
(
self
,
window
)
:
self
.
window
=
window
self
.
window
.
title
(
"Login System"
)
self
.
window
.
geometry
(
"1190x600"
)
self
.
window
.
resizable
(
False
,
False
)
self
.
window
.
iconbitmap
(
"img/logo.ico"
)
# BACKGROUND IMG
self
.
bg
=
ImageTk.
PhotoImage
(
file
=
"img/background.jpg"
)
self
.
bg_img
=
Label
(
self
.
window
,
image
=
self
.
bg
)
.
place
(
x
=
0
,
y
=
0
,
relwidth
=
1
,
relheight
=
1
)
# IMAGE FRONT ==> por si desean agregar una imagen
#self.img = ImageTk.PhotoImage(Image.open("ruta"))
#self.img_label = Label(self.window,image=self.img, bd=0, g)
#self.img_label.pack()
# LOGIN FRAME
frame_login
=
Frame
(
self
.
window
,
bg
=
"white"
)
frame_login.
place
(
x
=
150
,
y
=
150
,
height
=
340
,
width
=
500
)
title
=
Label
(
frame_login
,
text
=
"Login System"
,
font
=
(
"Impact"
,
32
,
"bold"
)
,
bg
=
"white"
,
fg
=
"#089015"
)
.
place
(
x
=
120
,
y
=
10
)
label_user
=
Label
(
frame_login
,
text
=
"Username"
,
font
=
(
"Arial"
,
12
,
"bold"
)
,
bg
=
"white"
,
fg
=
"#A8A8A8"
)
.
place
(
x
=
80
,
y
=
100
)
self
.
user_entry
=
Entry
(
frame_login
,
font
=
(
"Times New Roman"
,
11
)
,
bg
=
"lightgray"
)
self
.
user_entry
.
place
(
x
=
80
,
y
=
130
,
width
=
330
,
height
=
32
)
label_pass
=
Label
(
frame_login
,
text
=
"Password"
,
font
=
(
"Arial"
,
12
,
"bold"
)
,
bg
=
"white"
,
fg
=
"#A8A8A8"
)
.
place
(
x
=
80
,
y
=
180
)
self
.
pass_entry
=
Entry
(
frame_login
,
font
=
(
"Times New Roman"
,
11
)
,
bg
=
"lightgray"
)
self
.
pass_entry
.
place
(
x
=
80
,
y
=
210
,
width
=
330
,
height
=
32
)
pass_btn
=
Button
(
frame_login
,
text
=
"¿Olvidó su contraseña?"
,
bg
=
"white"
,
bd
=
0
,
fg
=
"#339B3D"
,
font
=
(
"Arial"
,
9
)
)
.
place
(
x
=
80
,
y
=
250
)
login_btn
=
Button
(
self
.
window
,
text
=
"INGRESAR"
,
bg
=
"#339B3D"
,
fg
=
"white"
,
font
=
(
"Arial"
,
15
,
"bold"
)
)
.
place
(
x
=
335
,
y
=
470
)
window
=
Tk
(
)
gui
=
LoginSys
(
window
)
window.
mainloop
(
)
En el caso de no tener PIL instalado deberán ir a la terminal (o símbolo de sistema en windows) y ejecutar lo siguiente:
- pip install pillow
Adjunto las imágenes:
-
https://www.mediafire.com/folder/57a4jmsh4nwja/Login_System
«
Última modificación: Octubre 02, 2021, 11:22:22 pm por R3LI4NT
»
En línea
No contesto dudas por MP, si las tienes, las planteas en el foro.
Road To Hacking v3:
https://github.com/R3LI4NT/road-to-hacking
Imprimir
Páginas: [
1
]
Ir Arriba
Hack x Crack - Comunidad de Seguridad informática
»
Programación
»
Otros
»
Interfaz de Login con Python [Tkinter]
Va un mudo y le dice a un sordo: Hack x Crack usa cookies. Pues eso...
OK
Learn more