Страница: 1 |
Вопрос: Получение текущего разрешения экрана | Добавлено: 11.07.05 16:24 |
Автор вопроса: ![]() |
Не подскажете, с помощью каких функций VB.NET получить установленное на мониторе разрешение? Т.е. высоту и ширину экрана (в пикселах, твипселах - не важно). Заранее спасибо. |
Ответы | Всего ответов: 1 |
Номер ответа: 1 Автор ответа: ![]() ![]() ![]() ![]() ![]() ![]() ![]() Администратор ICQ: 326066673 Вопросов: 368 Ответов: 5968 |
Web-сайт: Профиль | Цитата | #1 | Добавлено: 11.07.05 17:18 |
2 Vik: иногда лучше жевать, чем говорить. В твоем случае.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnGetScreenInfo.Click
Dim Index As Integer Dim UpperBound As Integer ' Gets an array of all the screens connected to the system. Dim Screens() As System.Windows.Forms.Screen = _ System.Windows.Forms.Screen.AllScreens UpperBound = Screens.GetUpperBound(0) For Index = 0 To UpperBound ' For each screen, add the screen properties to a list box. ListBox1.Items.Add(" ![]() ListBox1.Items.Add("Bounds: " + Screens(Index).Bounds.ToString()) ListBox1.Items.Add("Type: " + Screens(Index).GetType().ToString()) ListBox1.Items.Add("Working Area: " + Screens(Index).WorkingArea.ToString()) ListBox1.Items.Add("Primary Screen: " + Screens(Index).Primary.ToString()) Next End Sub |
Страница: 1 |
|