Home > Net >  Used in the c # winform pointToScreen anomalies
Used in the c # winform pointToScreen anomalies

Time:10-21

Some systems are good, Windows 10 notebook is unusual, Windows 7 virtual machine abnormalities, reason and solution

CodePudding user response:

Use the wondows media player, play the screenshots

CodePudding user response:

Look at the abnormal system, its not 100% dpi Settings?

CodePudding user response:

refer to the second floor caozhy response:
see abnormal system, it's not 100% dpi Settings?

Don't use the mouse drag screenshots, tried to change the numerical dpi, useless,

CodePudding user response:

The code is as follows:
///& lt; Summary>
///intercept Settings
///& lt;/summary>
///& lt; Param name="sender" & gt;
///& lt; Param name="e" & gt;
Private void btnSet_Click (object sender, EventArgs e)
{
If (btnSet. Text=="intercept Settings")
{
Bitmap newbitmap=new Bitmap (this. AxWindowsMediaPlayer1. Width, enclosing axWindowsMediaPlayer1, Height);
Graphics g=Graphics. FromImage (newbitmap);
G.Com positingQuality=CompositingQuality. HighQuality;//set to the highest quality

//this problem
Right opyFromScreen (enclosing axWindowsMediaPlayer1. PointToScreen (new Point (0, 0)), new Point (0, 0), the new Size (this. AxWindowsMediaPlayer1. Width, axWindowsMediaPlayer1. Height));

Enclosing splitContainer1. Panel1. BackgroundImage=newbitmap; Draw a background//
AxWindowsMediaPlayer1. Ctlcontrols. Pause ();
This. SplitContainer1. Panel1. Controls. Remove (axWindowsMediaPlayer1);//remove plug-in, can be transparent displays interception sets the canvas control
Canvas1. BringToFront ();

BtnSet. Text="setup" end;
BtnCapture. Enabled=false;
}
The else
{
This. SplitContainer1. Panel1. Controls. The Add (axWindowsMediaPlayer1);
AxWindowsMediaPlayer1. Ctlcontrols. Play ();
Canvas1. SendToBack ();
BtnSet. Text="clip Settings";
BtnCapture. Enabled=true;
}
}
  •  Tags:  
  • C #
  • Related