Newbie braucht hilfe :-(

  • VB6

Es gibt 1 Antwort in diesem Thema. Der letzte Beitrag () ist von 0grish.

    Newbie braucht hilfe :-(

    Hallo ich habe ein Problem...
    Ich habe ein WebCam capture erschtellt und möchte meine frisch geschossenen Bilder auf einen FTP hochladen mit vb6.

    Mein Code, beim klicken von CmdFotos_Click()

    Visual Basic-Quellcode

    1. Private Sub CmdFotos_Click()
    2. Static Contador
    3. Dim sFile As String * 250
    4. Dim lSize As Long
    5. lSize = 1000000
    6. sFile = App.Path & "\" & Contador & Format(Now, "hhmmss") & ".dib" '// Hier wird das Bild abgepseichert
    7. Call SendMessageS(lwndC, WM_CAP_FILE_SAVEDIB, 0, sFile)
    8. Contador = Contador + 1
    9. Dim iresult As Long ' no controlo si esta en c:\
    10. If Dir(App.Path & "\camara.wav") <> "" Then
    11. iresult = mciExecute("Play " & App.Path & "\camara.wav") '// Dieser Ton erklingt nach einem Fotoschuss
    12. End If
    13. End Sub


    Meine frage würde das gehen?

    Habe hier enfach mal was gemacht:

    Visual Basic-Quellcode

    1. Private Sub CmdFotos_Click()
    2. Static Contador
    3. Dim Bild As String
    4. Dim sFile As String * 250
    5. Dim lSize As Long
    6. lSize = 1000000
    7. sFile = App.Path & "\" & Contador & Format(Now, "hhmmss") & ".dib"
    8. Call SendMessageS(lwndC, WM_CAP_FILE_SAVEDIB, 0, sFile)
    9. Contador = Contador + 1
    10. Dim iresult As Long ' no controlo si esta en c:\
    11. If Dir(App.Path & "\camara.wav") <> "" Then
    12. iresult = mciExecute("Play " & App.Path & "\camara.wav")
    13. End If
    14. With WebBrowser1
    15. .AccessType = icUseDefault
    16. .Protocol = icFTP
    17. .RemotePort = "21"
    18. .URL = "HOST"
    19. .UserName = "ACC"
    20. .Password = "PW"
    21. Bild = App.Path & "\" & Contador & Format(Now, "hhmmss") & ".dib"
    22. .Execute , "PUT " & Bild
    23. End With
    24. End Sub


    Bitte um hilfe :) (Bin ein anfänger)


    Gruss 0grish :P

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „0grish“ () aus folgendem Grund: Niemand antwortete :P

    So habmal einbisschen aufgeffrischt:


    Visual Basic-Quellcode

    1. Private Sub CmdFotos_Click()
    2. Dim sFile As String * 250
    3. Dim sLocalFile As String
    4. Dim sRemoteFile As String
    5. sFile = App.Path & "\" & "Picture" & ".png"
    6. Call SendMessageS(lwndC, WM_CAP_FILE_SAVEDIB, 0, sFile)
    7. With Inet1
    8. .AccessType = icUseDefault
    9. .Protocol = icFTP
    10. .RemotePort = 21
    11. .URL = "MEIN-Host.de"
    12. .UserName = "MEIN-User"
    13. .Password = "MEIN-Password"
    14. sLocalFile = App.Path & "\Picture.png"
    15. sRemoteFile = "/upload/ftp/ " & TIMEFormat(Now(), "hhmmss") & ".png"
    16. .Execute , "PUT " & sLocalFile & " " & sRemoteFile
    17. End Sub


    Problem:

    Visual Basic-Quellcode

    1. With Inet1
    = Habe kein Microsoft Internet Transfer Control also wininet.dll kann ich nicht auf meinen VB6 Portabel Browsen