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. odd Custom control size issue

odd Custom control size issue

Scheduled Pinned Locked Moved C#
csharpvisual-studiohelpquestionannouncement
5 Posts 3 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.
  • B Offline
    B Offline
    Blubbo
    wrote on last edited by
    #1

    I'm trying to understand what's going on... When I created the custom control and dynamic buttons, and run it on my pc. i see everything on my GUI. But when running on my co-worker's computer, the dynamic buttons aren't showing. These buttons are hard coded in their GUI location. I apparently discovered that the buttons were hidden behind the custom control on my co-worker's computer. The computer and gui size are as follows: my computer (x86): Screen resolution - 32-bit (true color) 1440x990 GUI size: 549, 352 my co-worker (x64): Screen resolution - 32-bit (true color) 1920x1080 GUI size: 732, 433 What gives? I had believed that the GUI would be at the same size. Care anyone explain? My co-worker got my source code and her visual studio (same version as mine) and the custom control size has shown to be bigger size than mine.

    P L 2 Replies Last reply
    0
    • B Blubbo

      I'm trying to understand what's going on... When I created the custom control and dynamic buttons, and run it on my pc. i see everything on my GUI. But when running on my co-worker's computer, the dynamic buttons aren't showing. These buttons are hard coded in their GUI location. I apparently discovered that the buttons were hidden behind the custom control on my co-worker's computer. The computer and gui size are as follows: my computer (x86): Screen resolution - 32-bit (true color) 1440x990 GUI size: 549, 352 my co-worker (x64): Screen resolution - 32-bit (true color) 1920x1080 GUI size: 732, 433 What gives? I had believed that the GUI would be at the same size. Care anyone explain? My co-worker got my source code and her visual studio (same version as mine) and the custom control size has shown to be bigger size than mine.

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      What DPI are you both viewing at?

      *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

      "Mind bleach! Send me mind bleach!" - Nagy Vilmos

      CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

      B 1 Reply Last reply
      0
      • P Pete OHanlon

        What DPI are you both viewing at?

        *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

        "Mind bleach! Send me mind bleach!" - Nagy Vilmos

        CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

        B Offline
        B Offline
        Blubbo
        wrote on last edited by
        #3

        Ahh! That explains it! My pc is set to 100% (96 DPI) and she has 125% (120 DPI). So that would mean I would need to make adjustment on my code to calculate DPI value. Gonna find out how to do this!

        P 1 Reply Last reply
        0
        • B Blubbo

          Ahh! That explains it! My pc is set to 100% (96 DPI) and she has 125% (120 DPI). So that would mean I would need to make adjustment on my code to calculate DPI value. Gonna find out how to do this!

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          Or not. If you use anchoring, you effectively remove the dependency on resolution.

          *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

          "Mind bleach! Send me mind bleach!" - Nagy Vilmos

          CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

          1 Reply Last reply
          0
          • B Blubbo

            I'm trying to understand what's going on... When I created the custom control and dynamic buttons, and run it on my pc. i see everything on my GUI. But when running on my co-worker's computer, the dynamic buttons aren't showing. These buttons are hard coded in their GUI location. I apparently discovered that the buttons were hidden behind the custom control on my co-worker's computer. The computer and gui size are as follows: my computer (x86): Screen resolution - 32-bit (true color) 1440x990 GUI size: 549, 352 my co-worker (x64): Screen resolution - 32-bit (true color) 1920x1080 GUI size: 732, 433 What gives? I had believed that the GUI would be at the same size. Care anyone explain? My co-worker got my source code and her visual studio (same version as mine) and the custom control size has shown to be bigger size than mine.

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #5

            Rather than recalculating the positions yourself, you may get satisfactory results by using the Anchor or Dock properties of your Controls; setting Form.AutoSize often helps too. :)

            Luc Pattyn [My Articles] Nil Volentibus Arduum

            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