Click here to Skip to main content
15,916,949 members
Home / Discussions / C#
   

C#

 
GeneralRe: To show user's screen resolution ? Pin
omegazafer13-Nov-07 12:54
omegazafer13-Nov-07 12:54 
GeneralRe: To show user's screen resolution ? Pin
Christian Graus13-Nov-07 12:58
protectorChristian Graus13-Nov-07 12:58 
GeneralRe: To show user's screen resolution ? Pin
Luc Pattyn13-Nov-07 12:58
sitebuilderLuc Pattyn13-Nov-07 12:58 
GeneralRe: To show user's screen resolution ? Pin
omegazafer13-Nov-07 13:12
omegazafer13-Nov-07 13:12 
AnswerRe: To show user's screen resolution ? Pin
Luc Pattyn13-Nov-07 12:55
sitebuilderLuc Pattyn13-Nov-07 12:55 
GeneralRe: To show user's screen resolution ? Pin
omegazafer13-Nov-07 23:59
omegazafer13-Nov-07 23:59 
Questioncreating Processes to run BAT files using XCOPY Pin
ckelker13-Nov-07 12:30
ckelker13-Nov-07 12:30 
AnswerRe: creating Processes to run BAT files using XCOPY Pin
Dave Kreskowiak14-Nov-07 6:46
mveDave Kreskowiak14-Nov-07 6:46 
GeneralRe: creating Processes to run BAT files using XCOPY Pin
ckelker14-Nov-07 6:58
ckelker14-Nov-07 6:58 
GeneralRe: creating Processes to run BAT files using XCOPY Pin
Dave Kreskowiak14-Nov-07 12:50
mveDave Kreskowiak14-Nov-07 12:50 
GeneralRe: creating Processes to run BAT files using XCOPY Pin
ckelker15-Nov-07 7:31
ckelker15-Nov-07 7:31 
GeneralRe: creating Processes to run BAT files using XCOPY Pin
Dave Kreskowiak15-Nov-07 12:09
mveDave Kreskowiak15-Nov-07 12:09 
QuestionCreateGraphics on a System.Image Pin
codemunkeh13-Nov-07 12:27
codemunkeh13-Nov-07 12:27 
AnswerRe: CreateGraphics on a System.Image Pin
Christian Graus13-Nov-07 12:38
protectorChristian Graus13-Nov-07 12:38 
GeneralRe: CreateGraphics on a System.Image Pin
codemunkeh13-Nov-07 12:50
codemunkeh13-Nov-07 12:50 
GeneralRe: CreateGraphics on a System.Image Pin
Christian Graus13-Nov-07 12:59
protectorChristian Graus13-Nov-07 12:59 
GeneralRe: CreateGraphics on a System.Image Pin
codemunkeh13-Nov-07 13:05
codemunkeh13-Nov-07 13:05 
AnswerRe: CreateGraphics on a System.Image Pin
Luc Pattyn13-Nov-07 13:06
sitebuilderLuc Pattyn13-Nov-07 13:06 
GeneralRe: CreateGraphics on a System.Image Pin
codemunkeh13-Nov-07 13:09
codemunkeh13-Nov-07 13:09 
GeneralRe: CreateGraphics on a System.Image Pin
Luc Pattyn13-Nov-07 13:16
sitebuilderLuc Pattyn13-Nov-07 13:16 
GeneralRe: CreateGraphics on a System.Image Pin
codemunkeh13-Nov-07 13:35
codemunkeh13-Nov-07 13:35 
GeneralRe: CreateGraphics on a System.Image Pin
Luc Pattyn13-Nov-07 13:45
sitebuilderLuc Pattyn13-Nov-07 13:45 
QuestionImages Click Event Problem... Pin
kingletas13-Nov-07 12:01
kingletas13-Nov-07 12:01 
I have this code that is showing a least 24 pictures, i just posted the code for 6, however i would like to know how to add an event for each one instead of one for all of them.

I considered doing:

P.Click += new EventHandler(cantPictures); which will have me to code a least 24 different events, but i don't know if that would be wise to do or if there is a more effiecient way to do it.


void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
int totalPics = loading.cant();



while (cantPictures < totalPics)
{
PictureBox P = new PictureBox();
Bitmap imag;

if(cantPictures <= 5)
{
if (cantPictures == 0)
{

imag = new Bitmap(images[cantPictures]);
P.Image = imag;
P.Click += new EventHandler(P_Click);
P.Size = new Size(150,150);

P.SizeMode = PictureBoxSizeMode.StretchImage;
P.Location = new Point(35, 10);
constante = 35 + P.Size.Width+10;
this.Controls.Add(P);

}

else
{

imag = new Bitmap(images[cantPictures]);
P.Image = imag;
P.Click += new EventHandler(P_Click);
P.Size = new Size(150, 150);
P.SizeMode = PictureBoxSizeMode.StretchImage;

P.Location = new Point( constante, 10);
constante += 10 + P.Size.Width;
this.Controls.Add(P);

}

}

Sorry, i just reply part of this message to one person in the forum but i thought i hit email instead...

Best regards...

Luis E Tineo S

AnswerRe: Images Click Event Problem... Pin
Luc Pattyn13-Nov-07 12:17
sitebuilderLuc Pattyn13-Nov-07 12:17 
GeneralRe: Images Click Event Problem... Pin
kingletas13-Nov-07 12:51
kingletas13-Nov-07 12:51 

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.