使用System;
使用System.Collections.Generic;
使用System.ComponentModel;
使用System.Data;
使用System.Drawing;
使用System.Linq;
using System.Runtime.InteropServices;
命名空間解決解析
{
publicpartial class Form1 : Form
{
Width;
int j = Screen. PrimaryScreen. Bounds.Height;
public Form1()
{
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
public struct DEV MODE
32)]
公有字串dmDeviceName;
公共短dmSize;
公共短dmDriver額外;
公用短dmPaperSize;
公用短dmPaperLength;
公共短dmPaperWidth;
公共短dmScale;
公共短dmCopies;
公共短dmDefaultSource;
公共短dmPrintQuality;
公共短dm顏色;
公共短dmDuplex;
公共短dmYResolution;
公共短dmTTOption;
公共短dmCollat CyValTStr, SizeConst = 32)]
public string dmFormName public int dmBitsPerPel;
public int dmPelsWidth ;
public int dmDisplayFlags;
public int dmDisplayFrequency;
}
[DllImport("user32.dll", CharSet = CharSet.Auto)]
Flaic extern int ChangeDis Flaic extern int ChangeDis playpp. [DllImport("user32.dll", CharSet = CharSet.Auto)]
static extern bool EnumDisplaySettings(string lpszDeviceName, Int32 iModeNum, ref DEVMODE c
DEVMODE DevM = new;
DevM.dmSize = (short)Marshal.SizeOftype( DEVMODE) );
bool mybool;
DevM.dmPelsWidth = 1024;//寬
DevM.dmPelsHeight = 768;//高
DevM.dmBitsPerPel = 32;//顏色像素
long result = ChangeDisplaySettings(ref DevM Dev, 0);
}
void FuYuan()
{ DevM.dmSize = (short)Marshal.SizeOf(typeof(DEVMODE));
, 0, ref DevM);
DevM.dmPelsWidth = i;//回復寬度
dmDisplayFrequency = 60;//刷新頻率
DevM.dmBitsPerPel = 32;//色像素
long result = ChangeDisplaySettings(ref DevM, 0);
}
private void Form1_Load(object sender, EventArgs e)
{
ChangeRes();
}
private void button1_Click(object sender, EventArgs e)
{
FuYuan();
this.Close();

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

SublimeText3漢化版
中文版,非常好用

VSCode Windows 64位元 下載
微軟推出的免費、功能強大的一款IDE編輯器

Dreamweaver CS6
視覺化網頁開發工具

Dreamweaver Mac版
視覺化網頁開發工具

SublimeText3 Linux新版
SublimeText3 Linux最新版