FrameGadget backcolor problem ...

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
marc_256
Enthusiast
Enthusiast
Posts: 742
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

FrameGadget backcolor problem ...

Post by marc_256 »

[PB 5.73 x64 - Win 10 pro x64]

Can this be a "FrameGadget" bug ?

See post here ...
https://www.purebasic.fr/english/viewt ... p?t=80408

Code: Select all

;--------------------------------------------------------------------------------------------------
;- TEST PROGRAM FRAMEGADGET
;--------------------------------------------------------------------------------------------------
EnableExplicit

;--------------------------------------------------------------------------------------------------
Declare CreateWindow()

;--------------------------------------------------------------------------------------------------
	CreateWindow()

	Repeat
		Delay(10)
	Until WaitWindowEvent() = #PB_Event_CloseWindow

	End

;--------------------------------------------------------------------------------------------------
Procedure CreateWindow()
	If OpenWindow(0, 0, 0, 320, 250, "FrameGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
		SetWindowColor (0, $004000)

		FrameGadget(3, 10, 190, 300, 50, "", #PB_Frame_Flat)

	EndIf

EndProcedure

;--------------------------------------------------------------------------------------------------


Thanks,
marco
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
User avatar
jacdelad
Addict
Addict
Posts: 1431
Joined: Wed Feb 03, 2021 12:46 pm
Location: Planet Riesa
Contact:

Re: FrameGadget backcolor problem ...

Post by jacdelad »

Didn't we just talk about this some days ago in another thread?
PureBasic 6.04/XProfan X4a/Embarcadero RAD Studio 11/Perl 5.2/Python 3.10
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
Fred
Administrator
Administrator
Posts: 16618
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: FrameGadget backcolor problem ...

Post by Fred »

The FrameGadget() isn't transparent on Windows, it can be a feature request.
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1243
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Re: FrameGadget backcolor problem ...

Post by Paul »

Fred wrote: Sat Jan 28, 2023 5:21 pm The FrameGadget() isn't transparent on Windows, it can be a feature request.
Then it's a bug since there are different results based on where the SetWindowColor() is placed...

Frame is solid (no background Window color) until Window is dragged off the screen and back.

Code: Select all

If OpenWindow(0, 0, 0, 320, 250, "FrameGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
	SetWindowColor (0, $004000)
	FrameGadget(3, 10, 190, 300, 50, "", #PB_Frame_Flat)
EndIf
Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow
Frame is transparent and lets Window background color through.

Code: Select all

If OpenWindow(0, 0, 0, 320, 250, "FrameGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
	FrameGadget(3, 10, 190, 300, 50, "", #PB_Frame_Flat)
	SetWindowColor (0, $004000)
EndIf
Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow


Also, if Windows is created invisible and then you make it visible (forcing Window to be redrawn like when Window is dragged off the screen and back) then SetWindowColor can be set first

Code: Select all

If OpenWindow(0, 0, 0, 320, 250, "FrameGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered|#PB_Window_Invisible)
	SetWindowColor (0, $004000)
	FrameGadget(3, 10, 190, 300, 50, "", #PB_Frame_Flat)
	HideWindow(0,0)
EndIf
Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow
Image Image
marc_256
Enthusiast
Enthusiast
Posts: 742
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: FrameGadget backcolor problem ...

Post by marc_256 »

Sorry Fred,

If you can read my post here
viewtopic.php?p=593361#p593361

This works very well in previous versions of PB ... till PB5.72 x64
And not on PB 5.73 LTS x64

I do not understand your answer here !!!

Marc
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
Post Reply