以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)

 

 

文章標籤
創作者介紹

月神的咖啡館

Byron 發表在 痞客邦 PIXNET 留言(0) 人氣()