I'm sorry, I figured it out FINALLY! This took me forever to get going. The code is below:
[code=vb]
Const scUserAgent = "vb wininet"
Const INTERNET_SERVIC E_FTP = 1
Const INTERNET_OPEN_T YPE_DIRECT = 1
Const INTERNET_FLAG_P ASSIVE = &H8000000
Const FTP_TRANSFER_TY PE_BINARY = 0
Const FILE_ATTRIBUTE_ ARCHIVE = &H20
Private Declare Function InternetOpen Lib "wininet.dl l"...
User Profile
Collapse
-
-
Need a little code tweak
Hey guys. I have this upload/download VB code that sort of works. When I run it, it will upload/download the file, but then it freezes and I need to close the app. Can anyone see why? I have the code below:
START DECLARES HERE:
[code=vb]
Private Declare Function InternetOpen Lib "wininet.dl l" Alias "InternetOp enA" (ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, ByVal... -
Should be easy enough. Just use the OPEN commands to edit the file. I usually bring in the whole file or use APPEND. Example below:
C:\TEST.BAT commands:
-------------------------------------
@ECHO OFF
CLS
CHDIR C:\TESTDIR
EXIT
Let's say you need a particular directory where "C:\TESTDIR " is located. Simply OPEN the file for INPUT as #1 and edit it:
THEBATCHFILE$...Leave a comment:
-
-
The best way to do what you want is to use SIN/COS functions. You can adjust the circle to do pretty much whatever you want. Give it a try. You will need to assign a value to PI. Also, use a FOR...NEXT loop for the actual 360 points on the circles. I have some code, but it's written in QB. You should be able to convert it to VB code quite easily. Let me know if you want it.Leave a comment:
-
Saving an embedded object to the hard drive
Hey all. I was wondering if there is a way to save an embedded object (OLE1) to the hard drive without clicking on it and doing it manually. I'm not too familiar with managing OLE objects in VB6, so any help would be appreciated. There are commands such as OLE1.Copy and OLE1.Move, but I'm not sure how to set them up. VB usually gives you that pop-up screen with suggestions as to what should come next, but nothing for these commands. Thanks in ad... -
FTP commands from VB6
Hey all. I found this awesome source code online that covers basically all of the wininet.dll function calls for FTP commands. It doesn't, however, actually work! lol The code is below:
Source - http://www.answers.com/topic/ftp-fun...cat=technology
[CODE=vb]Const FTP_TRANSFER_TY PE_UNKNOWN = &H0
Const FTP_TRANSFER_TY PE_ASCII = &H1
Const FTP_TRANSFER_TY PE_BINARY = &H2
Const INTERNET_DEFAUL T_FTP_PORT... -
Hey man. I use this one. It's easy and only 2 lines of code and actually works:
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Declare that function in your general area. Then, use this to show/hide in the form or button code:
Hide cursor - ShowCursor 0
Show cursor - ShowCursor 1 (or any non-zero value)
It's really that easy. If it doesn't...Leave a comment:
-
Upload using VB6
Hey guys. I need a little help uploading from VB6. I've done all of the leg work, but I need the last little bit of help. My current code is below:
[CODE=vb]Const INTERNET_SERVIC E_FTP = 1
Const INTERNET_OPEN_T YPE_DIRECT = 1
Const INTERNET_FLAG_P ASSIVE = &H8000000
Const FTP_TRANSFER_TY PE_BINARY = 0
Const FILE_ATTRIBUTE_ ARCHIVE = &H20
Private Declare Function InternetOpen Lib "wininet.dl l"... -
Upload a file using VB6
Hey all. I'm trying to figure out how to upload a file to a web server using VB6. I do not want to use FTP functions. I want to send it directly from the hard drive to the web server. I have seen plenty of methods using .NET, but I don't see any using VB6. I realize I will need to provide a user/pass to the web server to upload a file, so I'll need some way to do that. Any help would be greatly appreciated. I have been working on the issue for about...
No activity results to display
Show More
Leave a comment: