- Timestamp:
- Jul 21, 2008, 1:26:05 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/ablib/src/Classes/ActiveBasic/Windows/UI/Application.ab
r551 r559 20 20 */ 21 21 Static Sub Run(form As Form) 22 f.Show(SW_SHOW)23 22 If IsNothing(form) = False Then 23 form.Show(SW_SHOW) 24 form.Update() 24 25 form.AddMessageEvent(WM_DESTROY, AddressOf(Application.OnMainFormClosed)) 25 26 End If … … 34 35 DispatchMessage(m) 35 36 Loop 36 ' OnThraedExit(EventArgs.Empty) 37 37 38 End Sub 38 39 … … 55 56 End Sub 56 57 57 '#include "ApplicationEvent.sbp" 58 /*! 59 @brief メッセージキューに溜まったメッセージを処理する。 60 @date 2008/07/18 61 @author Egtra 62 ここのコードから改変。 63 http://www.activebasic.com/forum/viewtopic.php?t=426 64 */ 65 Static Sub DoEvents() 66 Dim msg As MSG 67 While PeekMessage(msg, 0, 0, 0, PM_REMOVE) <> FALSE 68 Select Case msg.message 69 Case WM_QUIT 70 PostQuitMessage(0) 'Run()で捕まえてくれるようPostしなおす。 71 Case Else 72 TranslateMessage(msg) 73 DispatchMessage(msg) 74 End Select 75 Wend 76 End Sub 77 78 #include "ApplicationEvent.sbp" 58 79 59 80 Private 60 81 Static Sub OnMainFormClosed(sender As Object, e As Args) 82 OnThreadExit(Args.Empty) 61 83 ExitThread() 62 84 End Sub 63 64 main As Form65 85 End Class 66 86
Note:
See TracChangeset
for help on using the changeset viewer.