Quantcast
Viewing all articles
Browse latest Browse all 27061

transferring large numbers of listview items to textbox is crashing program

What I am doing is trying to take the items in a listview and throw them in a textbox when you click a button. However there is often a large number of items in the listview (~1000), and when I run the script to do the transfer, it crashes the program. It works with a small number of items though. Say under 100. Is there a limit to how many I can have in a listview? Is there a limit to the size of the multiline textbox? here is the code:

Code:

        Dim num As New Integer
        num = 0
        previewtextbox.AppendText(Main.holdbox.CheckedItems(num).Text)

        num = num + 1
        Do While num < Main.holdbox.CheckedItems.Count
            previewtextbox.AppendText(Environment.NewLine)

            previewtextbox.AppendText(Main.holdbox.CheckedItems(num).Text)

            num = num + 1
        Loop

Thanks, Victor.

Viewing all articles
Browse latest Browse all 27061

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>