Results 1 to 4 of 4

Thread: vBulletin Tool

  1. #1

    Thread Starter
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Thumbs up

    Here's the first release of my vBulletin Tool which formats for you the [code] blocks like this:

    Original code:
    Code:
    private sub Test(iCount as long)
       dim A as long
       
       'Sample loop
       for A = 0 to iCount
          'Draw lines
          pset (0, a), rgb(255, 0, 0)
          
          if a > 20 then: exit sub
       next
    end sub
    Code created by vBulletin tool:
    Code:
    Private Sub Test(iCount As long)
       Dim A As Long
       
       'Sample loop
       For A = 0 to iCount
          'Draw lines
          PSet (0, a), RGB(255, 0, 0)
          
          If a > 20 Then: Exit Sub
       Next
    End Sub
    Make sure you don't miss this free open-source tool to make your posts look better!

    Click here to download
    Last edited by Fox; Feb 12th, 2001 at 03:16 PM.

  2. #2
    Guest
    Great tool - thanks

  3. #3

    Thread Starter
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    Note that this is still a beta - I'll do some improvements soon..

    Test code:

    Code:
    Declare Function BitBlt Lib "gdi32" Alias "BitBlt" ( _
    	ByVal hDestDC As Long, _
    	ByVal X As Long, _
    	ByVal Y As Long, _
    	ByVal nWidth As Long, _
    	ByVal nHeight As Long, _
    	ByVal hSrcDC As Long, _
    	ByVal xSrc As Long, _
    	ByVal ySrc As Long, _
    	ByVal dwRop As Long) As Long
    Last edited by Fox; Feb 14th, 2001 at 05:26 AM.

  4. #4
    Guest
    Code:
    Private Sub cmdDownLoad_Click()
         On Error GoTo errHandler
         
         If ConnectedFlag = False Then
              MsgBox "No connection yet"
              Exit Sub
         ElseIf lisServerFiles.ListCount = 0 Then
              MsgBox "No server file listed yet"
              Exit Sub
         ElseIf Right(lisServerFiles.Text, 1) = "/" Then
              MsgBox "Selected item is a directory only." & vbCrLf & vbCrLf & _
                 "To list files under that dir, double click on it."
              Exit Sub
         End If
        
         lblStatus.Caption = "Retreiving file..."
         SerFilespec = Right(txbURL.Text, Len(txbURL.Text) - homeLen) & _
                   "/" & lisServerFiles.Text
         SerFilespec = Right(SerFilespec, Len(SerFilespec) - 1)
         
            ' Use same file name and store it in current dir of local. Parse
            ' above SerFilespec and take only the file name as LocFileSpec.
         LocFilespec = SerFilespec
         Do While InStr(LocFilespec, "/") <> 0
             LocFilespec = Right(LocFilespec, Len(LocFilespec) - _
                  InStr(LocFilespec, "/"))
         Loop
         
         If IsFileThere(LocFilespec) Then
              If MsgBox(LocFilespec & " already exist. Overwrite?", _
                   vbYesNo + vbQuestion) = vbNo Then
                   Exit Sub
              End If
         End If
         
         lblStatus.Caption = "Requesting for file size..."
         
         gFileSize = ""
         FileSizeFlag = True
         Inet1.Execute , "SIZE " & SerFilespec
         Do While Inet1.StillExecuting
              DoEvents
              If ConnectedFlag = False Then
                   Exit Sub
              End If
         Loop
             
         If gFileSize = "" Then
              MsgBox "Selected file has 0 byte content."
              Exit Sub
         Else
              If MsgBox("File size is " & gFileSize & " bytes." & vbCrLf & vbCrLf & _
                      "Proceed to download?", vbYesNo + vbQuestion) = vbNo Then
                  Exit Sub
              End If
         End If
         
         DownloadFlag = True
         Inet1.Execute , "Get " & SerFilespec & " " & LocFilespec
         Do While Inet1.StillExecuting
              DoEvents
              If ConnectedFlag = False Then
                   Exit Sub
              End If
         Loop
    
         lblStatus.Caption = "Connected"
         File1.Refresh
         Exit Sub
         
    errHandler:
        If icExecuting Then
            If ConnectedFlag = False Then
                Exit Sub
            End If
            
            If MsgBox("Executing job. Cancel it?", vbYesNo + vbQuestion) = vbYes Then
                Inet1.Cancel
                If Inet1.StillExecuting Then
                    lblStatus.Caption = "System failed to cancel job"
                End If
            Else
                Resume
            End If
        End If
        ErrMsgProc "cmdDownLoad_Click"
    End Sub

    just testing...seams to look good (cepy my code )

Posting Permissions

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



Click Here to Expand Forum to Full Width