Share Tips, Code Samples, etc. with the Visual Prolog community.
Steve Lympany
VIP Member
Posts: 56
Joined: 31 Mar 2001 23:01

Screen Capture project

Unread post by Steve Lympany »

Find attached a VIP3 project that captures the screen (picture), and displays it in a form.

It is simply an update of Rob K's work (Vitalik) (thanks Rob)

The project contains his dll in the EXE folder.

Maybe there are other ways, without the need for the DLL....??

screen capture project
(28.01 KiB) Downloaded 1516 times
Vitaly Markov
Active Member
Posts: 40
Joined: 30 Nov 2003 0:01

Unread post by Vitaly Markov »

I did capture of the screen (static picture only) as follows (2000 year, Visual Prolog 5.2):
1. The size of task window should be maximal.
2. The window should be transparent.
3. Capture of screen (VIP5.2):

Code: Select all

  task_win_eh(_Win,e_MouseDbl(_PNT,_ShiftCtlAlt,_Button),0):-!,         H = vpi_GetAttrVal(attr_screen_height),         % get screen height         W = vpi_GetAttrVal(attr_screen_width),          % get screen width         PICTURE = pict_GetFromWin(_Win,rct(0,0,W,H)),          % capture         PICTURE1 = pict_Rotate(PICTURE,pictRotate_180deg),  % rotation of "screen"         pict_Draw(_Win,PICTURE1,pnt(0,0),rop_SrcCopy),        %  :-))         pict_Destroy(PICTURE),         !.
This code till now works.
I believe, that the main idea is made in points 1 and 2.
Post Reply