Jump to content
xisto Community

iAlter

Members
  • Content Count

    7
  • Joined

  • Last visited

Posts posted by iAlter


  1. Hey, I am learning Visual Basic and it's pretty fun. Are you a programmer? Do you program? Here is some line of code from VB I made for an example:

    What you need

    | Name

    ListBox | List1

    TextBox | Text1

    TextBox | Text2

    Command Button | Command1

    Command Button | Command2

    Command Button | Command3

    Command Button | Command4

    -----------

    Actual Code:

    ---

    'Start Code

    Private Sub Command1_Click()

    'This will check if there is anything in Text1 and stop if there isn't, but if there is it will add the text in Text1 to the listbox

    If Text1.Text = vbNullString Then

    MsgBox "Please enter a value for the string to add!", vbInformation + vbOKOnly, "Error"

    Exit Sub

    End If

    List1.AddItem Text1.Text

    End Sub

     

    Private Sub Command2_Click()

    'This will remove the item in the listbox, if it is at an index

    If List1.ListIndex < 0 Then

    Exit Sub

    End If

    List1.RemoveItem List1.ListIndex

    End Sub

     

    Private Sub Command3_Click()

    'This will navigate to the item

    Dim i As Integer

    For i = 0 To List1.ListCount - 1

    If Text2.Text = List1.List(i) Then

    List1.ListIndex = i

    End If

    Next

    End Sub

     

    Private Sub Command4_Click()

    'This will remove the found item

    Dim i As Integer

    For i = 0 To List1.ListCount - 1

    If Text2.Text = List1.List(i) Then

    List1.RemoveItem i

    End If

    Next

    End Sub

     

    Private Sub Text1_Click()

    'Clears the textbox for the user's conveinance

    Text1.Text = vbNullString

    End Sub

     

    Private Sub Text2_Click()

    Text2.Text = vbNullString

    'Clears the textbox for the user's conveinance

    End Sub

    'End Code

     

    '----------------------


    The above code shows you how to loop through a listbox, to find/remove an item, and to check if a textbox has anything in it.

     

     

    OMG I AM SORRY! THIS IS THE WRONG FORUM!! PLEASE MOVE THIS

     

    Notice from KuBi:
    Moved from google chat. Added code tags, credits reduced.


  2. Hello,What do I think of Xisto?I love Xisto. Xisto is one of the best, next to ej.am. Not to be mean though. I like it... But what gets me is it's unorganized at the bottom there is so many links that get in my way. Please change this guys. I like the shoutbox being at the top of all pages though. And the thought of Xisto giving FREE hosting amazes me... I really need a host for my site and I can't find one. This is the place I need to be. Thanks for your services Xisto, I'll always be with you.. I hope.. Hopefuly I don't get suspended like I did at ej.am for no appearant reason. So everyone else, what do you think of Xisto?

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.