Code:
uses WinInet, ComCtrls, Forms, Windows, SysUtils;
Code:
                                    while iBuffSize > 0 do
                                      Begin
                                        if iFileSize - iBytesWritten < iBuffWriteSize then
                                          Begin
                                            SetLength&#40;arrBuffer, iFileSize - iBytesWritten&#41;;
                                            iBuffWriteSize &#58;= iFileSize - iBytesWritten;
                                          end;

                                        BlockRead&#40;fLocalFile, arrBuffer&#91;0&#93;, iBuffWriteSize&#41;;

                                        if &#40;iBuffSize > 0&#41; and &#40;iBuffSize <= iBuffWriteSize&#41; then
                                          if not InternetWriteFile&#40;hRemoteFile, @arrBuffer, iBuffWriteSize, iBuffSize&#41; then
                                            Begin
                                              Result &#58;= -7; // error writing file
                                              Break;
                                            end
                                          else
                                        else
                                          Begin
                                            Result &#58;= 1; // end of file
                                            Break;
                                          end;

                                        iBytesWritten &#58;= iBytesWritten + iBuffSize;

                                        ProgressBar.Position &#58;= iBytesWritten;
                                        Application.ProcessMessages;
                                      end;
thats probably the bit u need to focus on and i dont want to use components to do this for me