Cocoa has a lovely bug, which kills mouse events if a window was resized in 
code. Mouse events are essential for my UI so I opted not to load the previous 
window position from the prefs. As workaround my idea was to use 
RemoteControlMBS to simulate dragging the corner of the window to the correct 
position. But I only seem to get a mouse click and not a drag. How do I do a 
drag?

    const Margin = 3
    dim OldX as Integer = System.MouseX
    dim OldY as Integer = System.MouseY
    
    dim CurrentX as Integer = self.Left + self.Width - Margin
    dim currentY as Integer = self.top + self.Height - Margin
    dim newX as Integer = self.Left + 
Globals.thePrefs.GetPrefNumber("MainWindow_Width") - Margin
    dim newY as Integer = self.Top + 
Globals.thePrefs.GetPrefNumber("MainWindow_Height") - Margin
    
    if Globals.thePrefs.GetPrefNumber("MainWindow_Width") > 0 then
      call RemoteControlMBS.MacMouseClick CurrentX, CurrentY, true, false, true
      call RemoteControlMBS.MacMouseClick NewX , NewY, true, false, false
      setMeToFront
    end if

Using latest version of MBS with RB2011r2, Cocoa and Lion.

This is not very urgent because I have to fix some other Cocoa problems first.

Mit freundlichen Grüßen/Regards

Trixi Willius

http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to