プログラム言語 FreeBasic |
CenterWindow
CenterWindow(hwnd)
Sub CenterWindow(ByVal hWin As HWND)
ウィンドウを中央に設定します。
hWin - 中央に設置するウィンドウのハンドル
Windows , Linux
#Include "window9.bi"
Dim As HWND hwnd
hwnd=OpenWindow("1",30,30,100,100)
UpdateInfoXServer ' only for Linux
CenterWindow(hwnd)
Do
var event=WaitEvent()
If event=EventClose Then End
Loop
#Include "window9.bi"
Dim As HWND hwnd,hwnd1
hwnd=OpenWindow("1",30,30,100,100)
hwnd1=OpenWindow("2",10,10,100,100)
Do
var event=WaitEvent()
If event=EventClose Then End
If event=WM_LBUTTONDOWN Then
If Eventhwnd()=hwnd1 Then
CenterWindow(hwnd):close_Window(hwnd1)
endif
EndIf
loop