Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Developer-defined Btn(s) on Standard VFP toolbar
Message
From
28/01/2002 13:44:21
 
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Miscellaneous
Thread ID:
00611029
Message ID:
00611755
Views:
31

>I think you meant 'crucial'. :)
>
>>Thanks Sergey,
>>this line was critical for the solution:
>>
>>	KEYBOARD "{CTRL+F2}DO mytoolbar{ENTER}" CLEAR
>>


Yep :o)) and here is my code that solves the problem - thanks again Sergey, without your support I will not came to this idea.
*somewhere from prg it is done _screen.AddObject('toolbtn', newobject('toolbtn', 'devtool.vcx'))

DEFINE CLASS toolbtn AS toolbar


	Caption = ""
	Height = 28
	Left = 0
	Top = 0
	Width = 33
	Name = "toolbtn"


	ADD OBJECT toolbtncmd AS commandbutton WITH ;
		Top = 3, ;
		Left = 5, ;
		Height = 22, ;
		Width = 23, ;
		Caption = "", ;
		Name = "ToolBtnCmd"


	PROCEDURE Destroy
		LOCAL lcSetSafety, lcExePath, lcPRG

		lcExePath = ADDBS(JustPath(SYS(16, 1)))
		lcExePath = SUBSTR(lcExePath, AT([:], lcExePath)-1)

		lcPRG = lcExePath + [_MakeBtn]

		IF _Screen.ReleaseType != 2 Then
			LOCAL lcCommand, lcCRLF
			lcCRLF = CHR(13)+CHR(10)
			lcCommand = [_SCREEN.AddProperty('] + This.Name + ;
				[', NEWOBJECT('] + This.Class + [', '] + This.ClassLibrary + ['))] + lcCRLF
			lcCommand = lcCommand + [ON KEY LABEL RIGHTMOUSE]
			lcSetSafety = SET([SAFETY])
			SET SAFETY OFF
			DELETE FILE (FORCEEXT(lcPRG, [BAK]))
			DELETE FILE (FORCEEXT(lcPRG, [PRG]))
			DELETE FILE (FORCEEXT(lcPRG, [FXP]))
			SET SAFETY &lcSetSafety

			lcPrg = FORCEEXT(lcPRG, [PRG])
			STRTOFILE(lcCommand, lcPrg)

			ON KEY LABEL RIGHTMOUSE Do &lcPrg
			KEYBOARD '{CTRL+F2}{RIGHTMOUSE}' CLEAR
		ENDIF
	ENDPROC


	PROCEDURE Init
		This.Dock(0, 20000, 0)
		This.Show
	ENDPROC


	PROCEDURE toolbtncmd.Click
*	Some code
	ENDPROC


ENDDEFINE
Btw. As for the unicode in VFP (I know it is not supported natively) - however I'm really near to 'get it' (believe me or not - it is so - I have found a workaround.)
Best Regards
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform