Hallo, ich habe wiedereinmal ein Problem und zwar habe ich eine Statusbar in mein Programm eingefügt, aber diese zeigt nichts an, vielleicht findet ja einer von euch den Fehler, hier ein Teil des Quelltextes:
Sub mnusenden_Click()
Dim Code As Long
Dim Length As Long
Dim BytesSent As Long
Dim LastSent As Long
Dim NullString As String
Dim Temp As String * 256
Dim TheFile As String
Dim Msg As String
Dim NL As String
Dim X As String
Dim StatusBar1 As String
Dim Version As Integer
Dim Mode As Long
Dim S1 As String
Dim S2 As String
Dim S3 As String
Dim inipath As String
Dim AN As String
Dim VON As String
Dim SmtpServer As String
Dim i As Double
i = 1
inipath = GetPrivateStringValue("OPTIONS", "INIPATH", "C:\Dokumente und Einstellungen\IT20040310\Desktop\pfad.ini")
AN = GetPrivateStringValue("AN", "Empfänger" & i, inipath & "Mail.ini")
VON = GetPrivateStringValue("VON", "Sender" & i, inipath & "Mail.ini")
SmtpServer = GetPrivateStringValue("SMTPSERVER", "Server" & i, inipath & "Mail.ini")
StatusBar1 = True
Code = seeAttach(1, SEE_KEY_CODE)
On Error Resume Next
If Code < 0 Then
MsgBox "ERROR: Cannot attach. Check SEE_KEY_CODE."
End
End If
On Error GoTo 0
Mode = QUOTED_PLAIN
Code = seeIntegerParam(0, SEE_QUOTED_PRINTABLE, Mode)
Version = seeStatistics(0, SEE_GET_VERSION)
S1 = "SMTP/POP3 Email Engine Version "
S2 = Hex$(Version)
S3 = Mid$(S2, 1, 1) + "." + Mid$(S2, 2, 1) + "." + Mid$(S2, 3, 1)
StatusBar1 = S1 + S3 + ". Ready to connect."
On Error GoTo MailerErrorHandler
NullString = Chr$(0)
NL = Chr$(13) + Chr$(10)
StatusBar1 = ""
LastSent = 0
If Len(SmtpServer) = 0 Then
StatusBar1 = Time$ & " Your SMTP server is not specified."
Exit Sub
End If
If Len(VON) = 0 Then
StatusBar1 = Time$ & " Missing 'Email From' address."
Exit Sub
Else
Code = seeVerifyFormat(VON)
If Code < 0 Then
Exit Sub
End If
End If
If Len(AN) = 0 Then
StatusBar1 = Time$ & " Missing 'Email To' address."
Exit Sub
Code = seeVerifyFormat(AN)
If Code < 0 Then
Exit Sub
End If
End If
If Len("C:\Dokumente und Einstellungen\IT20040310\Desktop\" + CStr(Date) + ".tif") > 0 Then
TheFile = "C:\Dokumente und Einstellungen\IT20040310\Desktop\" + CStr(Date) + ".tif"
Open TheFile For Input As 1
Close 1
End If
Screen.MousePointer = 11
mnusenden.Enabled = False
StatusBar1 = Time$ & " Sending email."
DoEvents
Code = seeStringParam(0, SEE_LOG_FILE, "MAILER.LOG")
StatusBar1 = Time$ & " Connecting to SMTP server " & SmtpServer
Code = seeSmtpConnect(0, SmtpServer, VON, Chr$(0))
If Code < 0 Then
Sub mnusenden_Click()
Dim Code As Long
Dim Length As Long
Dim BytesSent As Long
Dim LastSent As Long
Dim NullString As String
Dim Temp As String * 256
Dim TheFile As String
Dim Msg As String
Dim NL As String
Dim X As String
Dim StatusBar1 As String
Dim Version As Integer
Dim Mode As Long
Dim S1 As String
Dim S2 As String
Dim S3 As String
Dim inipath As String
Dim AN As String
Dim VON As String
Dim SmtpServer As String
Dim i As Double
i = 1
inipath = GetPrivateStringValue("OPTIONS", "INIPATH", "C:\Dokumente und Einstellungen\IT20040310\Desktop\pfad.ini")
AN = GetPrivateStringValue("AN", "Empfänger" & i, inipath & "Mail.ini")
VON = GetPrivateStringValue("VON", "Sender" & i, inipath & "Mail.ini")
SmtpServer = GetPrivateStringValue("SMTPSERVER", "Server" & i, inipath & "Mail.ini")
StatusBar1 = True
Code = seeAttach(1, SEE_KEY_CODE)
On Error Resume Next
If Code < 0 Then
MsgBox "ERROR: Cannot attach. Check SEE_KEY_CODE."
End
End If
On Error GoTo 0
Mode = QUOTED_PLAIN
Code = seeIntegerParam(0, SEE_QUOTED_PRINTABLE, Mode)
Version = seeStatistics(0, SEE_GET_VERSION)
S1 = "SMTP/POP3 Email Engine Version "
S2 = Hex$(Version)
S3 = Mid$(S2, 1, 1) + "." + Mid$(S2, 2, 1) + "." + Mid$(S2, 3, 1)
StatusBar1 = S1 + S3 + ". Ready to connect."
On Error GoTo MailerErrorHandler
NullString = Chr$(0)
NL = Chr$(13) + Chr$(10)
StatusBar1 = ""
LastSent = 0
If Len(SmtpServer) = 0 Then
StatusBar1 = Time$ & " Your SMTP server is not specified."
Exit Sub
End If
If Len(VON) = 0 Then
StatusBar1 = Time$ & " Missing 'Email From' address."
Exit Sub
Else
Code = seeVerifyFormat(VON)
If Code < 0 Then
Exit Sub
End If
End If
If Len(AN) = 0 Then
StatusBar1 = Time$ & " Missing 'Email To' address."
Exit Sub
Code = seeVerifyFormat(AN)
If Code < 0 Then
Exit Sub
End If
End If
If Len("C:\Dokumente und Einstellungen\IT20040310\Desktop\" + CStr(Date) + ".tif") > 0 Then
TheFile = "C:\Dokumente und Einstellungen\IT20040310\Desktop\" + CStr(Date) + ".tif"
Open TheFile For Input As 1
Close 1
End If
Screen.MousePointer = 11
mnusenden.Enabled = False
StatusBar1 = Time$ & " Sending email."
DoEvents
Code = seeStringParam(0, SEE_LOG_FILE, "MAILER.LOG")
StatusBar1 = Time$ & " Connecting to SMTP server " & SmtpServer
Code = seeSmtpConnect(0, SmtpServer, VON, Chr$(0))
If Code < 0 Then