Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FancyToolTips and Activex Controls
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00514386
Message ID:
00514609
Views:
11
>Hi!
>
>We solved this problem by improvement in the Fancy Toll Tip control. We changed the code - added new property to tell control to force self show aside of the ActiveX. Now tool tip appear at top, at bottom, at left or at right side of ActiveX, so it is not covered by ActiveX. Anyway, if you have ActiveX controls all over the form, you will have a lot of mess...
>
>I wondered if SHOW WINDOW ... IN WINDOW command can show the custom-defined window over the activeX control. If yes, Fancy Tool Tip control could be made with use of the separate window inside of the form.

Yes, that will work, since a Form is a window and WINDOW is a window :)
Another way you can try is to use WAIT WINDOW "This is a Calendar Control" AT nRow, nCol NOWAIT

Here is a little sample using the WINDOW in VFP 6. Using WINDOW you will need to recalculate the desired position in pixels to rows and columns in some cases.
*
PUBLIC frmSample
frmSample = CREATEOBJECT("FORM1")
* Choose "Insert Control" in the appeared dialog and select MicroSoft Treeview, for example
frmsample.Show()


DEFINE CLASS form1 AS form


	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT olecontrol1 AS olecontrol WITH ;
		Top = 12, ;
		Left = 24, ;
		Height = 217, ;
		Width = 193, ;
		Name = "Olecontrol1"


	PROCEDURE Init
		PUBLIC TOOLTIP
		DEFINE WINDOW TOOLTIP NAME TOOLTIP AT 0, 0 SIZE 1,15 IN WINDOW form1 NONE FLOAT
		WITH TOOLTIP
			.FORECOLOR = RGB(0,0,0)
			.BACKCOLOR = RGB(255,255,192)
			.ADDOBJECT("Label1", "Label")
			.Label1.CAPTION = "This is a Treeview"
			.Label1.BACKSTYLE = 0 && transparent
			.Label1.WORDWRAP = .T.
			.Label1.AUTOSIZE = .T.
			.Label1.VISIBLE = .T.
		ENDWITH
	ENDPROC


	PROCEDURE MouseMove
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		hide window tooltip 
	ENDPROC


	PROCEDURE olecontrol1.MouseMove
		*** ActiveX Control Event ***
		LPARAMETERS button, shift, x, y
		 ToolTip.Left = this.left + this.width/2
		 ToolTip.Top = this.top + this.height/2
		*OR, if you want to move it with the mouse
		* ToolTip.Left = x
		* ToolTip.Top = y
		show window tooltip
		*wait window "This is a TreeView" at 10, 5 NOWAIT 
	ENDPROC


ENDDEFINE
In VFP 7 you may use corresponding MouseEnter and MouseLeave methods instead of MouseMove.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform