Search:

Type: Posts; User: AlexanderBB

Page 1 of 13 1 2 3 4

Search: Search took 0.05 seconds.

  1. Replies
    3
    Views
    394

    Closing Form

    I'm trying to close a Form in code to save an extra click on "X"
    But Hide, Unload, Close all seem to fail or give errors.
    Is there a bulletprof way to do this. Form is called from another form.
  2. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    Many thanks, would never have figured that out. Now all working spot on :)
  3. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    That sounds promising, think I meant FtpGetFile not 'Put' so tried this
    ret = FtpGetFile(hFTP, Filename, DestFileSpec, 0, FILE_ATTRIBUTE_NORMAL, FTP_TRANSFER_TYPE_BINARY, INTERNET_FLAG_RELOAD)
    but...
  4. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    I've run into a strange issue using fafalones FtpPutFile routine.
    While everything appears to work perfectly, something odd happens which (dumb as I may be) is beyond belief.
    Here's the scenario:
    ...
  5. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    Yes, you had, sorry. Not sure why I didn't get it, but all working great now. Many thanks.
  6. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    The only solution is to answer someone's question, surely. Otherwise, what's the point?
  7. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    Fafalone,

    Dim hFile As LongPtr
    hFile = FtpOpenFileW(hFTP, StrPtr("filename"), GENERIC_READ, FTP_TRANSFER_TYPE_BINARY, 0)
    I don't have any FtpOpenFileW or GENERIC_READ.
    Presumably I need another...
  8. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    Ah, I had no example for FtpOpenFileW or may have thought of that. I'll try to replace what I have, thank you.
    TBH I don't "understand" these instructions, just see them working, so Viola! I do...
  9. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    The dark and mysterious world of APIs, DLLs, handles etc are a minefield I prefer to avoid. I do Google quite a lot... amazing how many dead ends you reach.
    I have occasionally tried to figure...
  10. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    You guys know so much you've forgotten what it's like to not know. I can't get anything from your replies, sorry to say.
    Too much info, too complex, not specific with an example of usage for just...
  11. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    Going back to much earlier message when fafalone showed these examples

    ret = FtpSetCurrentDirectory(hFTP,...
    ret = FtpGetFile(hFTP,..
    ret = FtpPutFile(hFTP, ...
    ret = FtpDeleteFile(hFTP,......
  12. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    Apologies but ERROR_ACCESS_DENIED is undefined here.
    I haven't got mApiErr2.zip (if needed?) as something there was user-undefined also.
    Everythings's working nicely, but even better to show what...
  13. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    I really don't want to seem ungrateful for your help, but I was unable to try your code. When when I copied it in some of it stayed Red.
    Now I'm committed to using fafalones code and it's working....
  14. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    Had some trouble figuring out your last msg fafalone. If I don't use/need mApiErr2.bas why pass Err.LastDllError to it ?
    And I'm not sure what you mean by "Make Blocks"
    Can Err.LastDllError...
  15. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    I see what you mean! Do I add mApiErr3.bas into the project?
    At the moment Declare Function FormatMessageW is giving User defined type not defined.
    And I presume Err.LastDllError is passed as...
  16. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    Is there a list of definitions for Err.LastDllError ? I tried Err.description but that was empty.
  17. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    I am indeed an amateur, what you think I might know - I only know one tenth of. And API knowledge is zero or less.
    But I do know what I want to achieve, and thanks to the forum and fafalone in...
  18. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    Thanks again fafalone. I had to guess at the construction of the line starting ret=FTPGetFile.... but managed it.
    I presume its similar command to delete and Rename via FTP. Would you have them ?
  19. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    More Success :)
    I had to change Public Declare to Private and apply the Passive flag. Now it is working 100% thanks to you.
    But 2 more questions if I may - what is the instruction to Send a file -...
  20. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    Congrats fafalone! This is now connecting... now starts soime other things to sort.
    I attempted to get a file in the root folder and was told
    150 Opening data channel for file download from...
  21. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    ahhh was the Overflow because my port number was too large?
    I changed it to 21 (which won;t work) and it continued without crashing finally showing
    ret=0, lastErr=6
  22. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    I'll use anything that works, but I haven't the knowledge to create it myself, hence asking here.
    Fafalone I've added a new project as you advised. When run, I get an Overflow error on the line...
  23. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    I copied all the code you gave me, some of it stayed red meaning some kind of problem. Is yours ok if you do the same thing?
    Until it compiled I can't run it.
  24. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    But your code (the class) would not compile.
  25. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    I don't know how to resolve this, but I remmed out that line and now get User -deifined type not defined on
    Public Declare Function InternetConnect Lib "wininet" Alias "InternetConnectA" (ByVal...
  26. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    That's resolved that one but the same error now on
    SECURITY_IGNORE_ERROR_MASK = (INTERNET_FLAG_IGNORE_CERT_CN_INVALID Or INTERNET_FLAG_IGNORE_CERT_DATE_INVALID Or SECURITY_FLAG_IGNORE_UNKNOWN_CA Or...
  27. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    All done but on running error "Constant Expression Required" on line
    INTERNET_FLAG_TRANSFER_ASCII = FTP_TRANSFER_TYPE_ASCII ' 0x00000001
  28. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    Well I'm newly 74 and have no tutor!
    Thanks fafalone, I've put your Code into Sub Main and everything else into the declarations area of Module 1 . Ok so Far?
    But now some guesswork, I change ...
  29. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    Thanks anyway nebelem, I really wanted something that worked not something that needed work. You're right about learning API but I'm just too old!
  30. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    Yes I did, fafalone. It ran up without errors and showed the Form but couldn't get it to connect to the FTP server.
  31. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    I haven't got a project, just a new VB6 with the two components from you. Maybe it's time to call it quits ?
  32. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    Are you using VB6? The class module won't compile here.
    But if it did I cannot see what the startup object is?
  33. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    I appreciate the help but I'm not getting very far. I copied the code into a new class module but several lines at the start didn't compile (stayed red).
    My experience with VB6 isn't sufficient to...
  34. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    nebelm, is that code I should be able to run ?
  35. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    Thanks, I was setting sHost to the IP numbers as you showed. Suspect problem may be dwServiceType As Internet_Service_Type = INTERNET_SERVICE_FTP
    As that says User-defined type not defined.
  36. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    I'm having a bit of trouble entering data for line 1, and getting an overflow error so have done something wrong...
    I have a IP address (numbers), user, Pass and Port number. Could you show how...
  37. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    Yes indeed with CuteFTP. I am using XP although could (probably) compile and try with Win 10 if that may be an issue.
  38. Replies
    108
    Views
    4,913

    Re: FTP with vb6

    I downloaded FTP-revised2.zip and ran it but again, nothing.
    Would it be a missing Port number,tried :number after the address but didn't help
    In case anyone knows, I'm looking to Get/Put just the...
  39. Replies
    108
    Views
    4,913

    FTP with vb6

    Their seems a lot about this but I haven't found anything definitive, and it's easy to get lost.

    I did try the code in Msg 5 here...
  40. Replies
    15
    Views
    1,278

    Re: Edit ListView SubItem

    @fafalone if you were developing something, how's progress ?
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width