How can I make my form cover the whole screen including the TaskBar?
The following code snippet demonstrates how you can make your form cover the whole screen including the Windows Taskbar. [C#] // Prevent form from being resized. this.FormBorderStyle = FormBorderStyle.FixedSingle; // Get the screen bounds Rectangle formrect = Screen.GetBounds(this); // Set the form’s location and size this.Location = formrect.Location; this.Size = formrect.Size; [VB.NET] ’ Prevent form from being resized. Me.FormBorderStyle = FormBorderStyle.FixedSingle ’ Get the screen bounds Dim formrect As Rectangle = Screen.GetBounds(Me) ’ Set the form’s location and size Me.Location = formrect.Location Me.Size = formrect.Size
How can I word-wrap the Tooltip that is displayed?
Rhett Gong posted a work around using Reflection to achieve this in the microsoft.public.dotnet.framework.windowsforms.controls Newsgroup: [DllImport(‘user32.dll’)] private extern static int SendMessage(IntPtr hwnd,uint msg, int wParam, int lParam); ….. object o = typeof(ToolTip).InvokeMember(‘Handle’,BindingFlags.NonPublic|BindingFlags.Instance|BindingFlags.GetProperty,null,myToolTip,null); IntPtr hwnd = (IntPtr) o; SendMessage(hwnd,0x0418, 0, 300); …..
In VS.NET, how can I specify the start up project for my application?
In the Solution Explorer right click on the project that should be the start up project for your application and choose the Set As Start Up Project option.
In VS.NET, how can I change the build order of projects in my solution?
You can set the build order of the projects by right clicking on the Solution and choosing Project Build Order and adjusting the dependencies on the Dependencies tab in the Project Dependencies window that pops up.
I have an MDI application with several child forms. The child form’s Activated event is not being fired consistently as different child forms are activated. What’s wrong?
In .Net 1.0, the child forms do not get the Form.Activated event (only the parent MDI). To catch MDI children being activated, listen to the Enter/Leave events of that child Form or listen to the Form.MdiChildActivate event in the parent Form. In 1.1 the child Forms do get the Activated event.