Click here to Skip to main content
15,896,550 members
Home / Discussions / C#
   

C#

 
AnswerRe: workflow Pin
Brij24-Aug-08 23:51
mentorBrij24-Aug-08 23:51 
AnswerRe: workflow Pin
Manas Bhardwaj25-Aug-08 1:31
professionalManas Bhardwaj25-Aug-08 1:31 
Questionworkflow Pin
A.firooz24-Aug-08 22:46
A.firooz24-Aug-08 22:46 
QuestionI want to know some of the most advantages and disadvantages of WPF in comparison to the Forms Pin
anishkannan24-Aug-08 22:22
anishkannan24-Aug-08 22:22 
AnswerRe: I want to know some of the most advantages and disadvantages of WPF in comparison to the Forms Pin
lisan_al_ghaib24-Aug-08 22:51
lisan_al_ghaib24-Aug-08 22:51 
GeneralRe: I want to know some of the most advantages and disadvantages of WPF in comparison to the Forms Pin
chaiguy133725-Aug-08 15:22
chaiguy133725-Aug-08 15:22 
GeneralRe: I want to know some of the most advantages and disadvantages of WPF in comparison to the Forms Pin
lisan_al_ghaib25-Aug-08 22:38
lisan_al_ghaib25-Aug-08 22:38 
Questionform program problem...................... Pin
madhu Rao24-Aug-08 21:37
madhu Rao24-Aug-08 21:37 
HI ALL ,

I'd a small form program it's showing a error is: The name of the 'form1'does not exist in current content(line:41)


Can u help me.
Advance thanks 'U'
Rose | [Rose]


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 painthello
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
Form form1 = new Form();
Form form2 = new Form();
form1.Text = "Paint Event";
form1.BackColor = Color.MidnightBlue;
form1.Paint += new PaintEventHandler(MyPaintHandler);

form2.Text = "Paint Event2";
form2.BackColor = Color.MistyRose;
form2.Paint += new PaintEventHandler(MyPaintHandler);

form1.Show();
form2.Show();

}
static void MyPaintHandler(object objectSender, PaintEventArgs pea)
{
Form form = (Form)objectSender;
Graphics grp = pea.Graphics;
String str;

if (form == form1)/// here the error:The name of the 'form1'does not exist in current content
{
str = "hello from the first paint event";
}
else
str = "hello from the second paint event";

//str = "hello from the" + form.Text;
grp.DrawString("HELLO,WORLD!", form.Font, Brushes.BlanchedAlmond, 3, 8);
}
}
}

madhu

AnswerRe: form program problem...................... Pin
Hum Dum24-Aug-08 21:58
Hum Dum24-Aug-08 21:58 
QuestionManage Window from a Process (Minimize, Maximize, Close...) Pin
softwarejaeger24-Aug-08 20:55
softwarejaeger24-Aug-08 20:55 
AnswerRe: Manage Window from a Process (Minimize, Maximize, Close...) Pin
N a v a n e e t h24-Aug-08 21:14
N a v a n e e t h24-Aug-08 21:14 
GeneralRe: Manage Window from a Process (Minimize, Maximize, Close...) Pin
softwarejaeger24-Aug-08 21:58
softwarejaeger24-Aug-08 21:58 
GeneralRe: Manage Window from a Process (Minimize, Maximize, Close...) Pin
N a v a n e e t h24-Aug-08 23:50
N a v a n e e t h24-Aug-08 23:50 
AnswerRe: Manage Window from a Process (Minimize, Maximize, Close...) Pin
John Ad24-Aug-08 21:23
John Ad24-Aug-08 21:23 
GeneralRe: Manage Window from a Process (Minimize, Maximize, Close...) Pin
MehdiMousaviNezhad17-Jan-09 20:45
MehdiMousaviNezhad17-Jan-09 20:45 
AnswerRe: Manage Window from a Process (Minimize, Maximize, Close...) Pin
selcuks24-Aug-08 21:27
selcuks24-Aug-08 21:27 
QuestionHas any one tried this. [modified] Pin
Mogaambo24-Aug-08 20:27
Mogaambo24-Aug-08 20:27 
AnswerRe: Has any one tried this. Pin
N a v a n e e t h24-Aug-08 20:57
N a v a n e e t h24-Aug-08 20:57 
QuestionWorking with multiple tab pages. Pin
CodingLover24-Aug-08 18:41
CodingLover24-Aug-08 18:41 
AnswerRe: Working with multiple tab pages. Pin
Natza Mitzi25-Aug-08 5:12
Natza Mitzi25-Aug-08 5:12 
GeneralRe: Working with multiple tab pages. Pin
CodingLover26-Aug-08 17:58
CodingLover26-Aug-08 17:58 
QuestionPutting a checkBox in menuStrip ? Pin
Mohammad Dayyan24-Aug-08 11:36
Mohammad Dayyan24-Aug-08 11:36 
AnswerRe: Putting a checkBox in menuStrip ? Pin
Pete O'Hanlon24-Aug-08 11:46
mvePete O'Hanlon24-Aug-08 11:46 
GeneralRe: Putting a checkBox in menuStrip ? Pin
Mohammad Dayyan24-Aug-08 11:52
Mohammad Dayyan24-Aug-08 11:52 
AnswerRe: Putting a checkBox in menuStrip ? Pin
DaveyM6924-Aug-08 22:51
professionalDaveyM6924-Aug-08 22: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.