Results 1 to 13 of 13
Thread: - VB6
Hybrid View
-
1st November 2010 14:43 #1Registered User
Join Date: Nov:2008
Location: Sofia, Mladost 3
Posts: 311
- VB6
. , . , , , . , 30 20.
Code:Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long Private Sub Command2_Click() ProgressBar1.Visible = True If Text1.Text = "" Then Exit Sub Dim Download As Long Dim Url As String Dim FileLocation As String CommonDialog1.ShowSave FileLocation = CommonDialog1.FileName Url = Text1.Text Download = URLDownloadToFile(0, Url, FileLocation, 0, 0) If ProgressBar1 = Val(100) Then Text2.Text = CommonDialog1.FileName Else ProgressBar1 = Val(ProgressBar) + Val(10) End If End Sub Private Sub Form_Load() ProgressBar1.Visible = False End Sub
-
1st November 2010 16:02 #2VB .Code:
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long Private Sub Command2_Click() ProgressBar1.Visible = True If Text1.Text = "" Then Exit Sub Dim Download As Long Dim Url As String Dim FileLocation As String CommonDialog1.ShowSave FileLocation = CommonDialog1.FileName Url = Text1.Text Download = URLDownloadToFile(0, Url, FileLocation, 0, 0) End Sub Private Sub Form_Load() ProgressBar1.Visible = False End Sub
Have no fear ike iz here.
CPU Cx486DLC@40MHz, RAM 4MB, VGA Trident 512KB, HDD Conner 160MB, Monitor 14" Color
-
1st November 2010 16:38 #3ASRock Z77 Extreme4 | Intel Core i5-3570K @ 4.4 + Noctua NH-C14 | 2x 4GB Geil Evo Leggera 2133 C10 | 2x Gigabyte GTX 760 OC | G.Skill Phoenix Pro 60GB + Samsung 840 250GB + Hitachi Deskstar 500GB | Seasonic X-660 | CM HAF-X
AOC d2757Ph | MS Arc kbd | Cyborg R.A.T. 9 | Logitech G930
-
1st November 2010 17:17 #4
, GUI , , . callback , .
EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
1st November 2010 17:39 #5Registered User
Join Date: Apr:2004
Location: EU
Posts: 141
VB6 :
GUI/calling . VB6 .
IBindStatusCallback OnProgress .
OnProgress DoEvents UI-.
- ... VB6 .
-
3rd November 2010 13:04 #6Registered User
Join Date: Nov:2008
Location: Sofia, Mladost 3
Posts: 311
- .
-
3rd November 2010 13:36 #7Registered User
Join Date: Apr:2004
Location: EU
Posts: 141
olelib.tlb
:
:Code:Implements IBindStatusCallback Private Sub IBindStatusCallback_OnProgress(ByVal ulProgress As Long, ByVal ulProgressMax As Long, ByVal ulStatusCode As olelib.BINDSTATUS, ByVal szStatusText As Long) ProgressBar1.Min = 0 ProgressBar1.Max = 100 ProgressBar1.Value = CInt(100 * (ulProgress / ulProgressMax)) End Sub
Code:Download = URLDownloadToFile(Me, Url, FileLocation, 0&, Me)
-
3rd November 2010 13:42 #8
AsyncRead UserContro UserDocument
Code:http://support.microsoft.com/kb/200676
EP43-DS3|E5200@3.33|ASUS EN9800GT HB /HTDI/ 512MB|2X2GB 800MHZ CL5 A-DATA|WD2500JB|NEC 4750A|BELINEA 1980S2
-
3rd November 2010 16:26 #9Registered User
Join Date: Nov:2008
Location: Sofia, Mladost 3
Posts: 311
-
3rd November 2010 17:12 #10Registered User
Join Date: Apr:2004
Location: EU
Posts: 141
- :
Code:Sub IBindStatusCallback_GetBindInfo(grfBINDF As olelib.BINDF, pbindinfo As olelib.BINDINFO) End Sub Function IBindStatusCallback_GetPriority() As Long End Function Sub IBindStatusCallback_OnStartBinding(ByVal dwReserved As Long, ByVal pib As olelib.IBinding) End Sub Sub IBindStatusCallback_OnDataAvailable(ByVal grfBSCF As olelib.BSCF, ByVal dwSize As Long, pformatetc As olelib.FORMATETC, pstgmed As olelib.STGMEDIUM) End Sub Sub IBindStatusCallback_OnLowResource(ByVal reserved As Long) End Sub Sub IBindStatusCallback_OnObjectAvailable(riid As olelib.UUID, ByVal punk As stdole.IUnknown) End Sub Sub IBindStatusCallback_OnStopBinding(ByVal hresult As Long, ByVal szError As Long) End Sub
-
3rd November 2010 17:48 #11Registered User
Join Date: Nov:2008
Location: Sofia, Mladost 3
Posts: 311
type mismath URLDownloadToFile
"Me" .Code:Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long Dim Url As String Dim FileLocation As String Dim Download As Long Implements olelib.IBindStatusCallback Private Sub IBindStatusCallback_GetBindInfo(grfBINDF As olelib.BINDF, pbindinfo As olelib.BINDINFO) End Sub Private Function IBindStatusCallback_GetPriority() As Long End Function Private Sub IBindStatusCallback_OnDataAvailable(ByVal grfBSCF As olelib.BSCF, ByVal dwSize As Long, pformatetc As olelib.FORMATETC, pStgmed As olelib.STGMEDIUM) End Sub Private Sub IBindStatusCallback_OnLowResource(ByVal reserved As Long) End Sub Private Sub IBindStatusCallback_OnObjectAvailable(riid As olelib.UUID, ByVal pUnk As stdole.IUnknown) End Sub Private Sub IBindStatusCallback_OnStartBinding(ByVal dwReserved As Long, ByVal pib As olelib.IBinding) End Sub Private Sub IBindStatusCallback_OnStopBinding(ByVal hresult As Long, ByVal szError As Long) End Sub Private Sub IBindStatusCallback_OnProgress(ByVal ulProgress As Long, ByVal ulProgressMax As Long, ByVal ulStatusCode As olelib.BINDSTATUS, ByVal szStatusText As Long) ProgressBar1.Min = 0 ProgressBar1.Max = 100 ProgressBar1.Value = CInt(100 * (ulProgress / ulProgressMax)) End Sub Private Sub Command2_Click() ProgressBar1.Visible = True If Text1.Text = "" Then Exit Sub CommonDialog1.ShowSave FileLocation = CommonDialog1.FileName Url = Text1.Text FileLocation = Text2.Text Download = URLDownloadToFile(Me, Url, FileLocation, 0, Me) End Sub Private Sub Form_Load() ProgressBar1.Visible = False End Sub
-
3rd November 2010 20:28 #12Registered User
Join Date: Apr:2004
Location: EU
Posts: 141
:
Code:Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As IUnknown, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As IBindStatusCallback) As Long
Me - .
-
3rd November 2010 21:16 #13Registered User
Join Date: Nov:2008
Location: Sofia, Mladost 3
Posts: 311
error
overflow
ProgressBar1.Value = CInt(100 * (ulProgress / ulProgressMax))

..




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in