What are the options with using Visual Studio.NET from the command line
Type devenv.exe /? to get a full list of options.
How can I implement a scrollable picture box
See Mike Gold’s article on C# Corner for a detailed discussion.
How do I add shortcuts that are not in the Shortcuts enum to my menu item?
To customize the shortcut (which are not present in the System.Windows.Forms.Shortcut Enum), you need to override the ProcessCmdKey event of the form and handle the needed keys. The below example has a menu item with name “item” and the shortcut Ctrl + Alt + 0 has been set by handling the ProcessCmdKey event. The Click event of the menu item is simulated. //Override this method in the form which have the menu. This will only trigger when the form is on focus. protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == (Keys.Control | Keys.Alt | Keys.D0)) // Ctrl + Alt + 0 { if (this.Menu != null && this.Menu.MenuItems.Count > 0) this.Menu.MenuItems[‘item’].PerformClick(); // triggers click event. } return base.ProcessCmdKey(ref msg, keyData); } Instead of MenuItem, you can utilize ToolStripMenuItem which has plenty of features and all kind of shortcuts are available.
I don’t like the resource Editor that comes with Visual Studio.NET. Are there any alternatives out there?
There is one by Lutz Roeder. You can find it here along with other useful tools. Resourcer for .NET
How do I autosize a button to fit its text
Get a Graphics object for the button and use its MeasureString method to compute the width you need. Graphics g = button1.CreateGraphics(); float w = g.MeasureString(button1.Text, button1.Font).Width; g.Dispose(); button1.Width = (int)w + 12; // 12 is for the margins