Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Toolbar border disappears when tbr. is locked
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Toolbar border disappears when tbr. is locked
Miscellaneous
Thread ID:
00657207
Message ID:
00657207
Views:
72
Hi,

I've currently written some code in a toolbar, that takes a little time to execute and does some manipulations regarding the graphical appearance of a control which is on the toolbar.

During the processing I've done a THISFORM.LockScreen = .T. The longer the code took to run the more I noticed, that the toolbar's border went away during the lock. Below is some code, so anyone who wants can verify this behaviour.

I've already found a workaround (using the WIN-API function LockWindowUpdate with _VFP.Hwnd - toolbar.Hwnd had other side effects).

Just wondered, if this is a known issue or if the problem only exists on my machine.

TIA,
Armin
DEFINE CLASS tbrtest AS toolbar
	Caption = "Toolbar1"
	Height = 28
	Left = 2
	Top = 12
	Width = 50
	Name = "tbrtest"

	ADD OBJECT label1 AS label WITH ;
		Caption = "Label1", ;
		Height = 22, ;
		Left = 5, ;
		Top = 3, ;
		Width = 40, ;
		Name = "Label1"

	PROCEDURE Init
		*-- The effect only occurs if the toolbar is docked
		THIS.Dock(0, 0, 0)
	ENDPROC

	PROCEDURE label1.Click
		THISFORM.LockScreen = .T.
		*-- The toolbar's border is gone here
		*-- Now wait two seconds, so we can clearly
		*-- see the effect
		INKEY(2)
		THISFORM.LockScreen = .F.
		*-- The toolbar's border is back again
	ENDPROC
ENDDEFINE

Armin Neudert
Regional Director (Stuttgart) of German FoxPro User Group dFPUG

MCP for Visual FoxPro

Expert/Editor of the VFP section in the German Codezone community portal
Next
Reply
Map
View

Click here to load this message in the networking platform