2 Attachment(s)
[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.
Attachment 116535
But if I go and run the program from outside Visual Studio, this happens...
Attachment 116537
All of the controls are misplaced. Is Visual Studio on crack, or did I accidently do some weird setting? :confused:
(Long time user of VS 2010, so it's a somewhat strange migration...)
Re: Controls misplaced outside IDE
What operating system are you using?
Re: Controls misplaced outside IDE
Windows 7 Professional x64
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?
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.
Re: Controls misplaced outside IDE
Quote:
Originally Posted by
ryanguy426
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.
1 Attachment(s)
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.
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
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.
Re: Controls misplaced outside IDE
Quote:
Originally Posted by
ryanguy426
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.
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.
Re: Controls misplaced outside IDE
Quote:
Originally Posted by
Edgemeal
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
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 :wave: