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. Windows Forms
  4. usercontrol is not working correctly in the application

usercontrol is not working correctly in the application

Scheduled Pinned Locked Moved Windows Forms
help
4 Posts 2 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.
  • G Offline
    G Offline
    gtag
    wrote on last edited by
    #1

    Created usercontrol by taking group box and few controls like textbox, buttons etc. inside the group box. And when I check preview of the usercontrol , it is working correctly. But when I am trying to use it in the application, few controls from group box are flowing out or say the location of few controls in that group box is changed. Please help me if any one knows about this. Thanks in advance

    N 1 Reply Last reply
    0
    • G gtag

      Created usercontrol by taking group box and few controls like textbox, buttons etc. inside the group box. And when I check preview of the usercontrol , it is working correctly. But when I am trying to use it in the application, few controls from group box are flowing out or say the location of few controls in that group box is changed. Please help me if any one knows about this. Thanks in advance

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Have you set the Anchor property for that controls?

      All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

      G 1 Reply Last reply
      0
      • N N a v a n e e t h

        Have you set the Anchor property for that controls?

        All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

        G Offline
        G Offline
        gtag
        wrote on last edited by
        #3

        ya I have set anchor property for few controls as left,top. One more observation is like if i am using menustrip in my application only then the control's alignment in usercontrol is changing. If I am using it in application without any menustrip then the alignment is correct. I have checked the control's size even , there is a space to expand if i am using it in the application where i am using menustrip. Details: I am calling tabcontrol programmatically in a form containing menustrip. At the same time i am calling usercontrol on the tab page. I have used usercontrol for testing purpose in different applications, in few applications it is working and in few its not. Please tell me if I need to set any property or ny details u want me to check. thank u

        modified on Monday, September 8, 2008 3:16 AM

        G 1 Reply Last reply
        0
        • G gtag

          ya I have set anchor property for few controls as left,top. One more observation is like if i am using menustrip in my application only then the control's alignment in usercontrol is changing. If I am using it in application without any menustrip then the alignment is correct. I have checked the control's size even , there is a space to expand if i am using it in the application where i am using menustrip. Details: I am calling tabcontrol programmatically in a form containing menustrip. At the same time i am calling usercontrol on the tab page. I have used usercontrol for testing purpose in different applications, in few applications it is working and in few its not. Please tell me if I need to set any property or ny details u want me to check. thank u

          modified on Monday, September 8, 2008 3:16 AM

          G Offline
          G Offline
          gtag
          wrote on last edited by
          #4

          Hey got it. Due to the name of tab control page, alignment of controls in user control was changing. Because, I have selected the font as "verdana" & that too "bold" due to that the alignment was changing. Now it got solved after changing it to normal. It took 2 days to get this point. ahh but solved. bye

          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