|
-
Oct 2nd, 2011, 08:28 PM
#1
Thread Starter
Addicted Member
[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
-
Oct 2nd, 2011, 09:49 PM
#2
Hyperactive Member
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
-
Oct 2nd, 2011, 10:03 PM
#3
Thread Starter
Addicted Member
Re: ListView datachanged ?
I`m beginner
can you make Code Example
when listview additems Command1_Click
Thank you very Much
-
Oct 2nd, 2011, 10:48 PM
#4
Hyperactive Member
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
-
Oct 2nd, 2011, 11:08 PM
#5
Thread Starter
Addicted Member
Re: ListView datachanged ?
Great thank you so Much
I have Different Question:
is there and Simple Easy Code for split Word
ML&R
-
Oct 2nd, 2011, 11:53 PM
#6
Thread Starter
Addicted Member
Re: [RESOLVED] ListView datachanged ?
its ok I search and found it here 
vb Code:
Private Sub Command1_Click() mystr = "vbforums.com/newthread.php?do=newthread&f=12345" MsgBox Mid$(mystr, InStr(1, mystr, "/", vbTextCompare), Len(mystr)) End Sub
Best Forums <3
-
Oct 3rd, 2011, 06:48 AM
#7
Hyperactive Member
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"
-
Oct 3rd, 2011, 10:04 AM
#8
Thread Starter
Addicted Member
Re: [RESOLVED] ListView datachanged ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|