Click here to Skip to main content
15,036,891 members
Home / Discussions / C#
   

C#

 
QuestionHow to populate bool array with all true values Pin
jills5-Oct-05 2:39
Memberjills5-Oct-05 2:39 
AnswerRe: How to populate bool array with all true values Pin
Stefan Troschuetz5-Oct-05 4:17
MemberStefan Troschuetz5-Oct-05 4:17 
GeneralRe: How to populate bool array with all true values Pin
jills5-Oct-05 19:38
Memberjills5-Oct-05 19:38 
GeneralRe: How to populate bool array with all true values Pin
Stefan Troschuetz8-Oct-05 1:42
MemberStefan Troschuetz8-Oct-05 1:42 
Questionremote information processing Pin
andre.pietsch5-Oct-05 1:46
Memberandre.pietsch5-Oct-05 1:46 
QuestionImage Rotation Pin
PHDENG815-Oct-05 1:39
MemberPHDENG815-Oct-05 1:39 
Questionmove form without title bar Pin
Rizwan Bashir4-Oct-05 23:59
MemberRizwan Bashir4-Oct-05 23:59 
AnswerRe: move form without title bar Pin
PHDENG815-Oct-05 1:31
MemberPHDENG815-Oct-05 1:31 
Point MouseCurrrnetPos,MouseNewPos,formPos,formNewPos;
bool mouseDown=false;

private void MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
//Calculate offset

if(e.Button==MouseButtons.Left)
{
mouseDown = true;
MouseCurrrnetPos = Control.MousePosition;
formPos = this.Location;
}
}

private void MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(e.Button==MouseButtons.Left)
mouseDown=false;
}

private void MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(mouseDown==true)
{
// get the position of the mouse in the screen
MouseNewPos=Control.MousePosition;

formNewPos.X=MouseNewPos.X-MouseCurrrnetPos.X+formPos.X;
formNewPos.Y=MouseNewPos.Y-MouseCurrrnetPos.Y+formPos.Y;

Location=formNewPos;
formPos=formNewPos;
MouseCurrrnetPos=MouseNewPos;
}

}

Simply call the three event handlers within the "Event" properties for the control you plan to use.

D
Questionjoining excel sheet to c#(Ado.net) but giving error Pin
Member 23064614-Oct-05 23:23
MemberMember 23064614-Oct-05 23:23 
QuestionHow To Convert IHTMLElement to IHTMLElementRender Pin
prochf4-Oct-05 22:04
Memberprochf4-Oct-05 22:04 
QuestionNeed a recursive logic Pin
Chetan Ranpariya4-Oct-05 21:34
MemberChetan Ranpariya4-Oct-05 21:34 
QuestionProcess terminating event Pin
Prashant Gadhave4-Oct-05 21:31
MemberPrashant Gadhave4-Oct-05 21:31 
AnswerRe: Process terminating event Pin
Stefan Troschuetz4-Oct-05 21:55
MemberStefan Troschuetz4-Oct-05 21:55 
QuestionAsynchronous Callback Pin
Member 22045224-Oct-05 20:53
MemberMember 22045224-Oct-05 20:53 
AnswerRe: Asynchronous Callback Pin
Stefan Troschuetz4-Oct-05 22:14
MemberStefan Troschuetz4-Oct-05 22:14 
AnswerRe: Asynchronous Callback Pin
S. Senthil Kumar5-Oct-05 1:25
MemberS. Senthil Kumar5-Oct-05 1:25 
QuestionSome problem regarding access permission Pin
akshayswaroop4-Oct-05 19:32
Memberakshayswaroop4-Oct-05 19:32 
QuestionPlaying dat files through C# code Pin
Prashant Gadhave4-Oct-05 18:56
MemberPrashant Gadhave4-Oct-05 18:56 
AnswerRe: Playing dat files through C# code Pin
leppie4-Oct-05 20:47
Memberleppie4-Oct-05 20:47 
QuestionCreating a xaml project with visual c# Pin
TssPrasad4-Oct-05 18:53
sussTssPrasad4-Oct-05 18:53 
QuestionRe: Creating a xaml project with visual c# Pin
David Stone4-Oct-05 20:51
sitebuilderDavid Stone4-Oct-05 20:51 
QuestionCellChangedDataEvent Pin
RoboIchi4-Oct-05 18:32
MemberRoboIchi4-Oct-05 18:32 
Question2 server Pin
aarontan4-Oct-05 18:27
Memberaarontan4-Oct-05 18:27 
AnswerRe: 2 server Pin
ehuysamer4-Oct-05 22:36
Memberehuysamer4-Oct-05 22:36 
GeneralRe: 2 server Pin
Anonymous4-Oct-05 23:39
MemberAnonymous4-Oct-05 23:39 

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.