Click here to Skip to main content
16,005,120 members
Home / Discussions / C#
   

C#

 
GeneralRe: Make a control a child of the Desktop? Pin
Neil Van Note11-May-02 7:02
Neil Van Note11-May-02 7:02 
GeneralRe: Make a control a child of the Desktop? Pin
Corto Maltese11-May-02 9:43
Corto Maltese11-May-02 9:43 
GeneralRe: Make a control a child of the Desktop? Pin
Nish Nishant11-May-02 14:26
sitebuilderNish Nishant11-May-02 14:26 
GeneralRe: Make a control a child of the Desktop? Pin
Corto Maltese11-May-02 16:54
Corto Maltese11-May-02 16:54 
GeneralRe: Make a control a child of the Desktop? Pin
Rocky Moore11-May-02 9:46
Rocky Moore11-May-02 9:46 
GeneralRe: Make a control a child of the Desktop? Pin
Rama Krishna Vavilala11-May-02 9:49
Rama Krishna Vavilala11-May-02 9:49 
GeneralRe: Make a control a child of the Desktop? Pin
Rocky Moore11-May-02 10:00
Rocky Moore11-May-02 10:00 
GeneralRe: Make a control a child of the Desktop? Pin
Rama Krishna Vavilala11-May-02 9:56
Rama Krishna Vavilala11-May-02 9:56 
Here is the code as it is:-

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace WindowsApplication2
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;
		
		[System.Runtime.InteropServices.DllImport("User32.dll")]
		extern static IntPtr GetDesktopWindow();

		public Form1()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			IntPtr hwnd = GetDesktopWindow();

			System.Diagnostics.Debug.Assert(hwnd != IntPtr.Zero);
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this.Size = new System.Drawing.Size(300,300);
			this.Text = "Form1";
		}
		#endregion

		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new Form1());
		}
	}
}

GeneralRe: Make a control a child of the Desktop? Pin
Rocky Moore11-May-02 10:14
Rocky Moore11-May-02 10:14 
GeneralRe: Make a control a child of the Desktop? Pin
Neil Van Note11-May-02 11:02
Neil Van Note11-May-02 11:02 
GeneralRe: Make a control a child of the Desktop? Pin
Rama Krishna Vavilala11-May-02 11:14
Rama Krishna Vavilala11-May-02 11:14 
GeneralRe: Make a control a child of the Desktop? Pin
Nish Nishant11-May-02 14:29
sitebuilderNish Nishant11-May-02 14:29 
GeneralRe: Make a control a child of the Desktop? Pin
Rocky Moore11-May-02 14:31
Rocky Moore11-May-02 14:31 
GeneralRe: Make a control a child of the Desktop? Pin
Neil Van Note11-May-02 17:53
Neil Van Note11-May-02 17:53 
GeneralRe: Make a control a child of the Desktop? Pin
Nish Nishant11-May-02 18:14
sitebuilderNish Nishant11-May-02 18:14 
GeneralBest books available for C# Pin
9-May-02 21:43
suss9-May-02 21:43 
GeneralRe: Best books available for C# Pin
Tom Archer9-May-02 21:59
Tom Archer9-May-02 21:59 
GeneralRe: Best books available for C# Pin
James T. Johnson10-May-02 1:53
James T. Johnson10-May-02 1:53 
GeneralRe: Best books available for C# Pin
10-May-02 2:23
suss10-May-02 2:23 
GeneralRe: Best books available for C# Pin
James T. Johnson10-May-02 2:51
James T. Johnson10-May-02 2:51 
GeneralRe: Best books available for C# Pin
Tom Archer10-May-02 7:03
Tom Archer10-May-02 7:03 
GeneralRe: Best books available for C# Pin
Joao Vaz10-May-02 2:57
Joao Vaz10-May-02 2:57 
GeneralRe: Best books available for C# Pin
James T. Johnson10-May-02 3:18
James T. Johnson10-May-02 3:18 
GeneralRe: Best books available for C# Pin
Joao Vaz10-May-02 3:35
Joao Vaz10-May-02 3:35 
GeneralRe: Best books available for C# Pin
James T. Johnson10-May-02 15:12
James T. Johnson10-May-02 15:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.