当前位置: 首页>>代码示例>>Python>>正文


Python win32gui.MessageBox方法代码示例

本文整理汇总了Python中win32gui.MessageBox方法的典型用法代码示例。如果您正苦于以下问题:Python win32gui.MessageBox方法的具体用法?Python win32gui.MessageBox怎么用?Python win32gui.MessageBox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在win32gui的用法示例。


在下文中一共展示了win32gui.MessageBox方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: onClose

# 需要导入模块: import win32gui [as 别名]
# 或者: from win32gui import MessageBox [as 别名]
def onClose(self, evt):
        retCode = self.GetReturnCode()
        if retCode not in self.LABELS:
            return
        if self.timer:
            self.timer.Stop()
            del self.timer
        ix = 1 + self.action.RES_IDS.index(retCode) if retCode in self.action.RES_IDS else 1
        result = self.action.RESULTS[ix]
        self.alias = self.alias if self.alias else self.title
        if self.payload:
            eg.TriggerEvent("%s.%s" % (self.alias, result), self.payload, "MessageBox")
        else:
            eg.TriggerEvent("%s.%s" % (self.alias, result), prefix = "MessageBox")
        if self.event is not None:
            self.action.retCode = result
            SetEvent(self.event)
        self.Destroy() 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:20,代码来源:ShowMessageBox.py

示例2: CopyCallBack

# 需要导入模块: import win32gui [as 别名]
# 或者: from win32gui import MessageBox [as 别名]
def CopyCallBack(self, hwnd, func, flags,
                     srcName, srcAttr, destName, destAttr):
        # This function should return:
        # IDYES Allows the operation. 
        # IDNO Prevents the operation on this folder but continues with any other operations that have been approved (for example, a batch copy operation).  
        # IDCANCEL Prevents the current operation and cancels any pending operations.  
        print "CopyCallBack", hwnd, func, flags, srcName, srcAttr, destName, destAttr
        return win32gui.MessageBox(hwnd, "Allow operation?", "CopyHook",
                                   win32con.MB_YESNO) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:11,代码来源:copy_hook.py

示例3: InvokeCommand

# 需要导入模块: import win32gui [as 别名]
# 或者: from win32gui import MessageBox [as 别名]
def InvokeCommand(self, ci):
        mask, hwnd, verb, params, dir, nShow, hotkey, hicon = ci
        win32gui.MessageBox(hwnd, "Hello", "Wow", win32con.MB_OK) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:5,代码来源:context_menu.py

示例4: msgbox

# 需要导入模块: import win32gui [as 别名]
# 或者: from win32gui import MessageBox [as 别名]
def msgbox(text, caption='Error'):
    win32gui.MessageBox(None, text, caption,
                        (win32con.MB_OK | win32con.MB_ICONERROR))
    return 
开发者ID:euske,项目名称:pyrexecd,代码行数:6,代码来源:__init__.py

示例5: alert

# 需要导入模块: import win32gui [as 别名]
# 或者: from win32gui import MessageBox [as 别名]
def alert(title, msg):
    if getattr(sys, 'frozen', None):
        if platform.system() == "Darwin":
            import Tkinter, tkMessageBox
            root = Tkinter.Tk()
            root.lift()
            root.attributes('-topmost', 1)
            root.withdraw()
            tkMessageBox.showinfo(title, msg)
        elif platform.system() == "Windows":
            import win32gui
            win32gui.MessageBox(0,msg,title,0) 
开发者ID:beville,项目名称:ComicStreamer,代码行数:14,代码来源:utils.py

示例6: showMessageBox

# 需要导入模块: import win32gui [as 别名]
# 或者: from win32gui import MessageBox [as 别名]
def showMessageBox(self, title, body, alias, payload, options):
        if not alias:
            alias = title
        result = MessageBox(0, body, title, options)

        if result > 0 and result < 8:
            result = self.RESULTS[result]
        else:
            result = str(result)
        if payload:
            eg.TriggerEvent("%s.%s" % (alias, result), payload, "MessageBox")
        else:
            eg.TriggerEvent("%s.%s" % (alias, result), prefix = "MessageBox")
        return result 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:16,代码来源:ShowMessageBox.py


注:本文中的win32gui.MessageBox方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。