Click here to Skip to main content
15,902,802 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# code location Pin
Judah Gabriel Himango7-Jun-07 4:23
sponsorJudah Gabriel Himango7-Jun-07 4:23 
QuestionDrag and Drop Pin
Sergio Paque6-Jun-07 6:28
Sergio Paque6-Jun-07 6:28 
AnswerRe: Drag and Drop Pin
I Believe In GOD6-Jun-07 6:38
I Believe In GOD6-Jun-07 6:38 
QuestionGetting Files that start with letters only Pin
hebes_996-Jun-07 5:57
hebes_996-Jun-07 5:57 
AnswerRe: Getting Files that start with letters only Pin
Luc Pattyn6-Jun-07 6:04
sitebuilderLuc Pattyn6-Jun-07 6:04 
GeneralRe: Getting Files that start with letters only Pin
hebes_996-Jun-07 6:09
hebes_996-Jun-07 6:09 
QuestionMoving a control with the mouse Pin
sinosoidal6-Jun-07 5:49
sinosoidal6-Jun-07 5:49 
AnswerRe: Moving a control with the mouse Pin
I Believe In GOD6-Jun-07 6:22
I Believe In GOD6-Jun-07 6:22 
Hi

this is a different , method to move Control
hope it will help ,

Class1.cs

<br />
using System;<br />
using System.Runtime.InteropServices;<br />
<br />
	public class Class1<br />
	{<br />
		public static int HTCAPTION = 2;<br />
		public static int WM_NCLBUTTONDOWN  = 0xA1;<br />
		[DllImport("user32.dll")] <br />
		public static extern int ReleaseCapture () ;<br />
		[DllImport("user32.dll")] <br />
		public static extern int SendMessage (IntPtr hWnd, int wMsg , int wParam, ref int lParam ) ;<br />
		public Class1()<br />
		{<br />
		}<br />
	}<br />


Example :

private void panel1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)<br />
		{<br />
			<br />
			int reflParam = 0;<br />
			Class1.ReleaseCapture ();<br />
			Class1.SendMessage (panel1.Handle , Class1.WM_NCLBUTTONDOWN , Class1.HTCAPTION ,  ref reflParam );<br />
		}<br />

P.S
JUST TRY IT ... it's work like charming even if it look dos not

Have a good day ....



I know nothing , I know nothing

GeneralRe: Moving a control with the mouse Pin
sinosoidal7-Jun-07 21:59
sinosoidal7-Jun-07 21:59 
GeneralRe: Moving a control with the mouse Pin
I Believe In GOD8-Jun-07 7:03
I Believe In GOD8-Jun-07 7:03 
Questiontreeview and tooltip Pin
Saamir6-Jun-07 4:18
Saamir6-Jun-07 4:18 
AnswerRe: treeview and tooltip Pin
I Believe In GOD6-Jun-07 4:30
I Believe In GOD6-Jun-07 4:30 
QuestionRe: treeview and tooltip Pin
Saamir6-Jun-07 4:34
Saamir6-Jun-07 4:34 
AnswerRe: treeview and tooltip Pin
Giorgi Dalakishvili6-Jun-07 4:31
mentorGiorgi Dalakishvili6-Jun-07 4:31 
QuestionRe: treeview and tooltip Pin
Saamir6-Jun-07 4:44
Saamir6-Jun-07 4:44 
GeneralRe: treeview and tooltip Pin
Saamir6-Jun-07 4:54
Saamir6-Jun-07 4:54 
GeneralRe: treeview and tooltip Pin
Giorgi Dalakishvili6-Jun-07 5:09
mentorGiorgi Dalakishvili6-Jun-07 5:09 
QuestionConnection with Oracle9i Pin
sarwarmdgolam6-Jun-07 4:16
sarwarmdgolam6-Jun-07 4:16 
AnswerRe: Connection with Oracle9i Pin
Tarakeshwar Reddy6-Jun-07 5:17
professionalTarakeshwar Reddy6-Jun-07 5:17 
QuestionUsing enumerated types Pin
Dewald6-Jun-07 3:56
Dewald6-Jun-07 3:56 
AnswerRe: Using enumerated types Pin
DavidNohejl6-Jun-07 4:05
DavidNohejl6-Jun-07 4:05 
GeneralRe: Using enumerated types Pin
Dewald6-Jun-07 4:57
Dewald6-Jun-07 4:57 
AnswerRe: Using enumerated types Pin
Guffa6-Jun-07 4:10
Guffa6-Jun-07 4:10 
GeneralRe: Using enumerated types Pin
Dewald6-Jun-07 4:49
Dewald6-Jun-07 4:49 
GeneralRe: Using enumerated types Pin
Dave Kreskowiak6-Jun-07 5:06
mveDave Kreskowiak6-Jun-07 5:06 

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.