Results 1 to 13 of 13

Thread: - VB6

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered 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

  2. #2
    Registered abUser ike's Avatar
    Join Date: Jul:2004
    Location: sofi
    Posts: 4,965
    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
    VB .
    Have no fear ike iz here.
    CPU Cx486DLC@40MHz, RAM 4MB, VGA Trident 512KB, HDD Conner 160MB, Monitor 14" Color

  3. #3
    Registered User Septemvri's Avatar
    Join Date: Oct:2004
    Location:
    Posts: 1,561
    ASRock 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

  4. #4
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    , 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|

  5. #5
    Registered User
    Join Date: Apr:2004
    Location: EU
    Posts: 141
    VB6 :
    GUI/calling . VB6 .

    IBindStatusCallback OnProgress .
    OnProgress DoEvents UI-.

    - ... VB6 .

  6. #6
    Registered User
    Join Date: Nov:2008
    Location: Sofia, Mladost 3
    Posts: 311
    - .

  7. #7
    Registered 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)

  8. #8
    Registered User entium's Avatar
    Join Date: May:2003
    Location:
    Posts: 1,426
    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

  9. #9
    Registered User
    Join Date: Nov:2008
    Location: Sofia, Mladost 3
    Posts: 311


  10. #10
    Registered 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

  11. #11
    Registered User
    Join Date: Nov:2008
    Location: Sofia, Mladost 3
    Posts: 311
    type mismath URLDownloadToFile

    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
    "Me" .

  12. #12
    Registered 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 - .

  13. #13
    Registered User
    Join Date: Nov:2008
    Location: Sofia, Mladost 3
    Posts: 311
    error

    overflow

    ProgressBar1.Value = CInt(100 * (ulProgress / ulProgressMax))


    ..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |