Click here to Skip to main content
16,011,542 members
Home / Discussions / C#
   

C#

 
Questionhow to capture user input value in UserControl Pin
changcn11-Aug-04 17:03
changcn11-Aug-04 17:03 
AnswerRe: how to capture user input value in UserControl Pin
Jay Shankar11-Aug-04 21:34
Jay Shankar11-Aug-04 21:34 
GeneralConvert vb to C# Pin
tzewei11-Aug-04 16:52
tzewei11-Aug-04 16:52 
GeneralRe: Convert vb to C# Pin
changcn11-Aug-04 17:05
changcn11-Aug-04 17:05 
GeneralRe: Convert vb to C# Pin
sreejith ss nair11-Aug-04 17:21
sreejith ss nair11-Aug-04 17:21 
GeneralRe: Convert vb to C# Pin
tzewei11-Aug-04 17:59
tzewei11-Aug-04 17:59 
GeneralLooking for ideas on how dynamically resize controls Pin
Flack11-Aug-04 16:44
Flack11-Aug-04 16:44 
GeneralRe: Looking for ideas on how dynamically resize controls Pin
Jay Shankar11-Aug-04 21:52
Jay Shankar11-Aug-04 21:52 
I had the practice code for moving the controls. I am pasting the same for your reference. I do not know whether it would help you or not?

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

namespace WindowsApplication1
{
	/// <summary>
	/// Form2 
	/// </summary>
	public class Form2 : System.Windows.Forms.Form
	{
		/// <summary>
		/// 
		/// </summary>
		private System.ComponentModel.Container components = null;

		public Form2()
		{
			//
			// 
			//
			InitializeComponent();

			//
			// TODO: InitializeComponent 
			//
		}

		/// <summary>
		/// 
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows フォーム デザイナで生成されたコード 
		/// <summary>
		
		/// </summary>
		private void InitializeComponent()
		{
			this.button1 = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// button1
			// 
			this.button1.BackColor = System.Drawing.SystemColors.Window;
			this.button1.Cursor = System.Windows.Forms.Cursors.IBeam;
			this.button1.ForeColor = System.Drawing.SystemColors.WindowText;
			this.button1.Location = new System.Drawing.Point(136, 96);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(104, 88);
			this.button1.TabIndex = 7;
			this.button1.Text = "button1";
			this.button1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.button1_MouseUp);
			this.button1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.button1_MouseMove);
			this.button1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.button1_MouseDown);
			// 
			// Form2
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(608, 382);
			this.Controls.Add(this.button1);
			this.Name = "Form2";
			this.Text = "Form2";
			this.ResumeLayout(false);

		}
		#endregion

		
		[STAThread]
		static void Main() { Application.Run(new Form2()); }

		private System.Windows.Forms.Button button1;

		int MoveFlag = 0;
		

		private void button1_MouseDown(object sender,
			System.Windows.Forms.MouseEventArgs e)
		{
			MoveFlag = 1;
		}
		// Set some flag to indicate that you are no longer in drag mode on the
		//    mouse up event
		private void button1_MouseUp(object sender,
			System.Windows.Forms.MouseEventArgs e)
		{
			MoveFlag = 0;
		}
		// Reset the location of the button object to equal its current location
		//    plus the new location offset. Since the MouseEventArg returns the client
		//    coordinates you can just add these numbers
		private void button1_MouseMove(object sender,
			System.Windows.Forms.MouseEventArgs e)
		{
			if (MoveFlag == 1)
			{
				button1.Location = (new Point(button1.Location.X+e.X,
					button1.Location.Y+e.Y));
				button1.Refresh();
			}
		}

		

	}
}

QuestionProgramatically browsing a website and keeping a session id? Pin
Carl Mercier11-Aug-04 16:13
Carl Mercier11-Aug-04 16:13 
AnswerRe: Programatically browsing a website and keeping a session id? Pin
Armand du Plessis11-Aug-04 19:45
Armand du Plessis11-Aug-04 19:45 
GeneralRe: Programatically browsing a website and keeping a session id? Pin
Carl Mercier12-Aug-04 3:51
Carl Mercier12-Aug-04 3:51 
QuestionLocalized name of user groups? Pin
Juan Miguel Venturello11-Aug-04 13:58
Juan Miguel Venturello11-Aug-04 13:58 
QuestionConvert -&gt; Long Integer to Char?? Pin
dennis yi11-Aug-04 12:46
dennis yi11-Aug-04 12:46 
AnswerRe: Convert -&gt; Long Integer to Char?? Pin
Werdna11-Aug-04 13:36
Werdna11-Aug-04 13:36 
GeneralRe: Convert -&gt; Long Integer to Char?? Pin
Anonymous11-Aug-04 15:06
Anonymous11-Aug-04 15:06 
GeneralRe: Convert -&gt; Long Integer to Char?? Pin
Werdna11-Aug-04 16:02
Werdna11-Aug-04 16:02 
QuestionDoes C# have the C++ equivalent of a friend class? Pin
Joe Woodbury11-Aug-04 11:53
professionalJoe Woodbury11-Aug-04 11:53 
AnswerRe: Does C# have the C++ equivalent of a friend class? Pin
Christian Graus11-Aug-04 12:18
protectorChristian Graus11-Aug-04 12:18 
GeneralRe: Does C# have the C++ equivalent of a friend class? Pin
Werdna11-Aug-04 13:38
Werdna11-Aug-04 13:38 
AnswerRe: Does C# have the C++ equivalent of a friend class? Pin
Daniel Turini12-Aug-04 2:32
Daniel Turini12-Aug-04 2:32 
AnswerRe: Does C# have the C++ equivalent of a friend class? Pin
eggie512-Aug-04 7:22
eggie512-Aug-04 7:22 
GeneralPrinter Properties Dialog Pin
Werdna11-Aug-04 11:07
Werdna11-Aug-04 11:07 
Questionhow to jump from 'for' statment Pin
Adel83k11-Aug-04 10:26
Adel83k11-Aug-04 10:26 
AnswerRe: how to jump from 'for' statment Pin
Michael P Butler11-Aug-04 10:51
Michael P Butler11-Aug-04 10:51 
GeneralRe: how to jump from 'for' statment Pin
Nick Parker11-Aug-04 11:14
protectorNick Parker11-Aug-04 11:14 

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.