467,161 Members | 823 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,161 developers. It's quick & easy.

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

[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
  • viewed: 1100
Share:
1 Reply
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.

Similar topics

reply views Thread by Nick Zdunic | last post: by
2 posts views Thread by yanivoliver@gmail.com | last post: by
11 posts views Thread by dskillingstad@gmail.com | last post: by
3 posts views Thread by Ryan Ternier | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.