本篇文章主要讲解可视化开发的方式,通过批量替换文件后缀的形式来讲解可视化的pc应用开发
日期:2021年12月25日
作者:任聪聪
效果展示
代码实例
整体代码
from tkinter import *
import os
import random
import tkinter.messagebox as messagebox
from pathlib import Path
import ctypes
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID("86115")
list_nums = random.randint(0,900)
class FilesToolsGui():
def __init__(self,tools_windows):
self.tools_windows = tools_windows
#窗口
def set_init_window(self):
self.tools_windows.title("文件后缀批量处理工具_v0.0.1 by: 任聪聪") #窗口信息设置
self.tools_windows.geometry('500x130+100+100') #参数说明:窗口大小 定位
self.tools_windows["bg"] = "white"