flet-dev / examples

Flet sample applications
MIT License
457 stars 189 forks source link

How to create splash screen when windows desktop software starts #128

Open BrentHuang opened 5 months ago

BrentHuang commented 5 months ago

How to create splash screen when windows desktop software starts?

khalil135711 commented 4 months ago

If you're using Tkinter in Python, you can utilize my code available at the following URL: https://github.com/khalil135711/splash_image_code

Pointers for Use:

On line 27, you can adjust the duration of your splash screen by modifying duration = 6000. (6000ms is 6 sec) Also, ensure to update the image path before initiating testing. If you're a beginner, consider using Flet, a new Python library (currently available only in Python) that facilitates cross-platform application development (Windows, MacOS, Android, iOS, and web apps) efficiently. For more information, refer to the documentation. I hope this code proves useful for you. 😉

BrentHuang commented 4 months ago

on windows 10, When a desktop application developed by flet is started, the user interface will be blank for a short period of time, so splash is necessary.

khalil135711 commented 4 months ago

Not necessarily. I think you are running your application with a wrong cmd line : As an example if you want to run your application on your iOS device use : this cmd > flet run - -ios Without any space between- and - then will a QR code generate

And make sure that your device use the same network of your laptop

so you can scan the QR code than open on flet (application that u should download from App Store )

and if you want to run flet on your windows just use flet you-python-file-name.py or flet run yourPythonFileName.py

In the case of you are really looking for creating a windows desktop application with a splash screen i can share with you the code .