Results 1 to 2 of 2

Thread: More vbCode Problems

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    More vbCode Problems

    Glad to see that you fixed the extra line-feed problem. However, now it kills double-spaced lines when they're supposed to be there:

    Code:
    Option Explicit
    
    Private Sub cmdDown_Click()
      If List1.ListIndex = -1 Then List1.ListIndex = 0
      If List1.ListIndex <> List1.ListCount - 1 Then
        List1.ListIndex = List1.ListIndex + 1
      End If
    End Sub
    
    Private Sub cmdUP_Click()
      If List1.ListIndex = -1 Then List1.ListIndex = 0
      If List1.ListIndex <> 0 Then
        List1.ListIndex = List1.ListIndex - 1
      End If
    End Sub
    
    Private Sub Form_Load()
    Dim i As Integer
    
      For i = 0 To 50
        List1.AddItem "Item #" & i
      Next
    End Sub
    becomes...:

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub cmdDown_Click()
    4.   If List1.ListIndex = -1 Then List1.ListIndex = 0
    5.   If List1.ListIndex <> List1.ListCount - 1 Then
    6.     List1.ListIndex = List1.ListIndex + 1
    7.   End If
    8. End Sub
    9.  
    10. Private Sub cmdUP_Click()
    11.   If List1.ListIndex = -1 Then List1.ListIndex = 0
    12.   If List1.ListIndex <> 0 Then
    13.     List1.ListIndex = List1.ListIndex - 1
    14.   End If
    15. End Sub
    16.  
    17. Private Sub Form_Load()
    18. Dim i As Integer
    19.  
    20.   For i = 0 To 50
    21.     List1.AddItem "Item #" & i
    22.   Next
    23. End Sub
    My evil laugh has a squeak in it.

    kristopherwilson.com

  2. #2
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    I dont get it, why is teh vbcode tag not working properly?
    the space thingie is fixed but it's now indenting it wrong Did they change anything in the scripts stuff? why would they want to change the vbcode tag?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

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