Windows Azure Cloud Storage ermöglicht es Ihnen bereits ab 0,10€ pro GB/Monat die Vorteile der Cloud zu nutzen.
Willkommen bei dotnet-snippets.de! Snippet hinzufügen Login Registrieren
Snippets in der Datenbank: 1550 | Anzahl registrierter User: 1841 | Besucher online: 20
Hauptmenü
Home
Top Ten
Zufälliger Snippet
FAQs
.NET Community
dotnet-forum.de
dotnet-kicks.de
Social

RSS Feeds
Rss Alle Snippets
Rss C#
Rss VB.NET
Rss C++
Rss ASP.NET
Partner
Member of Microsoft Community Leader/Insider Program (CLIP)

ermitteln der Bildschirmauflösung


Autor: TBBsolutions
Sprache: C#
Bewertung:
2.88 (4 votes)
Anzahl der Aufrufe: 4180
  
Kick it on dotnet-kicks.de  

Beschreibung:

Damit bekommt man die verschiedenen Infos

Abgelegt unter: Bildschirmauflösung, MonitorSize, Höhe, Breite.



C#
1
2
3
SystemInformation.PrimaryMonitorSize
//bei mehreren Monitoren
SystemInformation.VirtualScreen
Sie haben Fragen zu diesem Snippet oder brauchen Hilfe bei der .NET Entwicklung?
Freundliche und kompetente Entwickler helfen Ihnen gern weiter im Forum für .NET Entwicklung.



Kommentare:
(Zum Schreiben von Kommentaren bitte anmelden.)

jack schrieb am:  04.03.2010 21:32:36

Ja nun. Sorry, aber das ist ein Namespace und kein Snippet.

Imports System
Imports System.Drawing
Imports System.Windows.Forms

Public NotInheritable Class Form1
Inherits System.Windows.Forms.Form

Friend WithEvents BtnGetScreenInfo As System.Windows.Forms.Button
Friend WithEvents ListBox1 As System.Windows.Forms.ListBox

<System.STAThread()> _
Public Shared Sub Main()
System.Windows.Forms.Application.Run(New Form1())
End Sub 'Main

Public Sub New()
MyBase.New()

Me.BtnGetScreenInfo = New System.Windows.Forms.Button
Me.ListBox1 = New System.Windows.Forms.ListBox

' Get System Information Button
Me.BtnGetScreenInfo.Location = New System.Drawing.Point(16, 16)
Me.BtnGetScreenInfo.Size = New System.Drawing.Size(256, 48)
Me.BtnGetScreenInfo.TabIndex = 0
Me.BtnGetScreenInfo.Text = "Get System Information"

' System Information ListBox
Me.ListBox1.Location = New System.Drawing.Point(16, 72)
Me.ListBox1.Size = New System.Drawing.Size(256, 186)
Me.ListBox1.TabIndex = 1

' Form1
Me.ClientSize = New System.Drawing.Size(292, 317)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.ListBox1, Me.BtnGetScreenInfo})
Me.Text = "System Information Example"

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnGetScreenInfo.Click
' Get System Information for the current machine.
ListBox1.Items.Add("ComputerName : " + SystemInformation.ComputerName)
ListBox1.Items.Add("Network : " + SystemInformation.Network.ToString())
ListBox1.Items.Add("UserDomainName : " + SystemInformation.UserDomainName)
ListBox1.Items.Add("UserName : " + SystemInformation.UserName)
ListBox1.Items.Add("BootMode : " + SystemInformation.BootMode.ToString())
ListBox1.Items.Add("MenuFont : " + SystemInformation.MenuFont.ToString())
ListBox1.Items.Add("MonitorCount : " + SystemInformation.MonitorCount.ToString())
ListBox1.Items.Add("MonitorsSameDisplayFormat : " + SystemInformation.MonitorsSameDisplayFormat.ToString())
ListBox1.Items.Add("ArrangeDirection: " + SystemInformation.ArrangeDirection.ToString())
ListBox1.Items.Add("MousePresent : " + SystemInformation.MousePresent.ToString())
ListBox1.Items.Add("MouseButtonsSwapped : " + SystemInformation.MouseButtonsSwapped.ToString())
ListBox1.Items.Add("UserInteractive : " + SystemInformation.UserInteractive.ToString())
ListBox1.Items.Add("VirtualScreen: " + SystemInformation.VirtualScreen.ToString())
End Sub
End Class


Diese Snippets könnten für Sie interessant sein:

schlecht sehr gut
1 2 3 4 5 6 7 8 9 10
Nur angemeldete User können Snippets bewerten.