Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MultiSelect Dialog Stumper

Status
Not open for further replies.

MrMoocow

Programmer
May 19, 2001
380
US
Okay my user will be loaded up to 36 images, (whic are placed in a listbox as a path), andd making them click a button 36 times is a bit unrealistic. So I want a multiselect Common Dialog Show open, In other words you can select maybe 8 or nine at a time. I have seen this in other programs.

I would rather not use dir list boxes and such, as that gives the program a really "dated" look.


MoO? Brad,
Free mp3 player,games and more.
 
Another Question,

Active X controls can be put in websites right? Well how to you pass a varable to them? I need to pass the path to a binary file, so that then the program err control can get images out of it.

How hard is this? Brad,
Free mp3 player,games and more.
 
From one of my old programs

With CommonDialog1
.DialogTitle = App.Title & " - Open"
.FileName = vbNullString
.Filter = sFileFilter
.MaxFileSize = 32767
.Flags = cdlOFNAllowMultiselect _
Or cdlOFNLongNames _
Or cdlOFNExplorer _
Or cdlOFNFileMustExist _
Or cdlOFNHideReadOnly _
Or cdlOFNNoReadOnlyReturn _
Or cdlOFNPathMustExist
.ShowOpen
sReturnedString = .FileName
End With

sFileArray = Split(sReturnedString, vbNullChar)
if ubound(sfilearray)>0 then
' the sfilearray(0) will hold the foldername
' and the succeeding elements will hold the
' individual filenames
else
' the first element should hold the full path of
' the selected file
 
Using Active X controls in IE could give a problem, if theire not digisigned IE will not download it.
I changed IE security settings on an NT machine but IE still did not want to download my control.

About passing variables see the code below:

<SCRIPT language=VBScript>
sub window_onload()
on error resume next
calDate.Month = DatePart(&quot;m&quot;,Now())
calDate.Year = DatePart(&quot;y&quot;,Now())
calDate.Value = Date()
end sub
</SCRIPT>

<OBJECT classid=&quot;clsid:8E27C92B-1264-101C-8A2F-040224009C02&quot; id=calDate codeBase= name=calDate>
<PARAM NAME=&quot;_Version&quot; VALUE=&quot;524288&quot;>
<PARAM NAME=&quot;_ExtentX&quot; VALUE=&quot;7938&quot;>
<PARAM NAME=&quot;_ExtentY&quot; VALUE=&quot;5292&quot;>
<PARAM NAME=&quot;_StockProps&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;Year&quot; VALUE=&quot;1999&quot;>
<PARAM NAME=&quot;Month&quot; VALUE=&quot;1&quot;>


In this case variables are passed both by PARAM NAME tag ass well as setting the Month Year Value property by vbScript (you have to set the id in the OBJECT tag)
 
Your OCX is an ActiveX control, hence harmmeijer's comments should be borne in mind.
 
Arg, sorry was at school, so I was hurring.

My OCX does not use any other controls (well I think maybe some Windows Common ones...). The multiselect is for a program to compile files, that needs to be reference to my control.

Thanks for tthe info. Brad,
Free mp3 player,games and more.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top