- 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/Form.ab
r551 r559 45 45 End Namespace 'Widnows 46 46 End Namespace 'ActiveBasic 47 48 '----------49 'テスト実行用50 51 #require <Classes/ActiveBasic/Windows/UI/Application.ab>52 #require <Classes/ActiveBasic/Windows/UI/Button.ab>53 54 Imports ActiveBasic.Windows.UI55 56 'OleInitialize()57 Control.Initialize(GetModuleHandle(0))58 59 Sub Paint(sender As Object, e As PaintDCArgs)60 TextOut(e.Handle, 10, 10, "Hello world!", 12)61 End Sub62 63 Class MyForm64 Inherits Form65 Public66 Sub MyForm()67 AddPaintDC(AddressOf (Paint))68 AddMouseClick(AddressOf (Mouse))69 s = "aaa"70 End Sub71 72 ' Sub Paint(sender As Object, e As PaintDCArgs)73 ' TextOut(e.Handle, 10, 10, ToTCStr(s), s.Length)74 ' End Sub75 76 Sub Mouse(sender As Object, e As MouseArgs)77 Invalidate()78 End Sub79 80 Sub OnClick(sender As Object, e As Args)81 OutputDebugString(Ex"====OnClick====\r\n")82 End Sub83 84 s As String85 End Class86 87 Dim f = New MyForm88 f.Create()89 f.Text = "Hello"90 91 Dim b = New Button92 b.Create(f)93 b.Move(50, 50, 100, 100)94 b.Text = "Ok"95 b.AddClick(AddressOf(f.OnClick))96 97 Application.Run(f)98 f = Nothing99 System.GC.Collect()100 101 Control.Uninitialize()102 'OleUninitialize()103 104 End
Note:
See TracChangeset
for help on using the changeset viewer.