| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 53bd058 commit 9f562be
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,6 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | 10 | import clr | |
| 11 | 11 | import System.Windows.Forms as WinForms | |
| 12 | + from System.Threading import Thread, ThreadStart, ApartmentState | ||
| 12 | 13 | from System.Drawing import Color, Size, Point | |
| 13 | 14 | from System.Text import Encoding | |
| 14 | 15 | from System.IO import File | |
@@ -420,12 +421,19 @@ def OnClickClose(self, sender, args): | |||
| 420 | 421 | self.Close() | |
| 421 | 422 | ||
| 422 | 423 | ||
| 423 | - | ||
| 424 | - def main(): | ||
| 424 | + def app_thread(): | ||
| 425 | 425 | app = Wordpad() | |
| 426 | 426 | WinForms.Application.Run(app) | |
| 427 | 427 | app.Dispose() | |
| 428 | 428 | ||
| 429 | + | ||
| 430 | + def main(): | ||
| 431 | + thread = Thread(ThreadStart(app_thread)) | ||
| 432 | + thread.SetApartmentState(ApartmentState.STA) | ||
| 433 | + thread.Start() | ||
| 434 | + thread.Join() | ||
| 435 | + | ||
| 436 | + | ||
| 429 | 437 | if __name__ == '__main__': | |
| 430 | 438 | main() | |
| 431 | 439 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments