以vb.net 2005 為範例
一、取得螢幕解析度
Dim Screen_X
Dim Screen_Y
Screen_X= Screen.PrimaryScreen Screen.PrimarBounds.Width
Screen_Y= Screen.PrimaryScreen Screen.PrimarBounds.Height
MessageBox.Show("螢幕解析度" & Screen_X & "X" & Screen_Y)
二、取得工作區域大小(桌面大小)
Dim workarea_Hight As Integer
Dim workerarea_width As Integer
workarea_Hight = Screen.PrimaryScreen.WorkingArea.Width
workerarea_width = Screen.PrimaryScreen.WorkingArea.Height
MessageBox.Show("工作區域大小" & workerarea_width & "X" & workarea_Hight)
沒有留言:
張貼留言