Have you written the code for the OCX ?
Yes.First I searched what is it,I used API's n user control.I m posting my eritten code.
Public Function UploadFileHTTP(ByVal localFileName As String, ByVal remoteFileName As String) As Integer
'On Error Resume Next
Dim nRet As Integer
Dim nFileHandle As Integer
Dim sData As String
Dim lWritten As Long
Dim hConnect As Long
Dim hsend As Long
Dim nLOF As Long
Dim remoteFileSize As Long
Const BUFFER_SIZE = 1000
downloadCanceled = False 'Set initially to False
remoteFileSize = GetHTTPFileSize(remoteFileName)
sData = String(BUFFER_SIZE, 0)
nFileHandle = FreeFile
hConnect = InternetConnect(hInternet, "", INTERNET_DEFAULT_HTTP_PORT, "", "", INTERNET_SERVICE_HTTP, 0, 0)
If hConnect = 0 Then
GetHTTPErrorInfo
RaiseEvent DownloadErrorHTTP(HDC_ERROR_REMOTE_OPENFILE_FAILED , HDC_REMOTE_OPENFILE_FAILED, httpErrorCode, httpErrorString)
UploadFileHTTP = False
Exit Function
End If
hRequest = HttpOpenRequest(hConnect, "", "", Null, Null, Null, INTERNET_FLAG_RELOAD, 0)
Open localFileName For Binary Access Write As nFileHandle
nLOF = LOF(nFileHandle) + 1
nRet = InternetWriteFile(hConnect, sData, BUFFER_SIZE, lWritten)
Close nFileHandle
InternetCloseHandle hConnect
End Function