I'm just not seeing the bug here, but my progress bar doesn't display....
The progress bar is added in winmain to the main dialog, in fact two of them are...
Preciate another set of eyes, buying this house has stressed me out some, I'm just keeping busy on this...
-------------
Scott
mailto:[email protected][email protected]</A>
The progress bar is added in winmain to the main dialog, in fact two of them are...
Code:
%IDPROGRESS = %WM_USER + 902 %IDTOTALPROGRESS = %WM_USER + 903 'In Winmain Control Add "msctls_progress32",hDlg,%IDPROGRESS,"",10,80,235,10, %WS_CHILD Or %WS_VISIBLE Or %WS_CLIPSIBLINGS Or %CCS_BOTTOM Control Add Label, hDlg, %IDLABEL5, "Total bytes transferred",10,90,75,12 Control Add Label, hDlg, %IDLABEL6, "12483292", 85,90,75,12 Control Add "msctls_progress32",hDlg,%IDTOTALPROGRESS,"",10,80,235,10, %WS_CHILD Or %WS_VISIBLE Or %WS_CLIPSIBLINGS Or %CCS_BOTTOM Function SendFile(FileSpec As String) As Long 'Use array later for FileList(x) Local l_Result As Long Local l_FileSize As Long Local x As Long Static l_TotalBytes As Long Static l_TotalBytesXferred As Long 'Will need to know ALL file sizes before sending first file for second progress bar... l_FileSize = GetSizeOfFile(FileSpec) 'This works, returns 1237 on test file If l_FileSize > 0 Then g_Result = EnableMenuItem(g_hMenu,%IDM_SEND, %MF_ENABLED) else Exit Function l_TotalBytes = l_TotalBytes + l_FileSize Control Set Text hDlg, %IDTOTALBYTES, "of " + Trim$(Str$(l_FileSize)) + " bytes" 'Total bytes *TO* send Control Set Text hDlg, %IDLABEL1,FileSpec Control Send hDlg, %IDPROGRESS, %PBM_SETRANGE, 0 ,MakLng(0,l_FileSize) Control Send hDlg, %IDPROGRESS, %PBM_SETSTEP, 1, 0 Control Send hDlg, %IDTOTALPROGRESS, %PBM_SETRANGE, 0 ,MakLng(0,l_TotalBytes) Control Send hDlg, %IDTOTALPROGRESS, %PBM_SETSTEP, 1, 0 g_Result = EnableMenuItem(g_hMenu,%IDM_SEND, %MF_GRAYED) For x = 1 To l_FileSize 'Add file xfer code here. Control Set Text hDlg, %IDBYTES, Ltrim$(Str$(x)) 'This part works Control Send hDlg, %IDPROGRESS, %PBM_STEPIT , 1, 0 'But not this... Control Send hDlg, %IDTOTALPROGRESS, %PBM_STEPIT , 1, 0 Next l_TotalBytesXferred = l_TotalBytesXferred + l_TotalBytes 'Total bytes *SENT* Control Set Text hDlg, %IDLABEL6,Trim$(Str$(l_TotalBytesXferred)) End Function
Preciate another set of eyes, buying this house has stressed me out some, I'm just keeping busy on this...
-------------
Scott
mailto:[email protected][email protected]</A>
Comment