Click here to Skip to main content
15,905,967 members
Home / Discussions / C#
   

C#

 
QuestionHow to put focus (with keyboard shortcuts) on input fields in Visual Studio Express C#? Pin
pietlut20-Aug-09 0:41
pietlut20-Aug-09 0:41 
AnswerRe: How to put focus (with keyboard shortcuts) on input fields in Visual Studio Express C#? Pin
OriginalGriff20-Aug-09 0:59
mveOriginalGriff20-Aug-09 0:59 
GeneralRe: How to put focus (with keyboard shortcuts) on input fields in Visual Studio Express C#? Pin
pietlut20-Aug-09 6:21
pietlut20-Aug-09 6:21 
QuestionLines Disappear Pin
mgroses20-Aug-09 0:04
mgroses20-Aug-09 0:04 
AnswerRe: Lines Disappear Pin
Christian Graus20-Aug-09 0:06
protectorChristian Graus20-Aug-09 0:06 
GeneralRe: Lines Disappear Pin
mgroses20-Aug-09 0:16
mgroses20-Aug-09 0:16 
AnswerRe: Lines Disappear Pin
DaveyM6920-Aug-09 0:14
professionalDaveyM6920-Aug-09 0:14 
AnswerRe: Lines Disappear Pin
mgroses20-Aug-09 0:22
mgroses20-Aug-09 0:22 
my code is here:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace XYCoordinate
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }



        int x, y;
        int x1, y1;

        private void button1_Click(object sender, EventArgs e)
        {
            PictureBox PictureBox1 = new PictureBox();
            PictureBox PictureBox2 = new PictureBox();

            x1 = panel1.Width / 2;
            y1 = panel1.Height / 2;

            PictureBox2.Location = new Point(x1, y1);
            panel1.Controls.Add(PictureBox2);

            PictureBox2.Image = Image.FromFile(@"C:\warehouse.bmp");

            x = int.Parse(textBox1.Text);
            y = int.Parse(textBox2.Text);
            PictureBox2.Image = Image.FromFile(@"C:\warehouse.bmp");
            
            if (comboBox1.SelectedIndex == 0)
            {
                PictureBox1.Image = Image.FromFile(@"C:\warehouse.bmp");
            }
            if (comboBox1.SelectedIndex == 1)
            {
                PictureBox1.Image = Image.FromFile(@"C:\retailer.bmp");
            }
           
            PictureBox1.Location = new Point(x, y);
            panel1.Controls.Add(PictureBox1);

            System.Drawing.Pen myPen = new System.Drawing.Pen(Color.Black,2);
            System.Drawing.Graphics formGraphics;
            formGraphics =panel1.CreateGraphics();
            formGraphics.DrawLine(myPen, x1, y1, x, y);
            
            myPen.Dispose();
            formGraphics.Dispose();
            
       
        }
        

        
    }
}

GeneralRe: Lines Disappear Pin
Christian Graus20-Aug-09 0:26
protectorChristian Graus20-Aug-09 0:26 
QuestionLoad text from webpage Pin
valdo11120-Aug-09 0:01
valdo11120-Aug-09 0:01 
AnswerRe: Load text from webpage Pin
Christian Graus20-Aug-09 0:04
protectorChristian Graus20-Aug-09 0:04 
AnswerRe: Load text from webpage Pin
N a v a n e e t h20-Aug-09 0:13
N a v a n e e t h20-Aug-09 0:13 
GeneralRe: Load text from webpage Pin
valdo11120-Aug-09 0:31
valdo11120-Aug-09 0:31 
Questionbool delegate Pin
bonzaiholding19-Aug-09 23:59
bonzaiholding19-Aug-09 23:59 
AnswerRe: bool delegate Pin
Christian Graus20-Aug-09 0:05
protectorChristian Graus20-Aug-09 0:05 
AnswerRe: bool delegate Pin
N a v a n e e t h20-Aug-09 0:11
N a v a n e e t h20-Aug-09 0:11 
AnswerRe: bool delegate Pin
DaveyM6920-Aug-09 0:11
professionalDaveyM6920-Aug-09 0:11 
GeneralRe: bool delegate Pin
bonzaiholding20-Aug-09 0:36
bonzaiholding20-Aug-09 0:36 
GeneralRe: bool delegate Pin
DaveyM6920-Aug-09 1:38
professionalDaveyM6920-Aug-09 1:38 
GeneralRe: bool delegate Pin
DaveyM6920-Aug-09 1:52
professionalDaveyM6920-Aug-09 1:52 
GeneralRe: bool delegate Pin
bonzaiholding20-Aug-09 2:40
bonzaiholding20-Aug-09 2:40 
Generalstore datagridview items under a button [modified] Need help! Pin
Member 474292219-Aug-09 23:43
Member 474292219-Aug-09 23:43 
GeneralRe: store datagridview items under a button [modified] Need help! Pin
OriginalGriff20-Aug-09 1:40
mveOriginalGriff20-Aug-09 1:40 
GeneralRe: store datagridview items under a button [modified] Need help! Pin
Member 474292220-Aug-09 2:08
Member 474292220-Aug-09 2:08 
GeneralRe: store datagridview items under a button [modified] Need help! Pin
OriginalGriff20-Aug-09 9:16
mveOriginalGriff20-Aug-09 9:16 

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.