I've done a search on this topics and read a bunch of stuff here, and I think I'm getting the impression that it's not really possible to easily use an Activex control built for VB/Access in A5.
I used this control calledl THBImage that lets you display an image and then annotate it with text, lines, circles... all kinds of stuff.
I've been trying to use it in A5. I got it to display (after several hours) and now I'm trying to draw a line. The code is being run from an OnPush event of a button, for both the display image and start a line draw.
The Access code to display an image is:
Dim Pic As IPictureDisp
Dim str As String
str = "c:\images\5d\aaron\IMG_6811.JPG"
tbImage = str
Set Pic = LoadPicture(str)
Set THBImage1.Picture = Pic
The A5 equivalent is:
dim b as B
b = file.to_blob("c:\images\5d\aaron\IMG_6811.JPG")
ui_bitmap_load("image_name", b)
x = OLE.createpicture("image_name")
THBImage1.activex.picture = x
THBImage1.Show()
I finally found the OLE.creatpicture which creates an IPictureDisp
The next step, to draw a line on the picture, in Access is:
THBImage1.RegionStartLine
I tried this line in A5
I get a compile error - Missing or invalid keyword
I looked at the control using the OLE Automation Browser and RegionStartLine is a Method of THBImage
Can this be done, or is it just out of reach.
Thanks,
David
I used this control calledl THBImage that lets you display an image and then annotate it with text, lines, circles... all kinds of stuff.
I've been trying to use it in A5. I got it to display (after several hours) and now I'm trying to draw a line. The code is being run from an OnPush event of a button, for both the display image and start a line draw.
The Access code to display an image is:
Dim Pic As IPictureDisp
Dim str As String
str = "c:\images\5d\aaron\IMG_6811.JPG"
tbImage = str
Set Pic = LoadPicture(str)
Set THBImage1.Picture = Pic
The A5 equivalent is:
dim b as B
b = file.to_blob("c:\images\5d\aaron\IMG_6811.JPG")
ui_bitmap_load("image_name", b)
x = OLE.createpicture("image_name")
THBImage1.activex.picture = x
THBImage1.Show()
I finally found the OLE.creatpicture which creates an IPictureDisp
The next step, to draw a line on the picture, in Access is:
THBImage1.RegionStartLine
I tried this line in A5
I get a compile error - Missing or invalid keyword
I looked at the control using the OLE Automation Browser and RegionStartLine is a Method of THBImage
Can this be done, or is it just out of reach.
Thanks,
David
Comment