Results 1 to 8 of 8

Thread: [RESOLVED] ListView datachanged ?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2010
    Posts
    159

    Resolved [RESOLVED] ListView datachanged ?

    is there any option like datachanged or Change for ListView
    I need make command when listview change items

    Note : listview invisible so it`s can`t change manual items or click on it

    thankx

  2. #2
    Hyperactive Member
    Join Date
    Sep 2009
    Location
    Lost in thought
    Posts
    349

    Re: ListView datachanged ?

    If there can not be changes by the user,
    then you'll be doing all the changes in you code,
    so you must know when a change has happened.

    To put all changes in one place do like this
    Code:
    Public Sub AddTolistview(Info1, Info2)
    make_command
       listview1 ............
    End Sub
    
    Public Sub DeleteFromlistview(Info1, Info2)
    make_command
       listview1................
    End Sub
    I have dun this to a text box b4
    Code:
    Public Sub AddText(TheText As String)
     Text1 = Text1 & TheText & vbNewLine
     Command3.Enabled = False
     Command5.Enabled = True
     playsound (thisSoundFile)
    End Sub

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2010
    Posts
    159

    Re: ListView datachanged ?

    I`m beginner
    can you make Code Example
    when listview additems Command1_Click

    Thank you very Much

  4. #4
    Hyperactive Member
    Join Date
    Sep 2009
    Location
    Lost in thought
    Posts
    349

    Re: ListView datachanged ?

    Code:
    Private Sub Command3_Click()
       ' Add names to column 1.
    AddNameTo ListView1, 1, "Mary" 
    'this is the same as [Set itmX= ListView1.ListItems.Add(1, "Mary", "Mary")]
    End Sub
    
    Public Sub AddNameTo(ThisListView As ListView, TheColumn As Long, Name As String)
    makeYour_command
          Dim itmX As ListItem
       Set itmX = ThisListView.ListItems.Add(TheColumn, Name, Name)
    End Sub
    .

    The answer to your question is Here
    And here
    C:\Program Files\Microsoft Visual Studio\MSDN98\98VSa\1033\SAMPLES\VB98

    Please go to the "Thread Tools" menu at the top of this Thread, and click "Mark Thread Resolved" when you have your answer.
    So I can fine the answer when I need it.

    how to stop the playsound when it is in loop..Play more than 1 sound at a time..
    ini file Check if IP changed Strings 'Split', 'Left' and 'Right'
    Save And Load an Array of list-boxes, to and from a file......list-box and CommonDialog
    Quote Originally Posted by RobDog888

    So please install VB6 service pack 6 as its the latest and last supported service pack MS will ever make.
    http://support.microsoft.com/kb/q198880/ I'm sure this will fix your issue
    The only reason some people get lost in thought is because it’s unfamiliar territory. —Paul Fix

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Nov 2010
    Posts
    159

    Re: ListView datachanged ?

    Great thank you so Much

    I have Different Question:
    is there and Simple Easy Code for split Word

    ML&R

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Nov 2010
    Posts
    159

    Re: [RESOLVED] ListView datachanged ?

    its ok I search and found it here
    vb Code:
    1. Private Sub Command1_Click()
    2. mystr = "vbforums.com/newthread.php?do=newthread&f=12345"
    3. MsgBox Mid$(mystr, InStr(1, mystr, "/", vbTextCompare), Len(mystr))
    4. End Sub
    Best Forums <3

  7. #7
    Hyperactive Member
    Join Date
    Sep 2009
    Location
    Lost in thought
    Posts
    349

    Re: [RESOLVED] ListView datachanged ?

    Here is some info on 'Split', 'Left' and 'Right'
    Code:
    Dim AnyString As String, MyStr As String
    AnyString = "Hello World"   ' Define string.
    MyStr = Left(AnyString, 1)   ' Returns "H".
    MyStr = Left(AnyString, 7)   ' Returns "Hello W".
    MyStr = Left(AnyString, 20)   ' Returns "Hello World".
    
    MyStr = Right(AnyString, 1)   ' Returns "d".
    MyStr = Right(AnyString, 6)   ' Returns " World".
    MyStr = Right(AnyString, 20)   ' Returns "Hello World".
    
    MyStr = Split(AnyString, " ")(0) ' Returns "Hello".
    MyStr = Split(AnyString, " ")(1) ' Returns "World"
    Dim AnyString As String, MyStr As String
    Dim MyStrArray() As String
    MyStrArray = Split(AnyString, " ") ' Returns MyStrArray(0) = "Hello",MyStrArray(0) = "World"
    Or, if you like
    Code:
    Dim MyStrArray() As String
    AnyString = "Hello/World"   ' Define string.
    MyStr = Split(AnyString, "/")(0) ' Returns "Hello".
    MyStr = Split(AnyString, "/")(1) ' Returns "World"
    
    
    MyStrArray = Split(AnyString, "/") ' Returns MyStrArray(0) = "Hello"
                                       '         MyStrArray(1) = "World"

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Nov 2010
    Posts
    159

    Re: [RESOLVED] ListView datachanged ?

    Cool Thank you

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