Private Sub Command1_Click()
Dim intFile As Integer '// Next available number for the Open statement
Dim ImageData As String '// Image contents
Dim Body As String '// Body contents
Dim Header As String '// Header contents
'// Get the image contents
imagepath = App.Path & "\" & "test.jpg" ' max 3mb image size limited
intFile = FreeFile
Open imagepath For Binary As #intFile
ImageData = String(LOF(intFile), Chr(0))
Get #intFile, , ImageData
Close #intFile
Body = "Content-Disposition: form-data; name=""fileupload""; filename=""" & vbCrLf
Body = Body & "Content-Type: multipart/form-data" & vbCrLf
Body = Body & vbCrLf & ImageData
Header = "Host: imageshack.us" & vbCrLf
Header = Header & "Content-Type: multipart/form-data & vbCrLf"
Header = Header & "Content-Length: " & Len(ImageData) & vbCrLf & vbCrLf
'upload now
Inet.Execute "http://www.imageshack.us", "POST", Body, Header
While Inet.StillExecuting
DoEvents
Wend
Dim s$, ret$
s = Inet.GetChunk(1024)
Do Until s = ""
ret = ret & s
s = Inet.GetChunk(1024)
Loop
'check upload completed
If InStr(1, ret, "Show Advanced Linking") > 0 Then MsgBox "upload completed"
End Sub
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
Your Code:
imagepath = App.Path & "\" & "test.jpg"
My Code:
imagepath = App.Path & "\test.jpg"
I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...
|Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |
Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...
Yes that is right, there is nothing more wrong with your code and I don't see why it won't run. Could you please post a working demo of your source code onto this thread, so that we can see if that is totally correct?
I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...
|Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |
Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...
Well I cannot get it to work, but with the source code that I could get to work. I added into it a message box, loading box. Which means that it will go on when it is loading, eg: visible = True and when it is not loading it will be visible = False.
I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...
|Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |
Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...