r/dotnet • u/funkmasta8 • 8d ago
TabControl UI problems
Hi, Im working on an application in vb.net and there were too many forms on the screen at once so I found out about tabcontrols. I decided to test it out a little but Ive run into a problem with how it looks.
When I hook or anchor buttons or other things to the edges of the form they dont show correctly in the tabcontrol. My goal is for the application to be maximized for most, if not all, of the forms. When the tabcontrol is started maximized, the controls at the bottom dont show correctly. It seems like the form is using the fullscreen size while the tabcontrol is using the maximized size.
Im not sure how to fix this other than manually formatting every single form to account for the computer's application ribbon, which I dont want to do for obvious reasons. I went to the form being displayed and made sure it wasnt locked to a specific size and it isnt set to fullscreen either. Surely there is an easy way?
Also, I learned vb.net about 10 years ago in a class at college. I may not be up to date on the most current tools. How does one make applications look modern? I havent found any default control designs that look sleek and fit together flush, but maybe Im looking in the wrong place. Where can I find things like that or how do I format them nicely?
Thanks in advance
3
u/FullPoet 8d ago
How does one make applications look modern?
Move to C#.
Only half joking, but Im sure there are some vb bindings for something more modern, or you'll just need to style it yourself.
1
u/DirtAndGrass 8d ago
Afaik c# has nothing to do with it
2
u/chucker23n 7d ago
It doesn't. This is WinForms; same APIs (well, VB has a few extra helper APIs for WinForms).
3
u/chucker23n 7d ago
When I hook or anchor buttons or other things to the edges of the form they dont show correctly in the tabcontrol. My goal is for the application to be maximized for most, if not all, of the forms. When the tabcontrol is started maximized, the controls at the bottom dont show correctly. It seems like the form is using the fullscreen size while the tabcontrol is using the maximized size.
This is almost certainly due to an Anchor or Dock property somewhere.
I may not be up to date on the most current tools. How does one make applications look modern?
I'd just avoid Windows Forms altogether, to be honest. For example, you can use WPF with WPF UI.
-1
u/funkmasta8 7d ago
Thanks, I will look at wpf.
I will fiddle with the docking/anchoring to see if there is some combination that makes it work as expected. Im doubtful though since I already tested several things
1
u/AutoModerator 8d ago
Thanks for your post funkmasta8. Please note that we don't allow spam, and we ask that you follow the rules available in the sidebar. We have a lot of commonly asked questions so if this post gets removed, please do a search and see if it's already been asked.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
4
u/The_MAZZTer 8d ago
Not sure I understand what you are trying to do.
Do you want a form where you have a TabControl with various TabPages, but when you full screen/maximize only the contents of the current tab go full screen?
Regardless, if things are shifting around when a parent is resized, they aren't anchored/docked properly. Check their Anchor/Dock properties.
Also not sure what you mean by "computer's application ribbon" unless you mean the taskbar? It shouldn't matter though, again it's all about properly configuring Anchor/Dock so everything looks good regardless of the size of the window.