小编iam*_*der的帖子

在python上没有显示使用ctypes的多个消息框

嗨我有一个简单的代码显示使用ctypes的消息框但我的问题是它添加MB_TOPMOST后它没有追加或重叠消息框?

def msgbox(self,msg):
        MB_OK = 0x0
        MB_OKCXL = 0x01
        MB_YESNOCXL = 0x03
        MB_YESNO = 0x04
        MB_HELP = 0x4000
        ICON_EXLAIM=0x30
        ICON_INFO = 0x40
        ICON_STOP = 0x10
        MB_TOPMOST=0x40000
        """
                HEX VALUE LINK
        https://www.autoitscript.com/autoit3/docs/functions/MsgBox.htm
        """
        writeLogs = WriteLogs(
                    pathLog = app_config['path_logs'] +"\\"+strftime("%Y_%m_%d")+".log",
                    timedate = time.strftime("%m/%d/%Y %I:%M:%S %p")
                    )
        writeLogs.appendLogA(msg)
        ctypes.windll.user32.MessageBoxA(None, msg+str(operatorMessage), "[Error]", MB_OK | ICON_STOP | MB_TOPMOST)
Run Code Online (Sandbox Code Playgroud)

windows ctypes messagebox python-2.7

2
推荐指数
1
解决办法
578
查看次数

python线程以最好的方式终止或终止

问题是我想杀死当前正在运行的所有线程。例如,我有一个调用 for 循环的按钮。突然间我想阻止它。

这是我的代码:

class WorkerThread(threading.Thread):
    def __init__(self,t,*args):
        super(WorkerThread,self).__init__(target=t,args=(args[0],args[3]))
        self.start()
        self.join()
Run Code Online (Sandbox Code Playgroud)

我的实现:

def running(fileopen,methodRun):
    #....long task of code are here...


for file in fileTarget:
        threads.append(WorkerThread(running,file,count,len(fileTarget),"FindHeader"))
Run Code Online (Sandbox Code Playgroud)

python python-multithreading

2
推荐指数
1
解决办法
1万
查看次数

如何使 <i> 标签在 div 中居中

我想使用 i 标签将 fa 放在 div 的中心,但我对如何做到这一点有点无能为力。有什么帮助吗?

我是个新来的。

谢谢

示例 HTML:

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
    #lock-cirle {
        border: solid 2px #9f070a;
        border-radius: 100%;
        width: 100px;
        height: 100px;
        margin: 0px auto;
        margin-top: 5%;
        margin-bottom: 5%;
    }

    #lock-icon{
        font-size: 50px;
        color: #9f070a;
        margin: 27%;
    }


</style>

</head>
<body>
<div class="col-xs-12 col-sm-12 col-md-8 col-md-offset-2 text-center">
    <div id="lock-cirle"  style="background-color: yellow;">
        <i class="fa fa-lock" id="lock-icon" style="background-color: green;"></i>
    </div>
</div>

</body>
</html>
Run Code Online (Sandbox Code Playgroud)

html css twitter-bootstrap-3

2
推荐指数
1
解决办法
2万
查看次数