Skip to main content

Posts

Showing posts from January, 2017

Create Transparent Digital Watch Using wxPython

Krypsec Digital Watch Create Transparent Digital Watch Using wxPython Today we will create Transparent Digital Watch using wxPython. Code #Krypsec Digital Watch #Author: ManishHacker1 import wx import time class MyDialog(wx.Dialog): def __init__(self, parent, id, title): wx.Dialog.__init__(self, parent, id, title, size = (480, 210)) self.Bind(wx.EVT_PAINT, self.OnPaint) self.timer = wx.Timer(self) self.Bind(wx.EVT_TIMER, self.OnTimer, self.timer) self.timer.Start(1000) def Draw(self, dc): t = time.localtime(time.time()) st = time.strftime("%b %d %y,%a \n \t \t \t %I:%M:%S", t) dc.SetBackground(wx.GREY_BRUSH) self.SetTransparent(225) dc.Clear() dc.SetFont(wx.Font(50, wx.SWISS, wx.NORMAL, wx.NORMAL)) tw, th = dc.GetTextExtent(st) dc.DrawText(st, 20, 20) def OnTimer(self, evt): ...