I am migrating an Excel VBA Add-In to a VSTO Add-In written in C#. The user interface will include a custom ribbon tab with custom button images and five or so user forms. With the VBA version, I ignored DPI awareness without any issues.
After a lot of research, I've concluded that making the VSTO Add-In's DPI awareness fully automated across multiple display systems is a complicated task that may not yield 100% reliable results. Instead, I've written code (that the user can override) to retrieve Screen Class properties that allow my Add-In to detect the screen resolutions of all connected displays, determine the display where Excel starts, and make an educated guess regarding the optimum button image and user form sizes for that display.
I realize my approach may not be the most advanced, but it's uncomplicated and it works. Have I missed a 100% consistent way to detect the true display scaling of multiple monitors, or does my approach sound like it's a good compromise between reliability, simplicity, and user experience?
Many thanks for any opinions or experiences that can be shared!
VSTO doesn't provide anything for that. Your custom ribbon UI will be scaled automatically with your Office application. But for windows forms you need to set them up properly to scale up/down correctly. So, your question goes to the Windows Forms area only. Read more about Windows Forms High DPI support in the following sources:
High DPI support in Windows Forms
Creating a DPI-Aware Application
Related
I am new in VB application and can't figure out what's wrong with my app. There is a form which has a couple of labels and text fields. When I run the app on my and few other folks's machines it displays fine with proper alignment and font. However, for some people application form UI is broken unaligned text and buttons. Any one have any idea what's wrong with my application?
Okay, After some research, we found that the display settings for those users were set to 125% and because of that there were UI issues. I changed the display settings back to 100% and Booom it works just fine. Thank you all for you help.
This problem can occur for a number of reasons.
In my experience, however, it is commonly caused by setting the Font on controls, only to discover that certain users do not have that font installed on their machines. As a result, Windows forms selects a font for you that it believes is a close approximation--usually with horrifying results. Widths don't match, and controls end up horribly aligned.
Make sure you are not using a font that is not built into the OS. If you are designing the application in Windows 7, for example, and shipping to multiple platforms (Windows 2000, Windows XP (the horror!), and Windows 8), you may find that font availability is drastically different on these various platforms.
Though not aesthetically pleasing, stick with the lowest common denominator in these cases. If you can, use Segoe UI, which should be present on all these platforms (except XP) and which Microsoft now recommends.
I am Learning how to create dynamic Access Databases using VBA code and SQL. One of my big "pet peaves" is that the user interface is slick and very professional looking.
I am looking for some tecniques in cosmetic touch ups to make the user interface more professional looking. For example, i would like it so that when the user clicks on a button to activate a sub form which is hidden, that the form appears with a bit of "smoothed animation" such as and exploding transition-type effect instead of the standard hard visual appearance of the form which is the standard.
Any advice on what may be available will be very appreciated.
Thank you,
Andrew
This can not be done within Access, it's not designed for that. Access is a database application that comes packaged with Office. It's not going to provide any crazy out-of-the-box animation, it's just not meant for that. It's meant to be a very simple, stripped down database application.
It is somewhat feasable that you could create animations in a 3rd party app (such as Adobe AfterEffects) and have those animations run prior to the form opening, similar to how one would create motion menus for DVDs.
You could put a bunch of small animated graphics (like lights on a Christmas tree or tiny arrows) all around the sub-form and time it to display for a short while.
I recently upgraded my system to Windows 7 Professional. Furthermore, I recently upgraded from VB6 to VB.NET and I've been working with forms and control under the new interface. Controls such as text boxes and tab controls are washed out and very difficult to see.
In my attempt to remedy the situation, I personalized my display by unchecking the box under "Windows Color" entitled "Enable transparency" and adjusting the Color Intensity slider all the way to the right. But no matter what I try to do, I still get washed-out form colors.
Is there a setting for adjusting the default form colors? What am I missing?
It seems to me that you have a couple of choices, all of which you probably won't like.
Change your Textbox BorderStyle from Fixed3D to FixedSingle, this will give you a more pronounced border around the textboxes (no such property on comboboxes though). This will also make your textboxes look a lot more 'flat', which you may not want.
Change either the background of your form or the background of your controls, thereby providing a better contrast between the two. Even slight variations on the same color would help.
Purchase (or make your own) custom controls that have built-in style changing abilities. I use the Telerik controls sometimes. They have the ability to let you change the UI Element's styles, including all kinds of colors and different borders and such. The issue with this option is a lot of these custom controls are overly expensive, although you can find decent ones for fairly cheap sometimes (I found a control set once that was pretty nice for $19).
Whatever you decide to do, you have to remember that your form will look different to users that are using different operating systems than what you're developing on. You noticed a big change when you went from (I'm assuming) Windows XP to Windows 7 right? You have to remember to test your application on all operating systems that your application will be expected to run on. You could design it beautifully on Windows 7 and it may look horrible on XP. You may be able to ignore OSs that are older than XP, but for the time being almost 50% of users still use XP (last I checked).
BTW, there is no setting for adjusting the default form colors... this just happens to be how forms look on Windows 7. I found it an adjustment when I went from XP to Win7, but you get used to it. I very rarely make the background of my controls the same color as the background of my form just because of this... oh, and don't go changing your display, you want to see what your users are going to see - otherwise you'll end up with something that only looks good on your computer. :)
I've spent a while searching around and I can't find a solution to this:
I have a transparent, borderless form that displays a clock. I can load this just fine, but I want the clock to be part of the desktop, so it cannot take focus, is behind other applications, and is not hidden with Win+D (similar to applications like RainMeter).
I need the solution to work with VB.Net (I'm using 2010)
Thanks in anticipation
Take a look at the following codeproject article:
Application Desktop Toolbars
It seems to do what you require.
This article is about Application Desktop Toolbars, which are
applications that can align to the screen much like the taskbar. The
article will develop a base class for developing such apps.
We're facing a strange problem here. One of our users cannot see two buttons on a form, that everybody else can see. I'm not sure if the buttons are not there or the window is smaller than it should be. The size of this window is fixed, so it cannot be adjusted manually. (it is like a pop-up window informt of the main window)
Our application is used by employees of our company all over the world. So they all have windows xp in different languages and their regional settings differ. But I can't see how that would make a difference.
Does anyone have an idea?
A reason for this might be that the user changed the DPI setting on its machine. Typically you would change that in the control panel, in the Display settings you can choose to have a font size of 100%, 125% and 150%. This affects the DPI and might push winforms controls further down the form, making them "invisible" (below the bottom boundary of the form).
Here are instructions on how to change DPI settings on Windows XP.
If this is the cause for your problem, you have to make sure your forms scale properly. Look at the MSDN documentation for automatic scaling.