By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,989 Members | 1,496 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,989 IT Pros & Developers. It's quick & easy.

Displaying contents of multiple files at the same time in different dialogue boxes

P: 1
[i]Hey. I need help with a certain problem I'm facing in VB6. I need to display the contents of multiple items in a listview.
The situation is this : Everytime i double-click on an item in a listview, a form containing a richtextbox or a dynamically created dialogue box should display the contents of the file. The problem is that i'm not able to view multiple files at the same time. So, is it possible to display a single form containing a richtextbox more than once or do i need to create a dynamic component to display the contents of the files like dynamically creating a new dialogue box everytime the user double clicks on the item ??
Nov 2 '06 #1
Share this Question
Share on Google+
1 Reply


P: 13
Hi there,

even in VB6 each form is already a class.
Knowing this, the solution is easy

Write a form handling the display of a single file.
Name could be frmDisplay.

Give the form some properties you need for initialization, e.g.
Dim mFilename As String
Public Property Set Filename(newValue As String)
mFilename = newValue
End Property

When clicking in the list box to display a file, create a new instance of your form class:

Dim newForm as frmDisplay
set newForm = New frmDisplay

'set custom properties
newForm.Filename = "C:\TEMP.TXT"

newForm.Show

Hope this helps...
Nov 7 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.