欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來到入門教程網(wǎng)!

C#教程

當前位置:主頁 > 軟件編程 > C#教程 >

C#實現(xiàn)窗體全屏的兩種方法

來源:本站原創(chuàng)|時間:2020-01-10|欄目:C#教程|點擊: 次

本文為大家分享了C#實現(xiàn)窗體全屏的具體代碼,供大家參考,具體內(nèi)容如下

方法一:不過此方法有時候會出現(xiàn)莫名的bug

//程序啟動路徑,與生成程序的exe文件在同一目錄下
public String exePath = Application.StartupPath;
//定義窗體寬高
int screenWidth = 0;
int screenHeight = 0;
screenWidth = (int)System.Windows.SystemParameters.PrimaryScreenWidth;
screenHeight = (int)System.Windows.SystemParameters.PrimaryScreenHeight;
// 設(shè)置全屏  
this.FormBorderStyle = FormBorderStyle.None;   //設(shè)置窗體為無邊框樣式
this.WindowState = FormWindowState.Maximized;  //最大化窗體
this.Left = 0;
this.Top = 0;
this.Width = screenWidth;
this.Height = screenHeight;
//窗體背景圖
this.BackgroundImage = Image.FromFile(exePath + "文件名");

方法二:

//程序啟動路徑,與生成程序的exe文件在同一目錄下
public String exePath = Application.StartupPath;
//窗口左上角位置
public Point m_formAutographShowPos;
//設(shè)置窗體尺寸
this.Width = (int)System.Windows.SystemParameters.PrimaryScreenWidth;
this.Height = (int)System.Windows.SystemParameters.PrimaryScreenHeight;
this.ClientSize = new System.Drawing.Size(Width, Height);

//計算初始位置
m_formAutographShowPos.X = 0;
m_formAutographShowPos.Y = 0;
Location = m_formAutographShowPos;
//窗體背景圖
this.BackgroundImage = Image.FromFile(exePath + "文件名");

以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持我們。

上一篇:C#如何使用SHBrowseForFolder導出中文文件夾詳解

欄    目:C#教程

下一篇:C#中Datetimepicker出現(xiàn)問題的解決方法

本文標題:C#實現(xiàn)窗體全屏的兩種方法

本文地址:http://mengdiqiu.com.cn/a1/C_jiaocheng/5026.html

網(wǎng)頁制作CMS教程網(wǎng)絡(luò)編程軟件編程腳本語言數(shù)據(jù)庫服務(wù)器

如果侵犯了您的權(quán)利,請與我們聯(lián)系,我們將在24小時內(nèi)進行處理、任何非本站因素導致的法律后果,本站均不負任何責任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網(wǎng) 版權(quán)所有