ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to capture part of screen using mouse drag
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

exchangeviews

India
39 Posts

Posted - Dec 09 2014 :  03:28:47  Show Profile  Reply
Hi All,
I need to capture rectangular selected part of screen using mouse dragging but unable to understand how to do so. please help. Thanks in advance.

w2m

USA
1990 Posts

Posted - Dec 09 2014 :  05:45:03  Show Profile  Reply
ImageEn by itself cannot capture a selection, but other screen capture components or libraries can easily be used in conjunction with ImageEn. One such component is called Apprehend that I wrote many years ago but still works even the latest versions of Delphi.

Apprehend is free and may be obtained here:

http://www.frontiernet.net/~w2m/apprehend.html


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

exchangeviews

India
39 Posts

Posted - Dec 09 2014 :  08:12:19  Show Profile  Reply
Hi Bill,

Thanks for sharing this gr8 info. Its really what I was looking for. Thanks once again.
Go to Top of Page

exchangeviews

India
39 Posts

Posted - Feb 24 2015 :  10:26:59  Show Profile  Reply
Dear Bill,

Thanks for the info. It is working fine. One more thing i am in need to change the cursor symbol when i use CaptureSelection function. Currently it shows crCross cursor and i want to set it by myself.

where i need to define it, in following code:

procedure TCaptureFreehandForm.FormCreate( Sender: TObject );
var
aDC: HDC;
P: TPoint; // Where is the mouse now?
const
crDraw = -19;
begin
GetCursorPos( P ); // Where am I?
if ( ForceMonitorNum >= 0 ) and ( ForceMonitorNum <= Screen.MonitorCount - 1 ) then
M := ForceMonitorNum { Override }
else
M := Screen.MonitorFromPoint( P, mdNearest ).MonitorNum; // Here I am! Monitors[M]

Screen.Cursors[ crDraw ] := LoadCursor( hInstance, pChar( 'CURSOR_2' ) );
Cursor := crDraw;
fBMP := TBitmap.Create;
...
...
...
OR in resource file.
{$R CaptureFreehand.Res}

I appreciate if any help.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Feb 25 2015 :  16:19:20  Show Profile  Reply
To change the cursor you will need a resource editor to view the cursors in the res file. If the cursor you want to use is not in the res file you have to use the resource editor to add your cursor to the file. Then you change the code to load the new resource name. For example if you add a new cursor cslled NEW_CURSOR to the resource file then should you change the code to:
Screen.Cursors[ crDraw ] := LoadCursor( hInstance, pChar( 'NEW_CURSOR ') );
Cursor := crDraw;

Then recompile the dpk.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

exchangeviews

India
39 Posts

Posted - Feb 26 2015 :  04:11:38  Show Profile  Reply
Hi Bill,

Thanks for your reply. It is working now.
Go to Top of Page

exchangeviews

India
39 Posts

Posted - Apr 10 2015 :  09:44:15  Show Profile  Reply
Hi Bill,

Is there a way to capture a scrolling window like web browser chrome using your component or other way?

Thanks.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Apr 26 2015 :  09:57:15  Show Profile  Reply
I am sorry but I do not know of a way to capture a scrolling window. There is code in Apprehend that attempts to capture a scrolling window that that was added by a user of Apprehend. Unfortunately the code is quite extensive and never worked well. You might try to ask your question at Stackoverflow.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: