Browse by Tags
All Tags » General » Using Controls (RSS)
Sorry, but there are no more tags available to filter with.
-
|
1) Cannot override methods like WndProc, ProcessCmdKey, etc in a derived Control. The class ref for a particular property will let you know about the permission requirements. 2) Cannot call Control.Parent. 3) Cannot call Control.Focus() method. Contributed...
|
-
|
The issues listed here are pertaining to code running in IE in the default Internet Zone. 1) You cannot view Controls inside IE using the 1.0 framework (when running with the permissions in the default Internet Zone). This is however possible with the...
|
-
|
You cannot use a WinForms Control directly in IE, you will have to instead derive from it and then use the derived instance from a custom assembly. These articles introduce the topic: Host Secure, Lightweight Client-Side Controls in Microsoft Internet...
|
-
|
You can do this using the bitwise operators. In C# the bitwise operators are & , | and ^ ; in VB they are And (or &), Or and Xor (or ^). Here is code that will toggle whether label1 is anchored on the left. [C#] using System.Windows.Forms; private...
|
-
|
private void Form1_Load( object sender, EventArgs e ) { Bitmap newBmp = new Bitmap(100, 100); Graphics g = Graphics.FromImage(newBmp); g.FillRectangle(new SolidBrush(Color.Red), 0, 0, 33, 100); g.FillRectangle(new SolidBrush(Color.White), 34, 0, 33, 100...
|
-
|
Where do I find an ImageMap-style control? There isn't an ImageMap-style control in the .NET Framework Class Library. However, the article C# Windows Forms ImageMap Control by Ryan LaNeve, September 2002, on The Code Project provides a control with...
|
-
|
button1.Cursor = new Cursor( @"C:\winnt\cursors\hnodrop.cur" ); Contributed from George Shepherd's Windows Forms FAQ
|
-
|
The controls that I've try to add to my form at runtime don't show up. What's wrong? Make sure you implemented and executed code similar to the InitializeComponent method that VS adds to your Windows Forms project for controls added during...
|
-
|
You use System.Reflection to dynamically load a control. This sample loads the SpecControls.ColorControl from SpecControls.dll. [C#] using System.Reflection; Assembly assembly = Assembly.LoadFrom( "SpecControls.dll" ); Type t = assembly.GetType...
|
-
|
There are three steps to adding a control at runtime. Create the control. Set control properties. Add the control to the Form's Controls collection. In general, if you need help on exactly what code you need to add, just look at the code generated...
|
-
|
In VB6, I used control arrays to have a common handler handle events from several controls. How can I do this in Windows Forms? You can specify events from different controls be handled by a single method. When you define your handler, you can list several...
|
-
|
See the Control.Handle property which returns the HWND. Be careful if you pass this handle to some Win32 API as Windows Forms controls do their own handle management so they may recreate the handle which would leave this HWND dangling. Shawn Burke, Microsoft
|
-
|
I am using a Windows Forms control in an Internet Explorer (IE) page. When IE downloads the control, it is distinguishing between upper- and lower-case letters in the web site URL. When I use the same site with different casing - such as http://111.1...
|