I am having problems:
I pass the e.x and e.y values returned in the mouseupcontrol event in a Viewer object to and imaging object. I want the user to click on the spot to add the second image and some text.
This worked in VB6, can't get it to work in VB.Net
The image and text do NOT end up where I click the Viewer object and the passed e.x and e.y values do not seem to correlate with where that pixel should be in the viewer (e.g. I check the image height and width, and clicking in bottow right does not return e.x and e.y anywhere near the bottom right pixel count)
THanks.
- Code: Select all
Private Sub AxGdViewer1_MouseControlUp(ByVal sender As Object, ByVal e As AxGdPicturePro5.__GdViewer_MouseUpControlEvent) Handles AxGdViewer1.MouseUpControl
Dim strFN As String = Merge.SignFax(AxGdViewer1.GetNativeImage, "username", "" , e.x, e.y) "
End Sub
Function SignFax(ByVal strFaxFN As String, ByVal strMDFolder As String, ByVal strRxText As String, ByVal iSignLeft As Long, ByVal iSignTop As Long) As String
Dim nARGBWhiteColor As Integer
Dim nImageID1 As Long, nImageID2 As Long
Dim iImage1Width As Long, iImage1Height As Long
Dim Imaging1 As New GdPicturePro5.cImaging
Dim dFaxDate As Date = Now
Imaging1.SetLicenseNumber(mylicensenumber)
nARGBWhiteColor = Imaging1.argb(255, 255, 255, 255)
Imaging1.CreateImageFromFile("N:\RMGData\Signatures\rhaley\Signature.tif")
Call Imaging1.ConvertTo32BppARGB()
nImageID1 = Imaging1.GetNativeImage
Imaging1.SetTransparencyColor(nARGBWhiteColor)
iImage1Width = Imaging1.GetWidth
iImage1Height = Imaging1.GetHeight
Imaging1.SetNativeImage(strFaxFN)
'This draws image
Call Imaging1.DrawImage(nImageID1, iSignLeft, iSignTop, iImage1Width, iImage1Height)
'This adds text
Call Imaging1.DrawText(dFaxDate.ToString, iSignLeft, iSignTop + iImage1Height, 12)
Imaging1.SaveAsTIFF("N:\outboundRxs\" & GetFileBaseName(strFaxFN) & ".Tif")
Emd Function
