Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. windows Display setting

windows Display setting

Scheduled Pinned Locked Moved C#
question
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nafiseh Salmani
    wrote on last edited by
    #1

    How could i manage windows display setting(screen resolution)from win application ? OR how could i set my win application according to screen resolution? salmani

    L A R 3 Replies Last reply
    0
    • N Nafiseh Salmani

      How could i manage windows display setting(screen resolution)from win application ? OR how could i set my win application according to screen resolution? salmani

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You can use this: this.WindowState = System.Windows.Forms.FormWindowState.Maximized;

      N 1 Reply Last reply
      0
      • L Lost User

        You can use this: this.WindowState = System.Windows.Forms.FormWindowState.Maximized;

        N Offline
        N Offline
        Nafiseh Salmani
        wrote on last edited by
        #3

        thanks but it couldnt be useful for me. I want my windows applications catch some argumans that in which screen resolution user is running this application and set my usercontrol location and size by coding.

        L 1 Reply Last reply
        0
        • N Nafiseh Salmani

          thanks but it couldnt be useful for me. I want my windows applications catch some argumans that in which screen resolution user is running this application and set my usercontrol location and size by coding.

          L Offline
          L Offline
          lmoelleb
          wrote on last edited by
          #4

          Haven't we replied to this several times lately? Handle the "resize" event. This is the ONLY option for a form unless you are making something really special - like a kiosk mode application where you need to ensure your application is the only one running on the screen (again, only do this if you KNOW this is the case, if you THINK it - then you are wrong). If it is to run in "kiosk mode", there is apparently a something called "Screen.*" according to previous replies to this (I have no idea if it is a class with static properties or a property on the application or form class).

          1 Reply Last reply
          0
          • N Nafiseh Salmani

            How could i manage windows display setting(screen resolution)from win application ? OR how could i set my win application according to screen resolution? salmani

            A Offline
            A Offline
            Andrew Lygin
            wrote on last edited by
            #5

            Hi, Salmani. To set your application according to screen resolution you can use System.Windows.Forms.Screen class which provides information about all displays on the system.

            1 Reply Last reply
            0
            • N Nafiseh Salmani

              How could i manage windows display setting(screen resolution)from win application ? OR how could i set my win application according to screen resolution? salmani

              R Offline
              R Offline
              Rizwan Bashir
              wrote on last edited by
              #6

              To Get Screen Resoltion this is the code MessageBox.Show(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width()) MessageBox.Show(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height()) To set the Screen According to your Resoltuon . you have to use Anchor and Dock properties accordingly as with the help of these you can expand your controls when the form will be maximized or resized. Remember you dont need to code for this only visual control settings required

              Rizwan Bashir ALM Soft[^]

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups