General information
Category:
ActiveX controls in VFP
> sorry for replying so late.. I've not used Imageadmin control.. but can u pls > tell me what difficulty u r facing in append and insert methods..
Hi Vinod,
I kept working on the problem and finally was able to resolve it. To INSERT or APPEND pages into a .TIF file required 2 ImageAdmin Control Objects.
This is what I ended up doing:
I put 3 WangImage controls in a Class Library.
I created Objects WangImage.EditCtrl and WangImage.ThumbnailCtrl.
I had to create 2 Objects for WangImage.AdminCtrl. && The Help file did not tell me this.
Public ImgFrm
Do Img_Menu.mpr
Do Form ImgForm Name ImgFrm
Set ClassLib to Images
ImgFrm.AddObject('ImgOle', 'OleImg')
ImgFrm.AddObject('ImgAdmin', 'OleAdmin')
Set ClassLib To
ImgFrm.ImgOle.SelectionRectangle = FALSE
ImgFrm.ImgOle.Visible = TRUE
ImgFrm.ImgAdmin.CancelError = FALSE
Read Events
When I was ready to APPEND a Page I did the following:
Set ClassLib to Images
ImgFrm.AddObject('ImgAdmin2', 'OleAdmin')
Set ClassLib To
ImgFrm.ImgAdmin2.DialogTitle = 'Add'
ImgFrm.ImgAdmin2.ShowFileDialog(ZERO)
ImgFrm.ImgAdmin.Append(ImgFrm.ImgAdmin2.Image, ONE, ONE)
ImgFrm.RemoveObject('ImgAdmin2')
I then wanted to see the Appended page in ThumbNails:
Public Thumbfrm
Local nThumbCnt
Do Form Thumbs.scx Name Thumbfrm
Set ClassLib to Images
Thumbfrm.AddObject('ImgThumb', 'OleThumb')
Set ClassLib To
Thumbfrm.ImgThumb.Left = ZERO
Thumbfrm.ImgThumb.Top = ZERO
Thumbfrm.Height = _Screen.Height-TWENTY_FIVE
Thumbfrm.ImgThumb.Height = Thumbfrm.Height
Thumbfrm.ImgThumb.Width = Thumbfrm.Width
nThumbCnt = Thumbfrm.ImgThumb.ThumbCount()
Thumbfrm.ImgThumb.Image = ImgFrm.ImgOle.Image
Thumbfrm.ImgThumb.InsertThumbs(nThumbCnt+ONE,nThumbCnt)
Thumbfrm.ImgThumb.Visible = TRUE
It's been an interesting week. Thanks for tipping to WangImage.
My customer has requested that I perform a specific task using it.
I've noticed that it's not as fast as the installed Wang Image software but it gives Visual FoxPro functionality that I hadn't been able to perform previously.
I hope I didn't go overboard with all this code but where you say you haven't used the WangImage.ThumbnailCtrl control before, it may be helpful when you want to.
Thanks for responding Vinod.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only