Pocket PC graphics: System.NotSupportedException 
Author Message
 Pocket PC graphics: System.NotSupportedException

I just ported a program that uses GDI+ from Win32 to
Pocket PC. The following gives me a
System.NotSupportedException:

Private Sub MyForm_Load(...) Handles MyBase.Load
    MyGraphics = MyPanel.CreateGraphics()
End Sub

Are graphics not supported at all for PPC? How can I
program simple graphics, such as lines and ellipses?

Thanks,
Sebastian Helm



Tue, 06 Dec 2005 02:23:08 GMT  
 Pocket PC graphics: System.NotSupportedException

says...

Quote:
> I just ported a program that uses GDI+ from Win32 to
> Pocket PC. The following gives me a
> System.NotSupportedException:

> Private Sub MyForm_Load(...) Handles MyBase.Load
>     MyGraphics = MyPanel.CreateGraphics()
> End Sub

> Are graphics not supported at all for PPC? How can I
> program simple graphics, such as lines and ellipses?

From what I understand (haven't done any PPC development yet), much of
GDI+ was left out of the compact framework due to resource constraints.

I believe you can still do simple lines/ellipses/circles/etc...  Just do
the painting in the Paint event and use the existing Graphics object
from the PaintEventArgs.  I'm guessing you can't create a new Graphics
object which is why you're getting the exception you're seeing.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele



Sat, 10 Dec 2005 03:15:01 GMT  
 Pocket PC graphics: System.NotSupportedException
Thanks a lot for your response. I found the solution in the meantime -
It's in the MS help: Scribbler Sample
(ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/dv_evtuv/html/etsamscrib
blersample.htm)

And yes, you're right, there's a lot missing, including, as you guessed,
the CreateGraphics method.

That doesn't make porting from Win to PPC easy. But at least there is
some common denominater if you do it exactly as described in the sample.

Thx,
Sebastian

PS: Can I vote anywhere in this forum that this was a helpful reply?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Tue, 13 Dec 2005 14:49:55 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. pocket pc transfer file to another pocket pc

2. Newbie : Pocket PC/Handheld PC/Palm PC

3. How to set Pocket PC 2002 system time?

4. Difference between PalmSize PC et Pocket PC

5. Diff between Pocket PC OS / Handled PC OS/ Embedded NT OS

6. How to connect PC by Pocket PC

7. Synchronizing .cdb on Pocket PC to .mdb on Desktop PC

8. database from pocket pc to desktop pc

9. Transfer files from PC to pocket pc

10. Autonumber and Pocket PC

11. Pocket PC

12. Pocket PC and Outlook

 

 
Powered by phpBB® Forum Software