[ vb 2008 ] 모니터 해상도 구하기 본문

[PL]/VB & VB.NET

[ vb 2008 ] 모니터 해상도 구하기

객과 함께. 2010. 1. 5. 11:37

 

<Window x:Class="Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="175" Width="300" Name="Window1">
    <Grid Height="138">
        <TextBlock Margin="12,12,12,18" Name="TextBlock1" />
        <TextBox Height="27" Margin="26,32,27,38" Name="TextBox1" VerticalAlignment="Top" />
        <TextBox Height="27" Margin="26,32,27,38" Name="TextBox2" VerticalAlignment="Bottom" />
    </Grid>
</Window>

 

Class Window1

    Private Sub Window1_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded
        InitializeComponent()
        Me.Title = "모니터 실제 해상도"
        TextBox1.Text = " WIDTH : " & SystemParameters.PrimaryScreenWidth.ToString()
        TextBox2.Text = " hEIGHT : " & SystemParameters.PrimaryScreenHeight.ToString
    End Sub

 

Posted by 테디

참고 사이트 : taedi.kr

1차 수정일 : 2010.01.04    수정자 : 객

 

 vc#  소스를  참고로 vb로 바꾸어 보았습니다.