![]() |
FlowFact - Entwicklungstools |
![]() |
Sub | cmd_Obj_Bilder_Click() |
Public Sub cmd_Obj_Bilder_Click() Dim rsObj As ADODB.Recordset Dim strObjDsn As String Dim strInput As String Dim intIndex As Long Dim i As Long '** Objekt mit der internen Bezeichnung 'TestHaus' suchen. Set rsObj = m_oFFDeveloper.OBJ_Find("Intern like 'TestHaus%'", "Angelegt DESC") If rsObj.EOF = True Then MsgBox "Kein 'TestHaus' gefunden. Bitte zuerst Objekt-Create ausführen." Exit Sub End If '** Bilddatei aussuchen CommonDialog1.DialogTitle = "Bildatei auswählen" CommonDialog1.DefaultExt = ".jpg" CommonDialog1.Filter = "Bilddatei (*.jpg)|*.jpg|Alle Dateien (*.*)|*.*" CommonDialog1.FilterIndex = 0 CommonDialog1.InitDir = m_oFFDeveloper.FlowFact_Folder & "\pic.obj" CommonDialog1.FileName = "*.jpg" CommonDialog1.ShowOpen If m_oFFDeveloper.oUtil.Exist(CommonDialog1.FileName) = False Then Exit Sub End If '** Bildbezeichnung - Eingabe strInput = InputBox("Bitte geben sie eine Bezeichnung für das Bild ein.", "Bild hinzufügen", "Rückansicht") If strInput = "" Then Exit Sub End If '** Freien Index ermitteln intIndex = 0 While m_oFFDeveloper.OBJ_Bild_Get(rsObj, intIndex) <> "" intIndex = intIndex + 1 Wend If intIndex > 9 Then intIndex = 0 End If '** Bilddatei kopieren m_oFFDeveloper.OBJ_Bild_Set rsObj, CommonDialog1.FileName, intIndex, strInput '** Objekt in FlowFact anzeigen strObjDsn = rsObj("DSN") m_oFFDeveloper.OBJ_ShowDSN strObjDsn End Sub |