Code: Alles auswählen
Procedure SnapWindowCallBack(hWnd.l, Event.l, wParam.l, lParam.l )
Protected scrRect.RECT, scrW.l, scrH.l, wndRect.RECT, wndW.l, wndH.l
If Event = #WM_WINDOWPOSCHANGED
SystemParametersInfo_(#SPI_GETWORKAREA, 0, @scrRect, 0)
scrW = scrRect\right - scrRect\left
scrH = scrRect\bottom - scrRect\top
GetWindowRect_(hWnd, @wndRect)
wndW = wndRect\right - wndRect\left
wndH = wndRect\bottom - wndRect\top
If wndRect\left-scrRect\left < 16 And wndRect\left-scrRect\left > 0 : wndRect\left = 0 : EndIf
If wndRect\top-scrRect\top < 16 And wndRect\top-scrRect\top > 0 : wndRect\top = 0 : EndIf
If scrRect\right-wndRect\right < 16 And scrRect\right-wndRect\right > 0: wndRect\left = scrRect\right-wndW : EndIf
If scrRect\bottom-wndRect\bottom < 16 And scrRect\bottom-wndRect\bottom > 0: wndRect\top = scrRect\bottom-wndH : EndIf
ResizeWindow(0, wndRect\left, wndRect\top, #PB_Ignore, #PB_Ignore)
EndIf
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure
Oder Programme schreiben, die man schreiben kann. Bei der Planung
weiß ich was ich machen kann und was nicht. Entweder ich mache es wie
ich es kann oder ich suche selber. Bei kleineren Anpassungsproblemen
kann man ja noch fragen.
Andockbare Fenster sind keine Anfängerfragen, also lasse es weg, bis Du
soweit bist, meine Meinung dazu.