Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: The type or namespace name 'Excel' could not be found Pin
Richard MacCutchan9-Feb-12 6:52
mveRichard MacCutchan9-Feb-12 6:52 
AnswerRe: The type or namespace name 'Excel' could not be found Pin
Luc Pattyn8-Feb-12 6:42
sitebuilderLuc Pattyn8-Feb-12 6:42 
AnswerRe: The type or namespace name 'Excel' could not be found Pin
Dinesh928-Feb-12 20:31
professionalDinesh928-Feb-12 20:31 
GeneralRe: The type or namespace name 'Excel' could not be found Pin
pmcm8-Feb-12 21:46
pmcm8-Feb-12 21:46 
GeneralRe: The type or namespace name 'Excel' could not be found Pin
Richard MacCutchan9-Feb-12 6:28
mveRichard MacCutchan9-Feb-12 6:28 
GeneralRe: The type or namespace name 'Excel' could not be found Pin
pmcm10-Feb-12 4:13
pmcm10-Feb-12 4:13 
GeneralRe: The type or namespace name 'Excel' could not be found Pin
Richard MacCutchan10-Feb-12 6:28
mveRichard MacCutchan10-Feb-12 6:28 
Questioncreate and moving a polygan on the form c# code Pin
Member 86251607-Feb-12 23:00
Member 86251607-Feb-12 23:00 
Hi.
I write a code for create a polygan in c#
Now i want moving it on the form but i cant.
I want know how i can move a polygan on the form.
My code for create a polygan is:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace graphic_aghaye_bagheri
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public class polygan
{
public int x1;
public int y1;
public int x2;
public int y2;
public int x3;
public int y3;
public int x4;
public int y4;
public int x5;
public int y5;
public polygan(int x11, int y11,int x22,int y22,int x33,int y33,int x44,int y44,int x55,int y55)
{
x1 = x11;
y1 = y11;
x2 = x22;
y2 = y22;
x3 = x33;
y3 = y33;
x4 = x44;
y4 = y44;
x5 = x55;
y5 = y55;
}

}
private Graphics x;
private Pen myPen = new Pen(Color.Tomato,5);
int r = 30;
int currentvert = 5;
private polygan polygan1 = new polygan(200,200,300,200,350,250,300,300,200,300);

private void button1_Click(object sender, EventArgs e)
{
Point[] myPoints = { new Point(200, 200), new Point(300, 200), new Point(350, 250), new Point(300, 300), new Point(200, 300) };
Graphics myG = this.CreateGraphics();
Pen myPen =new Pen(Color.Tomato, 4f);
x.DrawPolygon(myPen, myPoints);
timer1.Start();
}

private void Form1_Load(object sender, EventArgs e)
{
x = this.CreateGraphics();
}

private void timer1_Tick(object sender, EventArgs e)
{


polygan1.x1 = polygan1.x1 + r;
polygan1.y1 = polygan1.y1 + r;
polygan1.x2 = polygan1.x2 + r;
polygan1.y2 = polygan1.y2 + r;
polygan1.x3 = polygan1.x3 + r;
polygan1.y3 = polygan1.y3 + r;
polygan1.x4 = polygan1.x4 + r;
polygan1.y4 = polygan1.y4 + r;
polygan1.x5 = polygan1.x5 + r;
polygan1.y5 = polygan1.y5 + r;

}
}
}
Tanks a lot.
AnswerRe: create and moving a polygan on the form c# code Pin
Pete O'Hanlon7-Feb-12 23:23
mvePete O'Hanlon7-Feb-12 23:23 
AnswerRe: create and moving a polygan on the form c# code Pin
Luc Pattyn7-Feb-12 23:34
sitebuilderLuc Pattyn7-Feb-12 23:34 
AnswerRe: create and moving a polygan on the form c# code Pin
Abhinav S8-Feb-12 0:55
Abhinav S8-Feb-12 0:55 
GeneralRe: create and moving a polygan on the form c# code Pin
BillWoodruff8-Feb-12 3:39
professionalBillWoodruff8-Feb-12 3:39 
GeneralRe: create and moving a polygan on the form c# code Pin
Abhinav S8-Feb-12 6:45
Abhinav S8-Feb-12 6:45 
AnswerRe: create and moving a polygan on the form c# code Pin
BobJanova8-Feb-12 4:16
BobJanova8-Feb-12 4:16 
Questionname & count of tables in a MS Access database Pin
phowarso7-Feb-12 21:30
phowarso7-Feb-12 21:30 
AnswerRe: name & count of tables in a MS Access database Pin
Keith Barrow7-Feb-12 22:01
professionalKeith Barrow7-Feb-12 22:01 
AnswerRe: name & count of tables in a MS Access database Pin
Luc Pattyn7-Feb-12 23:04
sitebuilderLuc Pattyn7-Feb-12 23:04 
AnswerRe: name & count of tables in a MS Access database Pin
PIEBALDconsult8-Feb-12 2:29
mvePIEBALDconsult8-Feb-12 2:29 
AnswerRe: name & count of tables in a MS Access database Pin
Dave Kreskowiak8-Feb-12 2:31
mveDave Kreskowiak8-Feb-12 2:31 
QuestionHow to enum the ms exchange queue info and mail details of a server Pin
Stephen T. Charlie7-Feb-12 20:11
Stephen T. Charlie7-Feb-12 20:11 
AnswerRe: How to enum the ms exchange queue info and mail details of a server Pin
Eddy Vluggen8-Feb-12 6:42
professionalEddy Vluggen8-Feb-12 6:42 
QuestionEKRN.EXE Pin
candogu7-Feb-12 20:03
candogu7-Feb-12 20:03 
AnswerRe: EKRN.EXE Pin
Abhinav S7-Feb-12 21:07
Abhinav S7-Feb-12 21:07 
GeneralRe: EKRN.EXE Pin
candogu7-Feb-12 23:17
candogu7-Feb-12 23:17 
AnswerRe: EKRN.EXE Pin
Eddy Vluggen8-Feb-12 0:20
professionalEddy Vluggen8-Feb-12 0:20 

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.