Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. Protected Overrides Sub SetVisibleCore(ByVal value As Boolean)
  2.  
  3. If Not Me.IsHandleCreated Then
  4. Me.CreateHandle()
  5. value = False
  6. End If
  7. MyBase.SetVisibleCore(value)
  8. If (Environment.GetCommandLineArgs.Length > 1) Then
  9.  
  10. Dim s As String = Environment.GetCommandLineArgs(1)
  11.  
  12. Using sr As New StreamReader(s)
  13. While Not sr.EndOfStream
  14. Dim item As New ListViewItem
  15. item.SubItems.Add(sr.ReadLine())
  16. ListView3.Items.Add(item)
  17. End While
  18. End Using
  19. For I = 0 To ListView3.Items.Count - 1
  20. ListView3.Items(I).Text = CStr(I)
  21. Next
  22. End If
  23.  
  24. With ListView3.Items.Add(ListView3.Items.Count)
  25. .Subitems.Add(sr.ReadLine())
  26. End With
  27.  
  28. Protected Overrides Sub SetVisibleCore(ByVal value As Boolean)
  29. Static blnExecuted As Boolean
  30. If Not Me.IsHandleCreated Then
  31. Me.CreateHandle()
  32. value = False
  33. End If
  34. MyBase.SetVisibleCore(value)
  35. If (Environment.GetCommandLineArgs.Length > 1) Then
  36.  
  37. Dim s As String = Environment.GetCommandLineArgs(1)
  38. If blnExecuted = False Then
  39. blnExecuted = True
  40. Using sr As New StreamReader(s)
  41. While Not sr.EndOfStream
  42. Dim item As New ListViewItem
  43. item.SubItems.Add(sr.ReadLine())
  44. ListView3.Items.Add(item)
  45. End While
  46. End Using
  47. For I = 0 To ListView3.Items.Count - 1
  48. ListView3.Items(I).Text = CStr(I)
  49. Next
  50. End If
  51.  
  52. Else
  53. openscriptfunc()
  54. End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement