GetPictureSize example
Example for GetPictureSize method
Private Sub Form1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
Command1.Text = "GetPictureSize"
cAvax1.StartAvax()
End Sub
Private Sub Form1_FormClosed(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
cAvax1.EndAvax()
End Sub
Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click
Dim sPictureFile As String
Dim aWidth As Single
Dim aHeight As Single
Dim sPictures(1) As String
sPictureFile = My.Application.Info.DirectoryPath & "\..\Clouds1.bmp"
Call CAvax1.SetAvaxProperty(Avax.AvaxProp.PrintUnit_MM_p, 1)
If cAvax1.GetPictureSize(sPictureFile, aWidth, aHeight) = True Then
MsgBox("Width=" & aWidth & vbCrLf & "Height=" & aHeight, MsgBoxStyle.Information, "GetPictureSize")
sPictures(1) = sPictureFile
Call CAvax1.Add_Picture(sPictures, 0, 0, aWidth, aHeight, 0, Nothing, -1, 8)
End If
End Sub