| |

VerySource

 Forgot password?
 Register
Search
View: 1738|Reply: 11

Get client screenshot and upload

[Copy link]

2

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Costa Rica

Post time: 2020-1-10 10:00:01
| Show all posts |Read mode
How to get the screenshot of the client in the webpage and upload it in Asp.Net?
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 United States

Post time: 2020-1-11 16:18:01
| Show all posts
Write an activex control, use the windows API function bitblt to copy the screen, save it as a file, and upload it.
Reply

Use magic Report

3

Threads

29

Posts

22.00

Credits

Newbie

Rank: 1

Credits
22.00

 China

Post time: 2020-1-13 12:00:01
| Show all posts
How can someone always do something like me.
I wrote an ActiveX in VC ++, captured the area selected by the user, compressed it into Jpeg, then converted it to Base64, and uploaded it.
Give you the key part of the code:
HBITMAP CCopyScr :: CopyToBmp (CRect Rect)
{
// Screen and memory device description table
HDC hScrDC, hMemDC;

// bitmap handle
HBITMAP hBitmap, hOldBitmap;

// selected area coordinates
int nX, nY, nX2, nY2;

// bitmap width and height
int nWidth, nHeight;

        // Screen Resolution
int xScrn, yScrn;

// make sure the selected area is not an empty rectangle
if (IsRectEmpty (&Rect))
return NULL;

// Create a device description table for the screen
hScrDC = CreateDC ("DISPLAY", NULL, NULL, NULL);
Ranch
// Create a compatible memory device description table for the screen device description table
hMemDC = CreateCompatibleDC (hScrDC);
Ranch
// get the coordinates of the selected area
nX = Rect.left;
nY = Rect.top;
nX2 = Rect.right;
nY2 = Rect.bottom;
Ranch
// Get screen resolution
xScrn = GetDeviceCaps (hScrDC, HORZRES);
yScrn = GetDeviceCaps (hScrDC, VERTRES);
Ranch
// Make sure the selected area is visible
if (nX <0)
nX = 0;
if (nY <0)
nY = 0;
if (nX2> xScrn)
nX2 = xScrn;
if (nY2> yScrn)
nY2 = yScrn;
nWidth = nX2-nX;
nHeight = nY2-nY;
Ranch
// Create a bitmap compatible with the screen device description table
hBitmap = CreateCompatibleBitmap (hScrDC, nWidth, nHeight);
Ranch
// Select the new bitmap into the memory device description table
hOldBitmap = (HBITMAP) SelectObject (hMemDC, hBitmap);
Ranch
// Copy the screen device description table to the memory device description table
BitBlt (hMemDC, 0, 0, nWidth, nHeight, hScrDC, nX, nY, SRCCOPY);
Ranch
// Get the handle of the screen bitmap
hBitmap = (HBITMAP) SelectObject (hMemDC, hOldBitmap);
Ranch
// clear
DeleteDC (hScrDC);
DeleteDC (hMemDC);
Ranch
// return the bitmap handle
return hBitmap;
}
Reply

Use magic Report

0

Threads

29

Posts

19.00

Credits

Newbie

Rank: 1

Credits
19.00

 China

Post time: 2020-1-18 22:45:01
| Show all posts
asp.net has no screen capture components. Can only rely on other custom .dll slightly, ha ha
Reply

Use magic Report

2

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Japan

 Author| Post time: 2020-1-20 15:45:01
| Show all posts
Is there a client script to simulate the screenshot key
And then get the content?
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-1-20 20:09:02
| Show all posts
Is there a client script to simulate the screenshot key
And then get the content?
=============
No.
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-1-20 20:27:01
| Show all posts
If there is, there is no privacy for users.
Reply

Use magic Report

3

Threads

29

Posts

22.00

Credits

Newbie

Rank: 1

Credits
22.00

 China

Post time: 2020-1-20 22:45:01
| Show all posts
If there is such a script, it must be a security hole.

ActiveX can achieve this, so the security of ActiveX is widely criticized.
Reply

Use magic Report

0

Threads

73

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-1-22 11:09:01
| Show all posts
If you use VS to develop, then the client should also install DotnetFramework.
Reply

Use magic Report

2

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-1-22 15:09:01
| Show all posts
With C ++, I don't want the user to install anything except activex itself.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list