dcsimg
Results 1 to 12 of 12

Thread: [RESOLVED] Controls misplaced outside IDE

  1. #1

    Thread Starter
    Junior Member ryanguy426's Avatar
    Join Date
    May 2013
    Posts
    22

    Resolved [RESOLVED] Controls misplaced outside IDE

    This issue is a first for me. I can't figure out what is going on with Visual Studio right now...

    When I build the program within the IDE (Visual Studio) everything is fine and dandy, as shown below.
    Name:  yup just fine.jpg
Views: 368
Size:  30.7 KB
    But if I go and run the program from outside Visual Studio, this happens...
    Name:  so much cocaine.jpg
Views: 358
Size:  28.4 KB
    All of the controls are misplaced. Is Visual Studio on crack, or did I accidently do some weird setting?
    (Long time user of VS 2010, so it's a somewhat strange migration...)

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,346

    Re: Controls misplaced outside IDE

    What operating system are you using?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  3. #3

    Thread Starter
    Junior Member ryanguy426's Avatar
    Join Date
    May 2013
    Posts
    22

    Re: Controls misplaced outside IDE

    Windows 7 Professional x64

  4. #4
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,346

    Re: Controls misplaced outside IDE

    Is that a Windows Theme changer? If so may be second picture was when your change the theme from what you originally has but forgot to you had changing it?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  5. #5

    Thread Starter
    Junior Member ryanguy426's Avatar
    Join Date
    May 2013
    Posts
    22

    Re: Controls misplaced outside IDE

    No it's not a theme changer, although I can see how you may get that from the name of the program (really need a new one...) It's actually a game launcher. I could post the project zip on here if you wish, but to my knowledge there is nothing in my code that could cause this to be happening.

  6. #6
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,346

    Re: Controls misplaced outside IDE

    Quote Originally Posted by ryanguy426 View Post
    No it's not a theme changer, although I can see how you may get that from the name of the program (really need a new one...) It's actually a game launcher. I could post the project zip on here if you wish, but to my knowledge there is nothing in my code that could cause this to be happening.
    Looking at the application in both images it appears to be identical apart from different border colours. If you do decide to upload the project to the forums make sure there are no compiled files such as executable files, etc in the zip folder.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  7. #7

    Thread Starter
    Junior Member ryanguy426's Avatar
    Join Date
    May 2013
    Posts
    22

    Re: Controls misplaced outside IDE

    I uploaded it.
    And the border colours are different because I didn't have the window focused in the second screenshot, but I did in the first.
    Attached Files Attached Files

  8. #8
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,346

    Re: Controls misplaced outside IDE

    Attempting to run the project I receive the following errors


    Error 12 'End Using' must be preceded by a matching 'Using'. C:\Users\User\Desktop\ThemeLauncher\ThemeLauncher\Form1.vb 301 13 ThemeLauncher
    Error 11 'zip1' is not declared. It may be inaccessible due to its protection level. C:\Users\User\Desktop\ThemeLauncher\ThemeLauncher\Form1.vb 298 27 ThemeLauncher
    Error 7 Type 'WatermarkTextBox.WatermarkTextBox' is not defined. C:\Users\User\Desktop\ThemeLauncher\ThemeLauncher\Form1.Designer.vb 39 26 ThemeLauncher
    Error 8 Type 'WatermarkTextBox.WatermarkTextBox' is not defined. C:\Users\User\Desktop\ThemeLauncher\ThemeLauncher\Form1.Designer.vb 232 34 ThemeLauncher
    Error 10 Type 'ZipEntry' is not defined. C:\Users\User\Desktop\ThemeLauncher\ThemeLauncher\Form1.vb 295 22 ThemeLauncher
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  9. #9

    Thread Starter
    Junior Member ryanguy426's Avatar
    Join Date
    May 2013
    Posts
    22

    Re: Controls misplaced outside IDE

    It looks like it's due to the fact it is using a custom control. It's WatermarkTextBox. It's quite a large program.. I'm not willing to remove the references and custom controls to make it work though. Guess I'll figure it out on my own.
    Staying up until 6:00am staring at a computer screen, typing code non-stop? Count me in!

  10. #10
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,252

    Re: Controls misplaced outside IDE

    Quote Originally Posted by ryanguy426 View Post
    It looks like it's due to the fact it is using a custom control. It's WatermarkTextBox. It's quite a large program.. I'm not willing to remove the references and custom controls to make it work though. Guess I'll figure it out on my own.
    Seems it is caused by the FormBorderStyle setting, when I open your project form1 is set to FixedDialog and doesn't look correct at runtime or in the IDE (VS2010/ Win7 here), if I change form style to Sizeable then it looks perfect. Not sure what the right solution is tho.

  11. #11
    PowerPoster
    Join Date
    Oct 2010
    Posts
    2,141

    Re: Controls misplaced outside IDE

    It has something to do with the Min and Max Form size. I don't have time to investigate the root cause, but if you reset those to (0,0) it will work both ways. It is most likely due to the workings of SetBoundsCore.

  12. #12

    Thread Starter
    Junior Member ryanguy426's Avatar
    Join Date
    May 2013
    Posts
    22

    Re: Controls misplaced outside IDE

    Quote Originally Posted by Edgemeal View Post
    Seems it is caused by the FormBorderStyle setting, when I open your project form1 is set to FixedDialog and doesn't look correct at runtime or in the IDE (VS2010/ Win7 here), if I change form style to Sizeable then it looks perfect. Not sure what the right solution is tho.
    Quote Originally Posted by TnTinMN View Post
    It has something to do with the Min and Max Form size. I don't have time to investigate the root cause, but if you reset those to (0,0) it will work both ways. It is most likely due to the workings of SetBoundsCore.
    Turns out that was indeed the cause. I set the FormBorderStyle to FixedSingle, and set the min/max size to 0,0. Works perfectly now
    Staying up until 6:00am staring at a computer screen, typing code non-stop? Count me in!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width