Updgrading TFS Explorer Custom Control from 2010 to 2012 - rendering differences? - tfs

We use TFS 2010 with developers having both VS 2010 and VS 2012. We had created a custom control (both TFS Explorer and Web Access). Since several developers are moving up to using VS 2012 I was updating the TFS Explorer custom control to 2012 as well, but have run into an odd issue dealing with how the two Team Explorers rendering the control.
The control is a windows form control which contains a dropdown list and a button (it does not extend the TFS specific dropdown). There is also a label that appears in some cases, but for the most part when it renders in VS 2010 it looks like this:
See images at: http://social.msdn.microsoft.com/Forums/en-SG/tfsworkitemtracking/thread/e3e254e1-7f56-495c-a3c1-e92bfe030102
The missing white boxes are alterations to the image to redact internal information only.
Note that you can see the full dropdown and the refresh button. This control is compiled with autosize (grow and shrink) with the dropdown and refresh button docked so that when you resize the form it correctly resizes just fine.
For the migration to 2012 I created a new project, moved the control over and updated the references for the Work Item control and Work Item client to the 2012 counterparts. Everything compiled correctly, and the controls work as expected; however, they render poorly.
See images at: http://social.msdn.microsoft.com/Forums/en-SG/tfsworkitemtracking/thread/e3e254e1-7f56-495c-a3c1-e92bfe030102
Note that the control is simply too wide. It cuts off the refresh button completely and a bit of the dropdown is also cut off.
When I resize the window in VS 2012 it also scales "correctly" but it is cut off always in the same place.
The control itself is set up the same way between the two versions, literally all I did was reference the newer TFS related assemblies and recompiled, then deployed to my local 2012 folder to get it to pick it up. Both 2012 and 2010 are pointed to the same TFS 2010 process template. It just appears that the two render the controls different, or are basing the autosize on different values. Is this a bug or some setting I'm not dealing with?
One option for me is to just set the control to a specific size, but I'd rather not do that. Can someone give me a hint as to why these are rendering differently?
UPDATE: In playing around with this is appears that the control is simply sized too large. In VS 2012 it has about 20-30 pixels more space given to it than it does in VS 2010, so when it autosizes it is too big, but then something in the rendering is cutting it off. When I moved the inner controls to provide an empty space on the right of my control then they come into view; however, I've also noticed that as I enlarge the window and then attempt to shrink it back down the control simply doesn't get smaller anymore even though the autosize is set to shrink and grow.
UPDATE: I've posted this to the Connect site since it might be a bug in Studio. http://connect.microsoft.com/VisualStudio/feedback/details/781607/updgrading-tfs-explorer-custom-control-from-2010-to-2012-rendering-differences

Related

How to restore/clear form position after multi-monitor setup change

Within the IDE, when F12 toggles between code and form,
the forms are displayed outside the monitor borders,
and therefore not visible.
This happens after a multi monitor setup has changed,
and the forms no longer open within the available new monitor screen areas.
One way to resolve this is to use the property inspector and
set the Top/Left properties to 4 to make the forms visible.
This is however a lot of work,
especially if many forms and possibly many projects are involved.
Is there a better way to reset the form locations once and for all,
so they are all visible with the new monitor setup?
There is nothing (AFAIK) in Delphi 6 IDE that would help. But assuming you are using Windows, the help is near, (tested on Windows 7):
Right-click on taskbar and select 'Cascade windows', this affects all windows in one go.
or
Alt-Tab to the window, press Alt-Space and then M (for move). Move the window with the arrow keys. This you would have to do seperately for each window.
Close your Delphi IDE. Then, if your current project group file is xyz.groupproj, open the file xyz.dsk with an text editor. Look for section [UndockedDesigner] entry "Count" and change its value to zero.
[UndockedDesigner]
Count=0
That will force all design window positions to 0,0 on your main monitor.

Source Control - Pending Changes - Included/Excluded Changes - Can it be made taller?

