Hi,thanks for motivating me.(Last time I gave myhomework to somebodyelse,bu t that is not good approach to learn.)I tried everything n learnt lot.But I have on doubt,plz tell me how to compile OCX.(I am creating HTTP File Upload OCX in VB6.0).Thanking you.
how to compile OCX
Collapse
X
-
Tags: None
-
From the file menu find the option Make OCX.
It will compile the code and create the ocx file for you. -
Originally posted by debasisdasFrom the file menu find the option Make OCX.
It will compile the code and create the ocx file for you.
sorry,not getting.Plz tell me again in brief.I have'nt created an OCX before.Comment
-
Originally posted by suvarna1026sorry,not getting.Plz tell me again in brief.I have'nt created an OCX before.Comment
-
Originally posted by debasisdasHave you written the code for the OCX ?
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
downloadCancele d = False 'Set initially to False
remoteFileSize = GetHTTPFileSize (remoteFileName )
sData = String(BUFFER_S IZE, 0)
nFileHandle = FreeFile
hConnect = InternetConnect (hInternet, "", INTERNET_DEFAUL T_HTTP_PORT, "", "", INTERNET_SERVIC E_HTTP, 0, 0)
If hConnect = 0 Then
GetHTTPErrorInf o
RaiseEvent DownloadErrorHT TP(HDC_ERROR_RE MOTE_OPENFILE_F AILED, HDC_REMOTE_OPEN FILE_FAILED, httpErrorCode, httpErrorString )
UploadFileHTTP = False
Exit Function
End If
hRequest = HttpOpenRequest (hConnect, "", "", Null, Null, Null, INTERNET_FLAG_R ELOAD, 0)
Open localFileName For Binary Access Write As nFileHandle
nLOF = LOF(nFileHandle ) + 1
nRet = InternetWriteFi le(hConnect, sData, BUFFER_SIZE, lWritten)
Close nFileHandle
InternetCloseHa ndle hConnect
End FunctionComment
-
Originally posted by debasisdasHave you written the code for the OCX ?Comment
-
Compile the code (refer post #2).
Include the OCX in another standard EXE project and check if it works.Comment
-
Originally posted by debasisdasCompile the code (refer post #2).
Include the OCX in another standard EXE project and check if it works.Comment
-
Originally posted by Swanhey I got d point.I choose standerd EXE instead ActiveEXE.Now ok.I got d option make ocx.But I am getting error as "Error accessing System registry".
That is OK but
Why this duplicate ID ???Comment
-
Originally posted by debasisdasThat is OK but
Why this duplicate ID ???Comment
Comment