new picture in windows

How do I create a new picture in windows? The following works on my Mac but not on a PC.

dim pic as new picture (1024,800)

When I run it on a PC I get a PlatformNotSupported Exception

The Language Reference says, On Windows, alpha channels require GDI+ to be enabled. Unfortunately this means nothing to me. I don’t care about an Alpha channel, I just want a picture object in order to use Monkeybread software’s screenshotRectMBS function to get a pic of the screen.

Did you turn GDI+ on? [bottom of navigator - under WINDOWS]

Two options:
1- Check what Dave said.
2- If you don’t care about the alpha channel use the other available constructor for Picture:

dim pic as new picture (1024,800,32)

Julen

Thanks for both those comments. I thought GDI was something I had to turn on in Windows. The program now runs and I know how to add an alpha channel if I need one.

You might as well have GDI+ turned on anyway. Drawings look better and more smooth. I don’t even get why anybody would not want GDI+ enabled.

I’m struggling to find where to turn this on. I thought it was a setting - App.USEGDIPlus = True

I’ve been trying to set it in code, but it fails to compile.

Are you referring to the Build Settings? I have 2014 Release 1.1 and do not see anything to turn on under Windows

app.UseGDIPlus = true dim p as new picture(640,480) app.UseGDIPlus = false
That’s working here. What kind of project are you building? UseGDIPlus is not available in Console or Web apps.

Web App. I thought maybe that might be an issue. When it auto-completes, it kind of makes me think I’m okay.

Thanks!

Hi Oliver, what part of North Yorks? I’m in Scarborough.

web app is console, it uses libgd to draw…