Platform Not Supported?

What is Platform Not Supported on Windows 10 Pro 64 Bits in:

Dim MyPict As New Picture(500, 500)

What platform do you have set in your build settings?

Hi Tim,

macOS and Windows, but I run the IDE only. I will try with Windows only. Windows 10 runs in VirtualBox on my mid-2014 MacBook Pro.

when I add ,32 that error goes away, temporary, because at some other places I have some Pictures that are Nil.
I mean:

Dim myPict As New Picture(500, 500, 32)

I think the project is less than 100 lines: it is really boring to get all these troubles for so few lines !

Wouldn’t that count as a “user error” and should throw a “UserIsWrong exception”?

:wink:

There can also be a “UserTooOldToDevelopError”…

More seriously: the very same project worked fine on macOS (El Capitan) !

Things may improve tomorrow.

What is text of the exception?
As currently Xojo uses DirectDraw for pictures, it may fail to allocate one.

I suspect an old version of Xojo.
2014/2015?

Older versions used GDI+ before switching to DirectDraw.
So if GDI DLL would be missing, you could not create a picture with alpha channel.

Maybe so old that it still uses NewPicture instead of New Picture?

2015r1

No, most of New Picture works fine.

Last trouble is some Pictures are Nil (not trapped) and crash on

Centered_Width = (Screen_Width - Pict.Width) / 2 

VirtualBox is slow, so using Xojo in it is very slow.

I will add more Nil tests in the project and made some more debugs later today.

Turn on GDI+ in Windows build settings.

You then will be able to do something like

Dim P as picture = New picture(1000,1000)

If you don’t turn GDI+ on, you have to specify the depth of the picture:

 Dim P as picture = New picture(1000,1000,32 )

The latest versions of Xojo don’t need that.

1 Like

Thank you for your advice Michel.

Of course, I forgot to do that until I was getting the troubles.

Then, I set it to ON, but maybe it do not made an effect until a reload (either the project or the IDE).

I have been doing something right now + time for dinner, then I will check that more closely. And add some more DebugLog…

Ouch !

I was really tired yesterday when I tested that small project on Windows.

I set MDI ON instead of GDI+…

That said, I never understand why GDI+ was not ON by default.

But, this changed (different feature) with Xojo 2020r1 (and maybe in previous versions ?): 64 Bits compilation is default (n macOS, not tested elsewhere).

Once more: thank you Michel.

PS: I only have Nil(s) now. Time for dinner…