I'm prepared to duck when the tomatoes are throw because this seems so simple. Nevertheless... In Visual Studio 2013 when looking at pending changes is there way to vertically expand the included changes and excluded changes segments ?
For example this morning I have a large changes set (around 1200 of the files pictured below are auto generated T4s, but it it's still tough to look over that much data in 300 pixels.
I encountered the same behavior in VS2015.
You can avoid the tiny box by collapsing parts of the tree, it only appears when the currently shown list is "too long".
I had to select the View Options > Show Solution Changes then the entire list was visible without scrolling.
UPDATE
On VS 2015/Update 2, the behavior is that the two scrollable sections appear when the expanded height exceeds a certain limit. I.e., to make those sections disappear/merge into one, it seems to be enough to just collapse some of the tree nodes, so that the height falls below that magical limit.
[Original post follows]
Had the exact same issue (I'm running VS 2013 Pro, Update 4)
Found no UI options that would fix it. So I decided to just "learn to live with it", and started making actual changes (i.e. include/exclude items, Undo, Compare, etc.) -- and suddenly noticed that it reverted back to that "tall view" on its own! And, it's still in the "Tree View" mode:
I'm guessing it was the move of some of the items into 'Excluded Changes' section (which became empty for some reason -- it wasn't before). I didn't catch what actually did the trick, but that seems like the most likely cause.
You can change to List View which will give you all the vertical space you could want, but obviously you lose the folder heirarchy, so it's not ideal :(
Alternatively, you can use the TFS Power Tools to enable Windows Explorer integration which uses the old style dialog which is completely resizable.
EDIT: Added image of list view.
I just tested this under Visual Studio Update 4 and 5 and it seems that the current behavior is that if there are more than 99 items in either the "Included Changes" or in the "Excluded Changes" list, both lists are limited to 300 pixels.
This makes sense to me, as it would become too hard to switch between "Included Changes" and "Excluded Changes" otherwise, having to scroll back and forth (though making creative use of collapse would make it easier).
It would have been nice that when one docks the Pending Changes panel as a document, the included and excluded changes would show as 2 columns with infinite scrolling, but alas, this is not the case.
In some cases, switching to list view removes some of the "tree" nodes if you have folders in your set of changes. This may cause the panel to collapse with fewer changes.

TComboBoxEx with VCL-Styles: Borders flicker

I`m using Delphi XE3. When using the custom styles (e.g. Carbon) that are available since Delphi XE2, there is a visible white flickering when moving the mouse over the borders of the TComboBoxEx control (MouseExit/Enter).
Steps to reproduce: Create a new VCL Forms app, drop a TComboBoxEx on the form, select e.g. Carbon in project options --> Application\Appearance and start the application
Is this a known problem/bug and is any solution known?
Thank you
This Border flicker issue is not the product of using Delphi VCL Styles.
(The same problem can be observed without using VCL styles)
The culprit here is the Desktop Window Manager which is an essential part of Windows Visual Styles and Themes.
The reason why you are seeing this issue and others may not, is because you have at some point changed the default Windows Theme (aero theme) or you've changed a specific Visual effect property of your selected theme.
You perhaps also have intentionally or unintentionally disabled the Desktop Window Manager since it runs as a Windows service.
To be more exact, the issue is resolved if you enable the Desktop composition feature.
This feature is only available in Aero themes(default) but not in Basic or Classic, tho sometimes it can appear to be available even when it is not.
Control Panel --> System --> Advanced System Settings --> Advanced --> Performance Settings --> Visual Effects
When desktop composition is enabled, individual windows no longer draw
directly to the screen or primary display device as they did in
previous versions of Windows. Instead, their drawing is redirected to
off-screen surfaces in video memory, which are then rendered into a
desktop image and presented on the display.
As you might have guessed, the functionality of this function is to basically act as a Buffer which in a very neat way explains the border flickering when this option is turned off.
Important Fact
Desktop composition feature can only be enabled if your current theme is an Aero theme and using Windows Visual Styles.(It is by default enabled for every Aero Theme)
Visual Styles are enabled by default in Aero Themes, you can check that it is enabled by making sure that the Use Visual Styles on Windows feature is enabled in the Performance Settings. When the Classic or Basic Themes are in effect the desktop composition feature is never in play and cannot be enabled. (Classic theme has been deprecated since Windows 8)
Sometimes in Windows 7, the Desktop composition feature can show itself in the Performance Options even when using a Basic or Classic Theme but do not be fooled, this is an internal bug.
Steps to reproduce this bug :
Start With default Windows Aero Theme
Go into Performance Settings as described above
Uncheck the Desktop composition from the list
Mouse over the border of TComboBoxEx, it should now be flickering as
you enter/leave.
But what happens if I uncheck Use Visual Styles on Windows checkbox? Why does this solve the flickering issue?
This will cause the Desktop Window Manager(DWM) to disable themes all together for all Windows Controls. What this means is that controls will be drawn using an older rendering style as oppose to using the newer Aero rendering style.
You can turn off Visual Styles for individual controls without turning it off globally with the following method SetWindowTheme(Handle, nil, nil)
This is also why the flickering issue for TComboBoxEx border is resolved when Visual Styles are disabled.
It's also worth mentioning that since Windows 8 you cannot disable Visual Styles anymore because as I said the Classic theme is deprecated.
Regarding the solution, I don't think you've got much of a choice really. Given how much freedom is left to the user when it comes to modifying the visual effects of Windows themes, this sort of thing is bound to happen. At least you can be certain that this issue does not happen on the default Windows Theme.

Alignment in MonoDevelop

I switched from using Visual Studio Ultimate 2010 and I am trying to work with MonoDevelop and GTK#. I am trying to use new IDE but it seems much different than Visual Studio.
I want to develop fullscreen application that's why I must set Horizontal and Vertical alignment. In Visual Studio I can set the HorizontalAlignment property to Stretch and VerticalAlignment to Top, but MonoDevelop and Gtk# haven't this property. How can I set the same alignment in MonoDevelop?
The GTK+ layout system very different to Winforms - it's based on packing widgets into containers. By default, most widgets expand to take all the space allocated to them by their parent container. For example, if you put a button directly into a window, it will fill the entire window. If you put it into a HBox/VBox, you can use the expand and fill properties to control how the box shares the available space among its child widgets, and how the widgets fill the available space.
A more exact answer would need some information about the widgets you're actually using.

TButtons and "runtime themes": peculiar behavior

Have you seen this?
I have a little utility application (for easy load / test xml generation from CDS and/or DBGo), and I had put some buttons (the poorest button of all, TButton) to trigger some actions.
I never paid attention to appearance, because I'm the only one that uses it. So today I added a new button, and they appeared different from the others in designer - but not when running. It's just an copy and paste process (change the button name, caption and event - the rest is equal to the origin).
When I looked the other buttons have an grey gradient and round corners, the button I copied and pasted not (just a bare rectangle). When running all buttons where just bare rectangles.
So I discovered that on designer, W7 and delphi are applying themes. On running, they are obeying the Project/Options/Application/Enable runtime themes flag.
This is annoying. There's a way to make Delphi doing that obeying the project options flag on forms designer?
(Or even manually if is not possible to automate that)?
EDIT:
The toolbars on the form are from CNWizards ;-)
EDIT II:
Apart of disabling themes for the IDE executable, all buttons get themed equally if the form (or project) is reloaded. But it's really weird.
If you want to enable/disable themes in the IDE, then open the properties of bds.exe, select the 'Compatibility' tab, and make sure that the 'Disable visual themes' checkbox is unchecked/checked.
Programs that you run from the IDE will inherit the compatibility settings of the IDE.
Delphi IDE itself is an application and the way the designer draw the form is using the setting for the IDE application (delphi32.exe or bds.exe's compatibility settings) so the answer is no. The default behaviour is different between IDE versions, for eg. the opposite behaviour (not drawing themed) happened in past.

Resources