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

C#

 
AnswerRe: maybe someone here knows Pin
Vasudevan Deepak Kumar27-Nov-07 4:31
Vasudevan Deepak Kumar27-Nov-07 4:31 
AnswerRe: maybe someone here knows Pin
Obaid ur Rehman27-Nov-07 4:46
Obaid ur Rehman27-Nov-07 4:46 
GeneralRe: maybe someone here knows Pin
damianrda27-Nov-07 5:01
damianrda27-Nov-07 5:01 
Questionhow to know which procces['s] have access to a file Pin
combo_ci27-Nov-07 3:46
combo_ci27-Nov-07 3:46 
AnswerRe: how to know which procces['s] have access to a file Pin
Vasudevan Deepak Kumar27-Nov-07 3:48
Vasudevan Deepak Kumar27-Nov-07 3:48 
GeneralRe: how to know which procces['s] have access to a file Pin
combo_ci27-Nov-07 4:52
combo_ci27-Nov-07 4:52 
GeneralRe: how to know which procces['s] have access to a file Pin
mav.northwind27-Nov-07 8:11
mav.northwind27-Nov-07 8:11 
QuestionUndescriptive "Parameter is not valid." error Pin
Lauulauu27-Nov-07 3:11
Lauulauu27-Nov-07 3:11 
Hello all,

I am currently writing a very simple 2D game for school. I have created a Sprite class to display images on a windows form. In the constructor of the Form1 class, I have the following code:

handle = this.CreateGraphics();


handle is a Graphics object.

Then, in the Sprite class, this object is used to draw images to the screen:

public void Draw()
{
    Matrix m = new Matrix();
    m.Rotate(rotation);

    handle.Transform = m;

    handle.DrawImage(bitmap, destination);

    handle.Dispose();
}


However, when I run the code, I get the following error on "handle.Transform = m;":

A first chance exception of type 'System.ArgumentException' occurred in System.Drawing.dll


Commenting out the line for testing just moves the error to "handle.DrawImage(bitmap, destination);".

I've been stuck on this for hours now without any progress. Anyone that can give me a push in the right direction?

Many thanks!
AnswerRe: Undescriptive "Parameter is not valid." error Pin
m@u27-Nov-07 3:43
m@u27-Nov-07 3:43 
GeneralRe: Undescriptive "Parameter is not valid." error Pin
Lauulauu27-Nov-07 3:46
Lauulauu27-Nov-07 3:46 
GeneralRe: Undescriptive "Parameter is not valid." error Pin
m@u27-Nov-07 3:59
m@u27-Nov-07 3:59 
GeneralRe: Undescriptive "Parameter is not valid." error Pin
Lauulauu27-Nov-07 4:09
Lauulauu27-Nov-07 4:09 
GeneralRe: Undescriptive "Parameter is not valid." error Pin
m@u27-Nov-07 5:09
m@u27-Nov-07 5:09 
GeneralRe: Undescriptive "Parameter is not valid." error Pin
Lauulauu27-Nov-07 5:37
Lauulauu27-Nov-07 5:37 
AnswerRe: Undescriptive "Parameter is not valid." error Pin
leppie27-Nov-07 4:15
leppie27-Nov-07 4:15 
GeneralRe: Undescriptive "Parameter is not valid." error Pin
Lauulauu27-Nov-07 4:28
Lauulauu27-Nov-07 4:28 
AnswerRe: Undescriptive "Parameter is not valid." error Pin
Lauulauu27-Nov-07 4:35
Lauulauu27-Nov-07 4:35 
QuestionCreating a Form dynamically in inches Pin
sindhutiwari27-Nov-07 2:45
sindhutiwari27-Nov-07 2:45 
AnswerRe: Creating a Form dynamically in inches Pin
Rich Insley27-Nov-07 5:07
Rich Insley27-Nov-07 5:07 
AnswerRe: Creating a Form dynamically in inches Pin
Pete O'Hanlon27-Nov-07 5:11
mvePete O'Hanlon27-Nov-07 5:11 
GeneralRe: Creating a Form dynamically in inches Pin
Rich Insley27-Nov-07 5:42
Rich Insley27-Nov-07 5:42 
QuestionAccess FireBird Server directly. Pin
Yogi Yang 00727-Nov-07 2:00
Yogi Yang 00727-Nov-07 2:00 
AnswerRe: Access FireBird Server directly. Pin
Vasudevan Deepak Kumar27-Nov-07 2:04
Vasudevan Deepak Kumar27-Nov-07 2:04 
AnswerRe: Access FireBird Server directly. Pin
Mustafa Ismail Mustafa27-Nov-07 3:43
Mustafa Ismail Mustafa27-Nov-07 3:43 
GeneralRe: Access FireBird Server directly. Pin
Yogi Yang 00727-Nov-07 20:51
Yogi Yang 00727-Nov-07 20: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.