Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Annotations with Imaging for Windows Control
Message
From
02/10/2008 16:57:53
June Kendrick
Kendrick Associates, Inc.
New York, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Annotations with Imaging for Windows Control
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01352422
Message ID:
01352422
Views:
91
Has anyone used the Annotations feature of the Imaging for Windows control?

I'm trying to add an annotation to an image programmatically. I'm trying to show a different character on each page of a multi-page image. Sometimes it works, and sometimes it gives me an "Invalid Annotation Type" error. The code below is basically what I'm doing. The StampText and the Draw Location vary.
I've tried using Annotation groups, and even then, sometimes it works and sometimes it doesn't.
WITH THISFORM.OleImageEdit
	* must display it before annotating it
	.Display()
	
	* stamp it
	.AnnotationType = wiTextStamp

	* with these characteristics
	STORE .F. TO llBold, llItalic, llUnderline, llStrikeThrough
	lcName = 'Arial'
	lnSize = 128

	WITH ThisForm.OleImageEdit.AnnotationFont
		.Bold = llBold
		.Italic = llItalic
		.Name = lcName
		.Size = lnSize
		.Underline = llUnderline
		.StrikeThrough = llStrikeThrough
	ENDWITH
	.AnnotationFontColor = RGB(128,255,128)	&& green
	.AnnotationStampText = 'H'

	* at this location
	lnX = 90
	.Draw(10, lnX)

	* need to save page in order to keep annotation graphics
	llZoom = .F.
	.Save(llZoom)

	* annotations don't show in thumbnails so
	* generate thumbnail to cause annotation graphic to show
	ThisForm.OleThumbNails.GenerateThumb(1, .Page)
ENDWITH
Any and all ideas would be appreciated.

Thanks,
June
Reply
Map
View

Click here to load this message in the networking platform