| Vba - close all instances of internet explorer |
| Option Explicit |
| Sub IE_Sledgehammer() |
| Dim objWMI As Object, objProcess As Object, objProcesses As Object |
| Set objWMI = GetObject("winmgmts://.") |
| Set objProcesses = objWMI.ExecQuery( _ |
| "SELECT * FROM Win32_Process WHERE Name = 'iexplore.exe'") |
| For Each objProcess In objProcesses |
| Call objProcess.Terminate |
| Next |
| Set objProcesses = Nothing: Set objWMI = Nothing |
| End Sub |
import sys from PyQt5.QtCore import QSize from PyQt5.QtGui import QImage, QPalette, QBrush from PyQt5.QtWidgets import * class MainWindow ( QWidget ): def __init__ ( self ): QWidget. __init__ ( self ) self .setGeometry( 100 , 100 , 300 , 200 ) oImage = QImage( "test.jpg" ) sImage = oImage.scaled(QSize( 300 , 200 )) # resize Image to widgets size palette = QPalette() palette.setBrush( 10 , QBrush(sImage)) # 10 = Windowrole self .setPalette(palette) self .show() if __name__ == "__main__" : app = QApplication(sys.argv) oMainwindow = MainWindow() sys.exit(app.exec_())
Comments
Post a Comment