mmurgas Posted April 3, 2013 Share Posted April 3, 2013 Hello, I'm trying to make a screenshot of an area of my application (map) and leave it in a directory on the server, it works correctly in my local environment (localhost), but when I go to the actual server ... as I can make it work there? show the code. Greetings and thanks in advance mmurgas procedure capturar_area_pantalla_a_bitmap_temporal(ABitmap: TBitmap); var vDesktopDC: HDC; //contendrá el device context handle del escritorio actual begin vDesktopDC := GetWindowDC(GetDesktopWindow); try ABitmap.PixelFormat := pf24bit; ABitmap.Height := Screen.Height; ABitmap.Width := Screen.Width; BitBlt(ABitmap.Canvas.Handle, 0, 0, ABitmap.Width, ABitmap.Height, vDesktopDC, 0, 0, SRCCOPY); finally ReleaseDC(GetDesktopWindow, vDesktopDC); end; end; procedure capturar_pantalla_a_disco_formato_JPG(const fichero:string); var vJpg: TJpegImage; vBmp: TBitmap; begin vBmp := TBitmap.Create; try capturar_area_pantalla_a_bitmap_temporal(vBmp); vJpg := TJpegImage.Create; try vJpg.Assign(vBmp); vJpg.CompressionQuality := 85; //calidad JPG 85% vJpg.SaveToFile(fichero); //save format JPG finally vJpg.Free; end; finally vBmp.Free; end; end; Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted April 3, 2013 Administrators Share Posted April 3, 2013 All code written in Delphi will only have access to resources of local PC which runs your uniGUI app. Quote Link to comment Share on other sites More sharing options...
mmurgas Posted April 5, 2013 Author Share Posted April 5, 2013 Thanks Farshad, indeed I want to make a local pc screen is running the website and pressing a button to display the recording server ... in my path (UniServerModule.StartPath + 'Image \ pict.jpg') Greetings and Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.