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

C#

 
AnswerRe: How to display an array as Image Pin
Ennis Ray Lynch, Jr.8-Nov-07 6:37
Ennis Ray Lynch, Jr.8-Nov-07 6:37 
QuestionHTTPWebRequest class Pin
AssemblySoft8-Nov-07 0:02
AssemblySoft8-Nov-07 0:02 
AnswerRe: HTTPWebRequest class Pin
ChrisKo8-Nov-07 8:08
ChrisKo8-Nov-07 8:08 
GeneralRe: HTTPWebRequest class Pin
AssemblySoft8-Nov-07 11:17
AssemblySoft8-Nov-07 11:17 
QuestiondataGridView event handler Pin
merwa7-Nov-07 23:18
merwa7-Nov-07 23:18 
Questionpicturebox disappears? Pin
I'm a beginner7-Nov-07 22:47
I'm a beginner7-Nov-07 22:47 
AnswerRe: picturebox disappears? Pin
Christian Graus7-Nov-07 22:48
protectorChristian Graus7-Nov-07 22:48 
GeneralRe: picturebox disappears? Pin
I'm a beginner7-Nov-07 23:00
I'm a beginner7-Nov-07 23:00 
Here is my code:

public partial class Form1 : Form
{
private Point old;
private bool isDragging = false;
private PictureBox[] myPic;
private int count = 0;
public Form1()
{
InitializeComponent();
begin();
}

public void begin()
{
myPic = new PictureBox[5];
}

private void button1_Click(object sender, EventArgs e)
{

myPic[count] = new PictureBox();
myPic[count].Image =System.Drawing.Image.FromFile("house.gif");
this.Controls.Add(myPic[count]);
myPic[count].MouseDown += new MouseEventHandler(Form1_MouseDown);
myPic[count].MouseMove += new MouseEventHandler(Form1_MouseMove);
myPic[count].MouseUp += new MouseEventHandler(Form1_MouseUp);

count++;

}

void Form1_MouseUp(object sender, MouseEventArgs e)
{
isDragging = false;

}

void Form1_MouseMove(object sender, MouseEventArgs e)
{
if (isDragging)
{
myPic[count-1].Left = myPic[count-1].Left + (e.X - old.X);
myPic[count-1].Top = myPic[count-1].Top + (e.Y - old.Y);

}
}

void Form1_MouseDown(object sender, MouseEventArgs e)
{
old.X = e.X;
old.Y = e.Y;
isDragging = true;

}

}

GeneralRe: picturebox disappears? Pin
Christian Graus7-Nov-07 23:18
protectorChristian Graus7-Nov-07 23:18 
GeneralRe: picturebox disappears? [modified] Pin
I'm a beginner7-Nov-07 23:38
I'm a beginner7-Nov-07 23:38 
AnswerRe: picturebox disappears? [modified] Pin
Anthony Mushrow8-Nov-07 0:03
professionalAnthony Mushrow8-Nov-07 0:03 
GeneralRe: picturebox disappears? [modified] Pin
I'm a beginner8-Nov-07 0:37
I'm a beginner8-Nov-07 0:37 
QuestionStore a key so that it is accessible by my application only Pin
jenspa7-Nov-07 21:19
jenspa7-Nov-07 21:19 
AnswerRe: Store a key so that it is accessible by my application only Pin
TJoe8-Nov-07 1:46
TJoe8-Nov-07 1:46 
QuestionRe: Store a key so that it is accessible by my application only Pin
jenspa8-Nov-07 3:11
jenspa8-Nov-07 3:11 
AnswerRe: Store a key so that it is accessible by my application only Pin
TJoe8-Nov-07 3:48
TJoe8-Nov-07 3:48 
GeneralRe: Store a key so that it is accessible by my application only Pin
Dan Neely8-Nov-07 3:37
Dan Neely8-Nov-07 3:37 
GeneralRe: Store a key so that it is accessible by my application only Pin
TJoe8-Nov-07 3:53
TJoe8-Nov-07 3:53 
QuestionAny library to get game statistics of CS 1.6?? Pin
mschoghatta7-Nov-07 20:55
mschoghatta7-Nov-07 20:55 
QuestionMS Access Connectivity - .NET CF C# Pin
Arsalan Mansoor7-Nov-07 20:45
Arsalan Mansoor7-Nov-07 20:45 
AnswerRe: MS Access Connectivity - .NET CF C# Pin
ChrisKo8-Nov-07 7:55
ChrisKo8-Nov-07 7:55 
QuestionC#.NEt windows form table layout panel control Pin
D i x y7-Nov-07 20:04
D i x y7-Nov-07 20:04 
AnswerRe: C#.NEt windows form table layout panel control Pin
il_masacratore7-Nov-07 21:17
il_masacratore7-Nov-07 21:17 
AnswerRe: C#.NEt windows form table layout panel control Pin
Stevo Z7-Nov-07 22:18
Stevo Z7-Nov-07 22:18 
QuestionFinal Steps... Help Please! Pin
kingletas7-Nov-07 20:01
kingletas7-Nov-07 20:01 

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.