WinForms designer breaks on VS2005 when using Windows 7 - winforms

We have an old project that is designed using VS2005 and WinForms. Everything works perfectly on Windows XP, but when I open the designer on Windows 7, everything breaks down.
The controls get sized to random size and some of them dissappear (or are moved to random coordinates).
What can we do to solve this issue? Should we switch to VS2008?

A newer version of VS should help, but i'd be surprised if this can't be fixed in 2005.
Try commenting everything out in the method where initializeComponent runs, or any properties that set UI change. You should find it easy enough, it's a method that has long lists of calls against the controls on the form.

The problem was that we used TableLayoutPanel inside a GroupBox and not on the form. When we added the TableLayoutPanel on the form and moved the GroupBox into it, the designer stays ok.

Related

How do I make my Windows Forms buttons visible again on Windows 11?

After upgrading to Windows 11 some buttons in my Windows Forms application has become invisible. When I hover over them, they regain visibility though.
The buttons should be visible all the time - and was so on Windows 10. I tried changing their color, etc. but to no avail.
The buttons belong to the namespace: DevExpress.XtraEditors.Repository and the RepositoryItemButtonEdit Class.
Perhaps my version of DevExpress is simply to old. I'm running 16.2.4.
Has anyone tried this or something similar before?
I think the DevExpress version simply was to old: Changing these properties seems to solve the issues:

Rendering issue with the Listbox control under Windows 7

We have a couple of winforms applications that host a bunch of icons in a ListView control as a handy quick launch down the side of the applications. We also have "XP visual styles" enabled in the project build options for both which works great for Windows XP, but we've had someone highlight that the items in the control are (roughly) twice as wide in one application as the other (normal) when both are run under Windows 7.
As far as I can see in code, both ListViews are added to their respective forms using the windows forms designer, and there doesn't appear to be anything fiddling with the width of the labels (etc.)
I'm a little confused why the two applications/ListViews are behaving differently, and also why there doesn't seem to be anything I can do to affect the width of the items in the ListView? What have I missed when checking for differences between the "working" scenario and the "non-working" scenario?
It appears that setting the StateImageList property causes this (even if it is the same image list as used for the normal icons)

Winforms Richtextbox not properly rendered in WPF project

I have a very strange issue in my WPF project. The main window contains several wpf controls and winforms RichTextbox(don't ask me why) within WindowsFormsHost element.
Richtextbox contains text. In some cases Richtextbox is not properly rendered when loading window (the right part is white like somebody uses erase tool and clears a rectangle).
This situation is not so common (~20 users / 30 000) and it probably depends on hw. It occurs on XP machines. I have tried to force sw rendering, but it didn't help.
Application is built in .net 3.5 SP1.
Any idea?
The problem was caused by user's unusuall dpi settings in Window. Strange, but with normal values, it works

TabIndex problem. Only getting a system beep

Background: I've got a WinForm application with a ComboBox and a TabControl with two pages. On page one of the TabControl, I've got a FlowLayoutPanel containing about 10 Panels. Each of those Panels contain a Label and a TextBox. I'm using Visual Studio 2008 as my IDE.
Problem: I'm not able to tab between any of my controls. I go to View-Tab Order, and everything looks fine (although I know it's not). All I get is a system beep when I try to tab between controls.
Anyone else have a similar problem that they overcame? I'm sure I'm missing something really simple, but I don't know what it is. Is there a method to have Visual Studio rebuild the tab indexing?
Figured it out. Instead of using Form.Show(), I used Form.ShowDialog(). Tabbing work correctly after that. Not sure why though.

How can I make resizing WPF windows less "laggy"?

I am relatively new in the WPF world and one thing I immediately noticed is how laggy the window content is drawn when you resize a window. For example if you have scrollbars at the window edges those scrollbars will be partly hidden while shrinking and have space between them and the window border when enlarging.
This even happens with an empty WPF project created in Visual Studio. What's even worse is that it also happens with the background and you can see stuff behind the window (other windows, desktop wallpaper, etc.) leak through when enlarging.
At first I thought that it's an ugly limitation of WPF seeing that native or WinForms applications resize just fine (if written properly). But when I look at Expression Blend the window background stays opaque (though the window content still lags behind). What do they do to prevent described problem and are there any ways to improve resizing to more approximate native/WinForm GUIs?
The reason of lags is nicely explained here
Are you running Vista without SP1 ? From what I have read, this was a common issue that is supposed have been fixed..
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/3960d6a6-e873-455c-9ddc-1e2dd32e090b/
I'm not seeing this behavior, myself. I develop on vista x64 sp1 and/or a virtual pc running xp x32 sp3. Wpf uses directx, could it be your video card/machine? Try running your app on a diff machine and see if you have the same results.
I have the same issue with the interface lagging while resizing. I suspect that the reason for the lag is it is resizing the underlying frame buffers in direct X which is never particularly fast. I am not sure what you can do about it though.
I've been looking for information on this issue as well. I just thought it was a windows "feature" that some intrepid microsoft programmer thought would be cool. I was hoping to be able to turn it off so that window resizes would actually follow my mouse, instead of lagging and then overshooting. Grr.

Resources