Click here to Skip to main content
15,894,740 members
Home / Discussions / C#
   

C#

 
QuestionSuggestions for modeling Pin
mikker_1235-Oct-05 4:30
mikker_1235-Oct-05 4:30 
QuestionPictureBox Pin
PHDENG815-Oct-05 4:24
PHDENG815-Oct-05 4:24 
AnswerRe: PictureBox Pin
Niklas Ulvinge5-Oct-05 5:03
Niklas Ulvinge5-Oct-05 5:03 
AnswerRe: PictureBox Pin
Anudeep Jaiswal - MCA7-Sep-10 7:10
Anudeep Jaiswal - MCA7-Sep-10 7:10 
QuestionApache & C# Web Pages Pin
StrayGrey5-Oct-05 3:24
StrayGrey5-Oct-05 3:24 
AnswerRe: Apache & C# Web Pages Pin
enjoycrack5-Oct-05 14:28
enjoycrack5-Oct-05 14:28 
QuestionApache & C# Web Pages Pin
StrayGrey5-Oct-05 3:19
StrayGrey5-Oct-05 3:19 
AnswerRe: Apache & C# Web Pages Pin
Daniel Turini5-Oct-05 3:39
Daniel Turini5-Oct-05 3:39 
QuestionHow do I delay Windows shutdown with a Console Project in .NET? Pin
DavidWGriffin5-Oct-05 3:05
DavidWGriffin5-Oct-05 3:05 
AnswerRe: How do I delay Windows shutdown with a Console Project in .NET? Pin
DavidWGriffin5-Oct-05 12:05
DavidWGriffin5-Oct-05 12:05 
QuestionCrystal Reports with Multiple Values Pin
dbetting5-Oct-05 2:45
dbetting5-Oct-05 2:45 
QuestionHow to populate bool array with all true values Pin
jills5-Oct-05 2:39
jills5-Oct-05 2:39 
AnswerRe: How to populate bool array with all true values Pin
Stefan Troschuetz5-Oct-05 4:17
Stefan Troschuetz5-Oct-05 4:17 
GeneralRe: How to populate bool array with all true values Pin
jills5-Oct-05 19:38
jills5-Oct-05 19:38 
GeneralRe: How to populate bool array with all true values Pin
Stefan Troschuetz8-Oct-05 1:42
Stefan Troschuetz8-Oct-05 1:42 
Questionremote information processing Pin
andre.pietsch5-Oct-05 1:46
andre.pietsch5-Oct-05 1:46 
QuestionImage Rotation Pin
PHDENG815-Oct-05 1:39
PHDENG815-Oct-05 1:39 
Questionmove form without title bar Pin
Rizwan Bashir4-Oct-05 23:59
Rizwan Bashir4-Oct-05 23:59 
AnswerRe: move form without title bar Pin
PHDENG815-Oct-05 1:31
PHDENG815-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
Member 23064614-Oct-05 23:23 
QuestionHow To Convert IHTMLElement to IHTMLElementRender Pin
prochf4-Oct-05 22:04
prochf4-Oct-05 22:04 
QuestionNeed a recursive logic Pin
Chetan Ranpariya4-Oct-05 21:34
Chetan Ranpariya4-Oct-05 21:34 
QuestionProcess terminating event Pin
Prashant Gadhave4-Oct-05 21:31
Prashant Gadhave4-Oct-05 21:31 
AnswerRe: Process terminating event Pin
Stefan Troschuetz4-Oct-05 21:55
Stefan Troschuetz4-Oct-05 21:55 
QuestionAsynchronous Callback Pin
Member 22045224-Oct-05 20:53
Member 22045224-Oct-05 20:53 

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.