> ' If this is the Web site > If oApp.nApplicationMode = 3 Then > > ' If we have some images in memory > If oApp.oAdmin.oRow("Image").length > 0 Then > > ' Load the application into the string builder > loStringBuilderFile.LoadString(oApp.oAdmin.oRow("Image")) > > ' For each image > For lnCounter = 1 To loStringBuilderFile.nLine > > ' Get the line > If Not loStringBuilderFile.MLine(lnCounter) Then > Return False > End If > > lcImage = loStringBuilderFile.cLine > > ' If the file exists > If oApp.FileExist(oApp.cGraphicFat + lcImage) Then > > ' Get the image details making it OK to reender the HTML without flickering > loImage = New System.Drawing.Bitmap(oApp.cGraphicFat + lcImage) > lnWidth = loImage.Width > lnHeight = loImage.Height > > AddImage(lcImage, lnWidth, lnHeight) > Else > AddError(oApp.cGraphicFat + lcImage + " does not exist.") > End If > > Next > > End If > > End If >>
> ' Add an image in the collection > ' expC1 Name > ' expN1 Width > ' expN2 Height > Private Function AddImage(ByVal tcName As String, ByVal tnWidth As Integer, _ > ByVal tnHeight As Integer) As Boolean > Dim lcExtension As String = "" > Dim lcName As String = "" > Dim lnLocation As Integer = 0 > Dim loObject(4) As Object > > ' Initializaiton > lcName = Trim(tcName) > lnLocation = oApp.At(".", lcName) > > ' If we have found it > If lnLocation > 0 Then > > ' If this is not the last character > If lnLocation < lcName.Length Then > lcExtension = Mid(lcName, lnLocation + 1) > End If > > End If > > ' Initialization > loObject(1) = lcName > loObject(2) = tnWidth > loObject(3) = tnHeight > loObject(4) = lcExtension > > oApp.oImage.Add(loObject) > > Return True > End Function >