elimiz
جمعه 09 دی 1390, 17:31 عصر
سلام دوستان
سورس زیر کارش اینه که ایدی های انلاین شده در کامپیوتر رو در یک فایل متنی ذخیره میکنه
حالا من میخوام که بجای ذخیره در فایل متنی. اون رو در text1 روی فرمم نشون بده و اینکه برنامه بعد از نمایش بسته نشه.
Private Sub Dir1_Change()
End Sub
Private Sub Form_Load()
Dim a As New FileSystemObject
Dim t As New FileSystemObject
Dim tt As TextStream
Set tt = t.OpenTextFile("Info.txt", ForWriting, True)
Dim msgpath As String
msgpath = ":\Program Files\Yahoo!\Messenger\Profiles"
Dim ds(25) As String
ds(0) = "B"
ds(1) = "C"
ds(2) = "D"
ds(3) = "E"
ds(4) = "F"
ds(5) = "G"
ds(6) = "H"
ds(7) = "I"
ds(8) = "J"
ds(9) = "K"
ds(10) = "L"
ds(11) = "M"
ds(12) = "N"
ds(13) = "O"
ds(14) = "P"
ds(15) = "Q"
ds(16) = "R"
ds(17) = "S"
ds(18) = "T"
ds(19) = "U"
ds(20) = "V"
ds(21) = "W"
ds(22) = "X"
ds(23) = "Y"
ds(24) = "Z"
For di = 0 To 25
If a.FolderExists(ds(di) & msgpath) = True Then
Dim b As New FileSystemObject
Dir1.Path = ds(di) & msgpath
For i = 0 To Dir1.ListCount - 1
List1.AddItem Mid(Dir1.List(i), Len(msgpath) + 3, Len(Dir1.List(i)))
If List1.List(i) = "Archive" Then List1.RemoveItem i
Next i
'tt.WriteLine "**** Yahoo! Messanger Information ****"
'tt.WriteLine "Programmer : Seyed Mahmood Abotorabi"
'tt.WriteLine "Yahoo! ID : hasht.rood"
'tt.WriteLine "Email : abotorabi@gmail.ir"
'tt.WriteLine "Website : www.facebox.ir"
'tt.WriteLine "|||||||||||||||||||||||||||||||||||||||||||||||||| ||||||||||||||||||||||||||||||||||||||||||"
'tt.WriteLine "Yahoo Messanger Path: " & ds(di) & Mid(msgpath, 1, Len(msgpath) - 9)
'tt.WriteLine "Profiles:"
For i = 0 To List1.ListCount - 1
tt.WriteLine List1.List(i)
Next i
tt.Close
MsgBox "Information Saved To Info.Txt", vbInformation, "Information"
'End
End If
Next di
tt.WriteLine "Sorry.Yahoo Messanger Not Found In This Computer!"
tt.WriteLine "www.facebox.ir"
tt.Close
MsgBox "Sorry.Yahoo Messanger Not Found In This Computer!", vbInformation, "Information"
End
End Sub
Private Sub List1_Click()
End Sub
سورس زیر کارش اینه که ایدی های انلاین شده در کامپیوتر رو در یک فایل متنی ذخیره میکنه
حالا من میخوام که بجای ذخیره در فایل متنی. اون رو در text1 روی فرمم نشون بده و اینکه برنامه بعد از نمایش بسته نشه.
Private Sub Dir1_Change()
End Sub
Private Sub Form_Load()
Dim a As New FileSystemObject
Dim t As New FileSystemObject
Dim tt As TextStream
Set tt = t.OpenTextFile("Info.txt", ForWriting, True)
Dim msgpath As String
msgpath = ":\Program Files\Yahoo!\Messenger\Profiles"
Dim ds(25) As String
ds(0) = "B"
ds(1) = "C"
ds(2) = "D"
ds(3) = "E"
ds(4) = "F"
ds(5) = "G"
ds(6) = "H"
ds(7) = "I"
ds(8) = "J"
ds(9) = "K"
ds(10) = "L"
ds(11) = "M"
ds(12) = "N"
ds(13) = "O"
ds(14) = "P"
ds(15) = "Q"
ds(16) = "R"
ds(17) = "S"
ds(18) = "T"
ds(19) = "U"
ds(20) = "V"
ds(21) = "W"
ds(22) = "X"
ds(23) = "Y"
ds(24) = "Z"
For di = 0 To 25
If a.FolderExists(ds(di) & msgpath) = True Then
Dim b As New FileSystemObject
Dir1.Path = ds(di) & msgpath
For i = 0 To Dir1.ListCount - 1
List1.AddItem Mid(Dir1.List(i), Len(msgpath) + 3, Len(Dir1.List(i)))
If List1.List(i) = "Archive" Then List1.RemoveItem i
Next i
'tt.WriteLine "**** Yahoo! Messanger Information ****"
'tt.WriteLine "Programmer : Seyed Mahmood Abotorabi"
'tt.WriteLine "Yahoo! ID : hasht.rood"
'tt.WriteLine "Email : abotorabi@gmail.ir"
'tt.WriteLine "Website : www.facebox.ir"
'tt.WriteLine "|||||||||||||||||||||||||||||||||||||||||||||||||| ||||||||||||||||||||||||||||||||||||||||||"
'tt.WriteLine "Yahoo Messanger Path: " & ds(di) & Mid(msgpath, 1, Len(msgpath) - 9)
'tt.WriteLine "Profiles:"
For i = 0 To List1.ListCount - 1
tt.WriteLine List1.List(i)
Next i
tt.Close
MsgBox "Information Saved To Info.Txt", vbInformation, "Information"
'End
End If
Next di
tt.WriteLine "Sorry.Yahoo Messanger Not Found In This Computer!"
tt.WriteLine "www.facebox.ir"
tt.Close
MsgBox "Sorry.Yahoo Messanger Not Found In This Computer!", vbInformation, "Information"
End
End Sub
Private Sub List1_Click()
End Sub