成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

vb.net自適應(yīng)屏幕的簡單介紹

VS2013 VB.NET窗口控件怎么做自適應(yīng)

窗體在改變大小時會有一個size事件的,在這個事件中寫代碼獲取窗體的高度和寬度再根據(jù)窗體的高度和寬度的比例來效果自己的控件的高度寬度比例

成都創(chuàng)新互聯(lián)服務(wù)項(xiàng)目包括信豐網(wǎng)站建設(shè)、信豐網(wǎng)站制作、信豐網(wǎng)頁制作以及信豐網(wǎng)絡(luò)營銷策劃等。多年來,我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢、行業(yè)經(jīng)驗(yàn)、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,信豐網(wǎng)站推廣取得了明顯的社會效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到信豐省份的部分城市,未來相信會繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!

VB 窗體控件分辨率自適應(yīng)問題

Public Type CONTROLRECT Left As Single Top As Single Width As Single Height As SingleEnd Type Public Const HORZRES = 8Public Const VERTRES = 10Public Declare Function GetDesktopWindow Lib "user32" () As LongPublic Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Long) As LongPublic Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As LongPublic Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long '取得界面原始控件的位置及大小,并保存到數(shù)組里Public Sub GetSourcePos(this As Object, rc() As CONTROLRECT, Optional bigFont As Boolean = True)

'On Error Resume Next

Dim tempX As Integer, tempY As IntegertempX = this.ScaleWidth '1024tempY = this.ScaleHeight '768 '此處原來如果在1024*768分辨率下顯示正常的話,就可以直接賦值1024和768 Dim temp As Control Dim nSum As Integer nSum = 0 For Each temp In this '此處要注意,有些控件沒有width,height等屬性,在此要做出判斷 If TypeOf temp Is ComboBox Then With rc(nSum) .Left = temp.Left / tempX .Width = temp.Width / tempX .Top = temp.Top / tempY End With ElseIf TypeOf temp Is Timer Then' 'none' ElseIf TypeOf temp Is StatusBar Then' 'none Else With rc(nSum) .Left = temp.Left / tempX .Width = temp.Width / tempX .Top = temp.Top / tempY .Height = temp.Height / tempY End With End If nSum = nSum + 1 NextEnd Sub '根據(jù)比例調(diào)整控件的大小Public Sub SetNewPos(this As Object, rc() As CONTROLRECT)

'On Error Resume Next Dim tempX As Integer, tempY As Integer tempX = this.ScaleWidth '1024 tempY = this.ScaleHeight '768 ' '如果初始界面顯示始終是以最大化的方式顯示的話,此處就可以調(diào)用系統(tǒng)分辨率進(jìn)行設(shè)置tempx,tempy' hwnd = GetDesktopWindow()' ' Get the device context for the desktop' hdc = GetWindowDC(hwnd)' If hdc Then' Dim a As Long, b As Long' a = GetDeviceCaps(hdc, HORZRES)' b = GetDeviceCaps(hdc, VERTRES)' tempX = a' tempY = b' End If' ReleaseDC hwnd, hdc Dim temp As Control '//用于取各種控件 Dim nSum As Integer nSum = 0 For Each temp In this '此處要注意,有些控件沒有width,height等屬性,在此要做出判斷 If TypeOf temp Is ComboBox Then temp.Left = rc(nSum).Left * tempX temp.Width = rc(nSum).Width * tempX temp.Top = rc(nSum).Top * tempY ElseIf TypeOf temp Is Timer Then 'none 'ElseIf TypeOf temp Is StatusBar Then 'none Else temp.Left = rc(nSum).Left * tempX temp.Width = rc(nSum).Width * tempX temp.Top = rc(nSum).Top * tempY temp.Height = rc(nSum).Height * tempY End If nSum = nSum + 1 Next End Sub

vb.net中怎么可以讓窗體全屏顯示?

Me.Height = My.Computer.Screen.Bounds.Height

Me.Width = My.Computer.Screen.Bounds.Width

這是設(shè)置窗體的長寬和屏幕的分辨率一樣大小,相當(dāng)于全屏。

如果Me.WindowState=FormWindowState.Maximized的話,只是單純的將窗體最大化,但恢復(fù)窗口大小后窗體的大小實(shí)際上還和原來一樣大。

VB.NET的特點(diǎn)

1.真正成為面向?qū)ο笠约爸С掷^承性的語言。

2.窗體設(shè)計器支持可視化繼承,并且包含了許多新的特性,比如自動改變窗體大小、資源本地化支持、數(shù)據(jù)類工具內(nèi)在支持XML數(shù)據(jù)。

3.直接建立在.NET的框架結(jié)構(gòu)上,因此開發(fā)人員可以充分利用所有.NET平臺特性,也可以與其他的.NET語言交互。

4.為Windows應(yīng)用程序提供了XCOPY部署,開發(fā)者不再需要為DLL的版本問題擔(dān)憂。

網(wǎng)站題目:vb.net自適應(yīng)屏幕的簡單介紹
新聞來源:http://jinyejixie.com/article16/dohhhgg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供虛擬主機(jī)、軟件開發(fā)、App開發(fā)、商城網(wǎng)站、域名注冊做網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都定制網(wǎng)站建設(shè)
麻城市| 囊谦县| 略阳县| 当阳市| 井研县| 桂林市| 龙岩市| 蓝山县| 长兴县| 禹城市| 文水县| 祥云县| 徐汇区| 平定县| 普定县| 宁波市| 久治县| 西丰县| 梁河县| 疏附县| 太仓市| 南阳市| 内乡县| 黄梅县| 周口市| 云浮市| 莒南县| 望江县| 新民市| 大洼县| 邮箱| 易门县| 错那县| 弥渡县| 呼图壁县| 香港 | 朔州市| 米泉市| 关岭| 湘阴县| 洛阳市|