Welcome to dbFreaks.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

question about simple array

 
   Database Help (Home) -> Visual Basic RSS
Related Topics:
sql query returns in wrong format - Hi, Hope someone can help me with this. I have MS SQL 2000 database where i have Table and there a column wich is data type All data in this column is in form So why when i run .asp page with simple query to..

arrays - is there a way to the contents of an array (looping through the array) and storing each item in a comma delimited string? Thanks!

DataReport PageBreak - Hi everyone, I would like to know how to force pagebreak in a for example after 5 records printed. Thank you all

Possible Use of a Cursor - I have a complex query that I hope I can explain it well enough for everyone to I have a table that contains for work Contained in the table are these are groupings of machining

Scroll Bars - Is there a way to find the size of on a system using Visual Basic 6.0? I know how to look and change them on the display but I don't know how to access that from within Visual Basic.
Next:  Best way...  
Author Message
asd987

External


Since: May 05, 2004
Posts: 3



(Msg. 1) Posted: Thu Feb 10, 2005 9:40 am
Post subject: question about simple array
Archived from groups: comp>lang>basic>visual>database (more info?)

Hello,

I'm looking for the best way to give an user the possiblity to search in
multiple directories for certain photos. I was thinking about using an array
to do so. This is the Command1_Click - code below.

## ---

Private Sub Command1_Click()
' create an array containing the content of
' two directories

Dim MyVar(), MaxItems As Integer

File1.Path = "c:\my documents\photo-archive1"
File2.Path = "c:\my documents\photo-archive2"
File1.Pattern = "*.jpg"
File2.Pattern = "*.jpg"

MaxItems1 = File1.ListCount
MaxItems2 = File2.ListCount
Let MaxItems = MaxItems1 + MaxItems2

For i = 0 To MaxItems1 - 1
MyVar(i) = File1.List(i)
Next i

For i = 0 To MaxItems2 - 1
MyVar(i) = File2.List(i)
Next i

End Sub

## ---

After this the desired information must be presented. I want to do this in a
ListBox. The user can type in a Text-field (parts of) the name of the photos
he is looking for. The filenames are displayed and by clicking them the
corresponding photo must be shown.

## ---

Private Sub Text1_Change()
' display that selection of the array that
' corresponds with "*" & Text1.Text & "*.jpg"
' use a ListBox (List1.AddItem)


End Sub

## ---

Now I don't know how to write the Text1_Change-code for the selection part.
Perhaps there is a much more easier way for this?

Thanks,

Sjoerd

 >> Stay informed about: question about simple array 
Back to top
Login to vote
Display posts from previous:   
   Database Help (Home) -> Visual Basic All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]