In my datagrid, if I press tab to enter a column using a derived columnstyle, the column does not receive focus. Why
This behavior can be seen when you embedded a control like a textbox or combobox in your derived GridColumnStyle. If you press the tabkey slowly, you may see the cell get focus on the downkey and the cell lose focus on the upkey. One way to avoid this problem is to subclass the embedded control, and override its WndProc method, ignoring the KeyUp. [C#] public class MyCombo : ComboBox { private const int WM_KEYUP = 0x101; protected override void WndProc(ref System.Windows.Forms.Message m) { if(m.Msg == WM_KEYUP) { return; //ignore the keyup } base.WndProc(ref m); } } [VB.NET] Public Class MyTextBox Inherits TextBox Private WM_KEYUP As Integer = &H101 Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) If m.Msg = WM_KEYUP Then Return ’ignore the keyup End If MyBase.WndProc(m) End Sub ’WndProc End Class ’MyTextBox
If I create an assembly, how can I see the assembly/components from with the VS.Net ‘Add…’ dialogs?
There are two ways in which this can be done. The first way is to use the provided Public assembly folder that is installed with VS.Net. This folder is: ‘C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE\PublicAssemblies’ All assemblies in this folder will be picked up by the ‘Add Reference’ dialog under the ‘.NET’ tab, and the ‘Customize Toolbox’ under the ‘.NET Framework Components’ tab. Now, you are not limited to using this folder. You can specify your own public assembly folder by adding a key to the registry. If you look at the following key: ‘HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0\AssemblyFolders’, you will see a subkey named ‘PublicAssemblies’. This is where the path above is specified as a public assembly folder. To add your own folder, create a key (e.g. MyAssemblies), and set the default value to be the desired path.
How can I prevent the plus-minus icon that appears next to the row header when I have a datagrid displayed bound to a datasource that has a relation defined
Set the DataGrid.AllowNavigation property to false.
How can I adjust the version number for multiple projects without changing every AssemblyInfo.cs file constantly?
The version information needs to be set with the ‘AssemblyVersion’ attribute for each project. However, this attribute does not need to be specified in the project’s AssemblyInfo file. You can create a separate file with the ‘AssemblyVersion’ attribute that is shared across projects that you wish to keep in sync. This file can either be shared via VSS, or by including the file as a link in the projects.
Why are the Tooltips not being shown on a NumericUpDown control?
This is because of a bug in the .net framework. When tooltips are set on a control that hosts other controls within it (like the numeric updown), tooltips are not shown on those child controls. To workaround this issue, do the following in code: [C#] foreach(Control c in this.numericUpDown1.Controls) { this.tooltip.SetToolTip(c, ‘mytooltip’); } [VB.Net] Dim c As Control For Each c In Me.numericUpDown1.Controls Me.tooltip.SetToolTip(c, ‘mytooltip’) Next