how to set form border thickness - vb.net

I am writing an app using VB.net in VB2013. The Sizeable border is too thick in when displayed on PC's with later versions of Windows7, Windows 8(.1).
Does anyone know how to change the thickness of the window?

You don't get to control that. That's part of the user theme, and users can set any theme they want. You'll find it's also a problem on older versions of Windows if users have a theme with a wider border. You'll need to adjust your program's layout to allow for a little less space.

The border is drawn by the operating system, but you can create your own custom form, there is a library on CodePlex may help you to do what you need easily.
Drawing Custom Borders in Windows Forms

Related

Visual Studio 2010 # High DPI

I know this has been asked before but I will ask it again.
I'm having issues on my Visual Studio 2010 in a High DPI 1920x1080 display, I already tried the Registry Fixed but seems not to work. I know I'm using a very later version of VS but this is the only way to battle compatibility on lower version of Windows.
What method should I use? Should I switch to VS2015, or is there any other way around to fix this.
Design Time
Run Time
This isn't a DPI issue. Your buttons' Anchor property is set to Bottom, Right. This will cause them to follow the bottom of the form when it is resized. If the grid control below them is anchored to the top it will remain in the same position, but the buttons are moved over/away from it in order to always remain a certain distance from the bottom.
Set the Anchor for your buttons to Top, Right instead.

Windows Forms/Controls Resized on Wide Screen Monitor

Here at work I have been relegated to working on an old 4:3 monitor. The application I am working on in VB.NET (VS 2008) has several forms and controls that are sized to a specific height and width. They look fine on my monitor, but when I recently released a Beta for Users to try, the users that had widescreen monitors had stretched dialog forms and stretched controls on those forms. Is there a form property to set, or a programming technique to use, in order for the form and all of it's controls to display EXACTLY to the width and height specified?
I ended up fixing the problem myself by setting the .AutoScaleMode of the form to "None", and setting all my fonts to use pixels instead of points.
Unfortunately, this was not an issue of code, but rather of design. Sure, it's easy enough to post code snippets, but if I need to post a whole windows form application that's another story altogether.

how to resize or reposition controls based on screen resolutions in VB.NET

I making a Windows application with VS2010. Where i'm using panels to fight with different screen resolutions.
For some of my controls I used anchor property set to top,bottom without docking them to parent panel. when i run this program on the machine which is used to develop, result was as expected,But when i tried this one on different resolution its results were worse than expected. Some controls are partially displayed.
I found a solution here to this by re-sizing my controls based on screen resolutions. But that didn't worked for me as controls were re-sized but they were out of display area.
I couldn't relocate them based on resolution.
how would i set their position based on resolution.
or
i should assume minimum screen resolution (lets say 800*600) and program with this resolution.
Plz help!
I thought the solution was to use TableLayoutPanel and panels to do this.
I was bit right, but this doesn't work in all the cases.
Found a solution here https://stackoverflow.com/questions/2802015/....
Cheers..!

AutoScaling WinForm Display (Small, Medium)

First and foremost, please forgive me but my screenshots are in French due to my Windows installation at work. It is still very easy to understand though. I'll include screenshots to make it more visually appealing.
Here's some background information:
Windows 7 64bit
Visual Studio 2010
Default display is 100%
AutoScaleMode: DPI
AutoSize: True
My application is a windows form that was developped in a default (small - 100%) display. Like so:
As you can see, the "Petite" or Small display is the default selection.
Small Display - 100% (default)
Here is how my application looks with this setting. This is the correct display
Medium Display - 125%
The red rectangles point out the unwanted empty space.
I have tried:
Anchoring / Docking my controls such as my split containers, table layout panels, list views on Form_Load and via the UI. This didn't work.
Adding a split container to the form, and all controls respectively separated into it
Adding Table layout panels, where all textboxes and buttons are located in their respective cells
I really thought it was having a scaling problem because of the anchoring and docking. Although that didn't seem to be the problem ... What seems to be having trouble is the Tab Control and Listviews ...
Some users (most) have their settings as the default (100%) but there are a few who have it at a Medium setting, causing this scaling issue. Is there a way to fix this?
I cant see your screenshots or links for some reason so I cannot visualize the problem. If scaling is the problem, try setting AutoScaleMode to None.
I recently had to do this because my winform app was image intensive and it would not render correctly on Medium Settings because I built it using the default Small Settnigs display. Changing scale mode to None worked for me.
I fixed my issue by putting the tab controls and list views in a tablelayoutpanel. Everything that wasn't scaled properly had to be put inside a TableLayoutPanel. I kept my AutoScaleMode to DPI and AutoSize to True
Be sure to dock everything in their parent containers.
Here's the document outline for the more visual (like me):
Just click on the form and go to property pane. Find the Anchor element and click the dropdown. You click on all the lines in the square structure to become grey. Then click enter. Problem resolved.

What's the best way to get around the lack of transparency in WixUI background images?

I'm using the Feature Tree UI, with a couple of custom dialogs. One of these has checkboxes on it. These checkboxes cannot be made to have transparent backgrounds, meaning I've had to colour in my background image the default background colour so that there aren't visible boxes around the checkboxes.
However, different versions of Windows have different default colouring! If I match the colour on Windows 7, it looks bad on XP, etc. Since the background images are Bitmaps, I can't make them transparent. What can I do to get around this problem?
From the WiX tutorial UI revisited chapter:
And a common complaint: no, the checkbox can't have a transparent
background. If you have a bitmap in the background, it will be ugly,
just like in our example above. The only workaround is to reduce the
width of the checkbox to the actual box itself and to place an
additional static text (these can be made transparent) adjacent to it.
This workaround has a side effect, although: in order to turn the checkbox on and off, you should click exactly in the box area, not the text. Comparing to the rest of Windows Installer UI limitations, it's slightly annoying :-)
Windows installer supports 32-bit bitmaps (ARGB), which means that the bitmap can be made transparent to show the default windows background color. This means, once your (not transparent) check-box is placed on top, you won't see the ugly box around the text, because it's the same color.
Note that windows photo viewer and the thumbnail preview in explorer DONT support transparencies, so you'll have to build and run your installer to see it working =D.
I used gimp to export to BMP with a transparency and it worked just fine with WIX.