Graphics not showing on window

Just starting out? Need help? Post your questions and find answers here.
stevylake
User
User
Posts: 24
Joined: Fri Apr 05, 2019 6:50 pm

Graphics not showing on window

Post by stevylake »

Occasionally a graphic doesn't show on a window, particularly small dialog windows, because I think it the window creation doesn't appear to have time to process the image.

I have tried putting a delay in the code but this doesn't work.

Is there command I can use to give the window time to fully draw?

Thanks
User avatar
mk-soft
Always Here
Always Here
Posts: 5389
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Graphics not showing on window

Post by mk-soft »

Do not draw directly on the window. This is no longer supported by OS. Use a CanvasGadget,
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
BarryG
Addict
Addict
Posts: 3318
Joined: Thu Apr 18, 2019 8:17 am

Re: Graphics not showing on window

Post by BarryG »

stevylake wrote:Occasionally a graphic doesn't show on a window, particularly small dialog windows
We'd need to see your code, otherwise we can only assume it's an error you've made.
stevylake
User
User
Posts: 24
Joined: Fri Apr 05, 2019 6:50 pm

Re: Graphics not showing on window

Post by stevylake »

mk-soft wrote:Do not draw directly on the window. This is no longer supported by OS. Use a CanvasGadget,
I am not drawing as such. It is a normal window with an image gadget.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4659
Joined: Sun Apr 12, 2009 6:27 am

Re: Graphics not showing on window

Post by RASHAD »

Can you post any workable snippet so we can help ?
Egypt my love
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8433
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Graphics not showing on window

Post by netmaestro »

I posted an image telling how to do it but it won't show :shock:
BERESHEIT
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4659
Joined: Sun Apr 12, 2009 6:27 am

Re: Graphics not showing on window

Post by RASHAD »

Hi NM
I am glad you are back active as usual to correct the behavior of some members and to correct some false answers about Windows :)
Egypt my love
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8433
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Graphics not showing on window

Post by netmaestro »

Always glad to see my friend RASHAD on the boards!
BERESHEIT
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4659
Joined: Sun Apr 12, 2009 6:27 am

Re: Graphics not showing on window

Post by RASHAD »

@NM
Stay tuned
With the new movement of Fred and Co. we will be definitely in need for you and the other talented forum members
Egypt my love
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8433
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Graphics not showing on window

Post by netmaestro »

I've been gone, what is the new movement of fred & co?
BERESHEIT
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4659
Joined: Sun Apr 12, 2009 6:27 am

Re: Graphics not showing on window

Post by RASHAD »

Egypt my love
User avatar
TI-994A
Addict
Addict
Posts: 2512
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Graphics not showing on window

Post by TI-994A »

netmaestro wrote:...what is the new movement of fred & co?
More specifically...

> PureBasic and increased varieties of CPU (new blog post)
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
blueb
Addict
Addict
Posts: 1044
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Re: Graphics not showing on window

Post by blueb »

netmaestro wrote:I've been gone, what is the new movement of fred & co?
Why were you gone? Did you slip and fall in the BERESHEIT? :mrgreen:
- It was too lonely at the top.

System : PB 6.10 LTS (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8433
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Graphics not showing on window

Post by netmaestro »

Too ill to get off the couch for six months, but I'm on the mend now so I can troll all you guys again :twisted:
BERESHEIT
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8433
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Graphics not showing on window

Post by netmaestro »

Fred wrote: For the past 8 months, we decided to focus on a new high-level back-end for PureBasic: the C language.
I've been waiting for this to emerge, it was only a matter of time. Excellent direction chosen by the team! :idea:

PS. You scared the crap out of me RASHAD I thought maybe Fred had gone to live with the pygmies or something!
BERESHEIT
Post Reply