Click here to Skip to main content
15,123,118 members
Home / Discussions / C#
   

C#

 
AnswerRe: Datagridview combobox in column header Pin
Manas Bhardwaj20-Jun-09 22:33
professionalManas Bhardwaj20-Jun-09 22:33 
QuestionRemote desktop shown to another client? Pin
Member 465319820-Jun-09 13:38
MemberMember 465319820-Jun-09 13:38 
QuestionExcel like Selection? Pin
Megidolaon20-Jun-09 13:21
MemberMegidolaon20-Jun-09 13:21 
AnswerRe: Excel like Selection? Pin
Christian Graus20-Jun-09 13:47
protectorChristian Graus20-Jun-09 13:47 
Question?How add a database to my c# project? Pin
H.R(Hamid reza)20-Jun-09 12:12
MemberH.R(Hamid reza)20-Jun-09 12:12 
AnswerRe: ?How add a database to my c# project? Pin
Christian Graus20-Jun-09 12:26
protectorChristian Graus20-Jun-09 12:26 
QuestionRe: ?How add a database to my c# project? Pin
H.R(Hamid reza)21-Jun-09 3:29
MemberH.R(Hamid reza)21-Jun-09 3:29 
QuestionPassing a Graphics object Pin
Member 95042020-Jun-09 11:39
MemberMember 95042020-Jun-09 11:39 
I want to make a game draw its Board so I have been trying to pass the graphics object. I get an error saying that the

NullReferenceException
"Object reference not set to an instance of an object."

I use

In the form's Paint function

Graphics g = this.CreateGraphics();
game.DrawBoard(g);

game is a variable in the form and DrawBoard is a function of that class

public void DrawBoard(Graphics g)
{
....
}
I have also tried passing the PaintEventArgs e with the same result

It works if I make the function belong to the form but that is not what I want to do

I vaguely remember from C++ that I might need to use handles but I have not been able to find a solution.

Can anybody help?



Alan
AnswerRe: Passing a Graphics object Pin
0x3c020-Jun-09 11:49
Member0x3c020-Jun-09 11:49 
GeneralRe: Passing a Graphics object Pin
Member 95042020-Jun-09 12:56
MemberMember 95042020-Jun-09 12:56 
GeneralRe: Passing a Graphics object Pin
Luc Pattyn20-Jun-09 13:14
sitebuilderLuc Pattyn20-Jun-09 13:14 
AnswerRe: Passing a Graphics object Pin
Christian Graus20-Jun-09 12:29
protectorChristian Graus20-Jun-09 12:29 
AnswerRe: Passing a Graphics object Pin
Luc Pattyn20-Jun-09 12:29
sitebuilderLuc Pattyn20-Jun-09 12:29 
QuestionNeed a container like visual studio toolbox. Pin
hdv21220-Jun-09 11:38
Memberhdv21220-Jun-09 11:38 
AnswerRe: Need a container like visual studio toolbox. Pin
Christian Graus20-Jun-09 12:29
protectorChristian Graus20-Jun-09 12:29 
GeneralRe: Need a container like visual studio toolbox. Pin
hdv21220-Jun-09 13:01
Memberhdv21220-Jun-09 13:01 
GeneralRe: Need a container like visual studio toolbox. Pin
Christian Graus20-Jun-09 13:48
protectorChristian Graus20-Jun-09 13:48 
QuestionWindows Service Controlle in VS2008 Pin
Whitaker.Mike20-Jun-09 6:10
MemberWhitaker.Mike20-Jun-09 6:10 
AnswerRe: Windows Service Controlle in VS2008 Pin
ProtoBytes20-Jun-09 6:34
MemberProtoBytes20-Jun-09 6:34 
AnswerRe: Windows Service Controlle in VS2008 Pin
DaveyM6920-Jun-09 10:40
professionalDaveyM6920-Jun-09 10:40 
AnswerRe: Windows Service Controlle in VS2008 Pin
Shukla Rahul20-Jun-09 11:09
MemberShukla Rahul20-Jun-09 11:09 
GeneralRe: Windows Service Controlle in VS2008 Pin
Whitaker.Mike21-Jun-09 4:26
MemberWhitaker.Mike21-Jun-09 4:26 
QuestionWeb service problem - error when binding to datagrid [modified] Pin
Gindi Bar Yahav20-Jun-09 5:29
MemberGindi Bar Yahav20-Jun-09 5:29 
AnswerRe: Web service problem - error when binding to datagrid Pin
ProtoBytes20-Jun-09 6:23
MemberProtoBytes20-Jun-09 6:23 
GeneralRe: Web service problem - error when binding to datagrid Pin
Gindi Bar Yahav20-Jun-09 7:55
MemberGindi Bar Yahav20-Jun-09 7:55 

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.