Private Sub SectionDetails_Format(ByVal pFormattingInfo As Object)
Dim bmpHold As StdPicture ' object to hold the bitmap
Dim iModNum As Integer ' Calculate an integer to pass in as the bmp name.
iModNum = cRecNum.Value Mod 3 + 1 Select Case iModNum
Case 1
' Set our variable to an bitmap
Set bmpHold = LoadPicture(App.Path & "\res\SampleBitmap1.bmp")
' Set the height and width of the Report object equal to the actual values for
' the bitmap - the StdPicture object defaults to HiMetric, the Report uses twips
' Set the bitmap on the Report equal to the variable
Set cOLEObj.FormattedPicture = bmpHold
cOLEObj.Height = bmpHold.Height * 567 / 1000 ' convert from HiMetric to Twips
cOLEObj.Width = bmpHold.Width * 567 / 1000 ' convert from HiMetric to Twips
End Select
End Sub
Dim bmpHold As StdPicture ' object to hold the bitmap
Dim iModNum As Integer ' Calculate an integer to pass in as the bmp name.
iModNum = cRecNum.Value Mod 3 + 1 Select Case iModNum
Case 1
' Set our variable to an bitmap
Set bmpHold = LoadPicture(App.Path & "\res\SampleBitmap1.bmp")
' Set the height and width of the Report object equal to the actual values for
' the bitmap - the StdPicture object defaults to HiMetric, the Report uses twips
' Set the bitmap on the Report equal to the variable
Set cOLEObj.FormattedPicture = bmpHold
cOLEObj.Height = bmpHold.Height * 567 / 1000 ' convert from HiMetric to Twips
cOLEObj.Width = bmpHold.Width * 567 / 1000 ' convert from HiMetric to Twips
End Select
End Sub
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货