Click here to Skip to main content
15,920,602 members
Home / Discussions / C#
   

C#

 
GeneralRe: Getting the active control type Pin
Nathan Blomquist2-Jun-03 4:16
Nathan Blomquist2-Jun-03 4:16 
GeneralRe: Getting the active control type Pin
leppie2-Jun-03 7:57
leppie2-Jun-03 7:57 
GeneralGetDlgCtrlID() API function doesn't work in .NET Pin
Roman Muntyanu2-Jun-03 3:14
Roman Muntyanu2-Jun-03 3:14 
GeneralGDI+, removinf flicker. Pin
Nigma2-Jun-03 2:17
Nigma2-Jun-03 2:17 
GeneralRe: GDI+, removinf flicker. Pin
Philip Fitzsimons2-Jun-03 2:59
Philip Fitzsimons2-Jun-03 2:59 
GeneralRe: GDI+, removinf flicker. Pin
J. Dunlap2-Jun-03 8:12
J. Dunlap2-Jun-03 8:12 
GeneralRe: GDI+, removinf flicker. Pin
James T. Johnson2-Jun-03 10:52
James T. Johnson2-Jun-03 10:52 
GeneralC# and Managed DirectX Invalid Rectangle Pin
EvilDingo2-Jun-03 2:10
EvilDingo2-Jun-03 2:10 
Hello,

I am an utter newbie with C# and DirectX. None the less, I'm determined to learn C# using Managed DirectX. I'm developing a stupid game to increase my nearly non-existant knowledge and I've hit a snag. Okay, two snags.

I create a surface for a plane image, my background, back, and front. Since this is a windowed program, I can't just use normal coordinates for drawing and have to create a rectangle at the window's location (the picturebox I'm drawing to). So I create a rectangle for my plane and background and draw them to the back surface then finally to the front surface which is displayed.

This works pretty well, except, when I move the window part-way off my monitor's screen, I get an Invalid Rectangle exception. I figure when my rectangles I'm drawing to extend off screen it throws that exception. Unfortunately, I have no idea what to do about it. I can catch the exception, but then what do I do with it? Surely windowed games don't all throw Invalid Rectangle exceptions when they're moved off the screen. There has to be something I'm doing wrong.

My next problem is totally baffling to me. I decided I wanted to use System.Drawing.Bitmap's along side with DirectX since DirectX's Surface class supports that object. In my non-DirectX program I can simply load the image with myBitmap = Bitmap(GetType(), "bitmap.png"). No worries. But in my DirectX program, using the EXACT same settings, files, and resources it says it can't find "bitmap.png" resource in that class. This is driving me up the wall. The resouce is there! It works in my other program! There is -nothing- different. In my DirectX program I have to load the file with a different constructor: myBitmap = Bitmap("c:\bitmap.png") works. But... why?! Why won't it work the other way?

Anyone out there that can help me?

Especially evil today,
EvilDingo
GeneralRe: C# and Managed DirectX Invalid Rectangle Pin
James T. Johnson2-Jun-03 10:59
James T. Johnson2-Jun-03 10:59 
GeneralRe: C# and Managed DirectX Invalid Rectangle Pin
EvilDingo3-Jun-03 1:36
EvilDingo3-Jun-03 1:36 
GeneralRe: C# and Managed DirectX Invalid Rectangle Pin
Anonymous3-Jun-03 1:58
Anonymous3-Jun-03 1:58 
GeneralRe: C# and Managed DirectX Invalid Rectangle Pin
James T. Johnson3-Jun-03 2:00
James T. Johnson3-Jun-03 2:00 
GeneralRe: C# and Managed DirectX Invalid Rectangle Pin
EvilDingo3-Jun-03 4:27
EvilDingo3-Jun-03 4:27 
GeneralSelected row from a ListView Pin
quicksilver02022-Jun-03 1:03
quicksilver02022-Jun-03 1:03 
Generalexisting code from c++ Pin
stonee741-Jun-03 22:26
stonee741-Jun-03 22:26 
GeneralGif compression using Save method on bitmap class Pin
christiantoivola1-Jun-03 22:08
christiantoivola1-Jun-03 22:08 
GeneralRe: Gif compression using Save method on bitmap class Pin
Richard Deeming1-Jun-03 23:33
mveRichard Deeming1-Jun-03 23:33 
Generalshow tooltip Pin
grv5751-Jun-03 20:16
grv5751-Jun-03 20:16 
GeneralRe: show tooltip Pin
Singh, Manish2-Jun-03 20:44
Singh, Manish2-Jun-03 20:44 
GeneralSystem.NullReferenceException in RichTextBox while dynamically adding text Pin
CNU1-Jun-03 19:58
CNU1-Jun-03 19:58 
GeneralCreate a remort object in C# Pin
Gaurika Wijeratne1-Jun-03 17:54
Gaurika Wijeratne1-Jun-03 17:54 
GeneralRe: Create a remort object in C# Pin
Kannan Kalyanaraman1-Jun-03 22:17
Kannan Kalyanaraman1-Jun-03 22:17 
GeneralRe: Create a remort object in C# Pin
Gaurika Wijeratne1-Jun-03 22:39
Gaurika Wijeratne1-Jun-03 22:39 
Generalurgent help needed, event handler Pin
mtrx1-Jun-03 17:35
mtrx1-Jun-03 17:35 
GeneralRe: urgent help needed, event handler Pin
Ray Cassick1-Jun-03 17:55
Ray Cassick1-Jun-03 17: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.