|
-
Nov 8th, 2004, 05:32 AM
#1
Thread Starter
Lively Member
Simple DirectX Graphics problem
-
Nov 10th, 2004, 04:34 AM
#2
KING BODWAD XXI
Do you need the full path for the bitmap???
-
Nov 10th, 2004, 05:07 AM
#3
Thread Starter
Lively Member
It seems I don't. I have tried with the full path but get the same error. I have since ported this to VB.NET and I get the same error message.
-
Nov 10th, 2004, 05:17 AM
#4
KING BODWAD XXI
Your variable name isnt considered reserved is it? Eg bitmap as Bitmap
-
Nov 10th, 2004, 05:37 AM
#5
Thread Starter
Lively Member
Aaah! good point... But no. However, I did change it to prove it:
Code:
backGroundColor = Color.Blue;
bit_map = new Bitmap("MyPointer.bmp");
bit_map.MakeTransparent( Color.Black );
..but alas, I get the same error message.
-
Nov 10th, 2004, 05:48 AM
#6
KING BODWAD XXI
Sounds like they might have added an extra parameter that needs to be passed to it
I havent got VB.net so I cant look
Does this make any sense to you?
New Bitmap(Filename:="filename")
-
Nov 10th, 2004, 05:51 AM
#7
KING BODWAD XXI
Dim bit As Bitmap = New Bitmap(Me.Width, Me.Height)
anything? This has height and width params
-
Nov 10th, 2004, 06:01 AM
#8
Thread Starter
Lively Member
I've tried this with your information:
Code:
BackGroundColor = Color.Blue
bit_map = New Bitmap("MyPointer.bmp", 56, 152)
bit_map.MakeTransparent(Color.Black)
but with no luck
-
Nov 10th, 2004, 06:03 AM
#9
Thread Starter
Lively Member
I forgot to say that the named parameter (:="filename") didn't work either!
-
Nov 10th, 2004, 06:10 AM
#10
KING BODWAD XXI
Does it come up with the list of required parameters when you type???
e,g Bitmap(Height,Width,Filename)
etc
-
Nov 10th, 2004, 06:28 AM
#11
Thread Starter
Lively Member
yep!
The Bitmap class is overloaded with 12 options.
Code:
bit_map = New Bitmap("MyPointer.bmp", 56, 152)
is legal. However, I'm converting code from C# to VB.NET and since they are both .NET languages there shouldn't be a problem with parameters
When I run this line I get:
Cast from string "MyPointer.bmp" to Integer not valid
or something silimlar.
So I 've gone back to:
Code:
bit_map = New Bitmap("MyPointer.bmp")
for now...
Since the original code has this.
I'm beginning to think it could be a .NET bug! 
I'm still working on it though
-
Nov 10th, 2004, 06:31 AM
#12
KING BODWAD XXI
You try a different file?
-
Nov 10th, 2004, 06:46 AM
#13
Thread Starter
Lively Member
Nice one, I didn't think of that! I was so focused on this bit map.
:
:
.. I've just tried another bitmap on my User Control . This time I can get the user control to stay on the form but when I run it I get the same error message.
So, this has given me food for thought Something, in the way .NET handles/loads bitmaps maybe?
For now I will just draw a line and use that as my pointer until I can get to the bottom of this.
BodwadUK, thanks for your efforts it is appricated. I haven't given up though I'll try again later today.
Kerrang
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|