Dragging a windows (Mac and Windows)

I want to hide the icon bar at the top of the app window, then replace it with my own, however if I hide the main one, I cannot drag the window around. I seem to recall there was a mac/windows piece of code that enabled you to select areas on the screen so you could drag a window around like VLC, anyone remember what that was?

in mousedown keep the X,Y position of the SYSTEM mouse coor.
in mousedrag move the window by the delta between those values and the current SYSTEM mouse coor.

Take a look at the Platform Specific->Windows->Custom Window Shape example project that’s included with Xojo. Specifically, the MouseDown, MouseMove, and MouseUp events of the window.