Hello,
with RAO's MDI-child transparent-sample and some small changes, it is possible to do this.
Once again, Thanks a lot to Mr.Rao, my tests are working perfect and it shows, how to use some Solutions
a different Way.
A MDI-frame with the selected Image-background.
Capturing a Part of the Main-background with Border and placing / resizing a transparent Mdi-Child to the desired position.
In case You don't want a Border, it is a bit more complicated :
You must define 2 Childs :
a NON visible < oWndChild > with
NOSYSMENU
NOICONIZE
BORDER NONE
NOCAPTION
A second < oWndSelect > For painting
NOSYSMENU
NOICONIZE
You define the MDI-child < oWndSelect > and move it to the Screenposition, You want to capture ( resize ).
The Button < Capture > saves the Coordinates and closes the Child < oWndSelect >.
Next the hidden Child < oWndChild > with the Position of the Child < oWndSelect > is created.
Next oWndChild:SaveToBmp( "Capture.BMP" ) is used.
1. Saving the Coordinates of < oWndSelect >
2. closing < oWndSelect >
3. creating < oWndChild > with the Coordinates of < oWndSelect >
4. Saving the Image-Area of < oWndChild >
DEFINE BUTTON OF oBar PROMPT "Capture-Child" ;
ACTION ( nTop := oWndSelect:nTop + 20, nLeft := oWndSelect:nLeft + 5, ;
nBottom := oWndSelect:nBottom - 5, nRight := oWndSelect:nRight -5, ;
oWndSelect:End(),
TranspChild(), ;
oWndChild:SaveToBmp( "Capture.BMP" ) )
Capture Area with NO Border :
Result with NO Border :
Best regards
Uwe