DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

common dialog

Hi again,
 
is there  in DIAdem (Dialog) such a function like common dialog?
I have a picture in one Dialog and I like to change it by clicking on the picture.
 
Does anybody know how to do that?
 
Thomas
0 Kudos
Message 1 of 10
(4,888 Views)
I don't know exactly what you mean, but here is a example for you.

Martin Bohm  
bohm@a3m.com

0 Kudos
Message 2 of 10
(4,858 Views)
Thanks Martin for your help, but this is not what I mean. Maybe I did explain it bad.
 
I looking for an option that gives me a frame like in Excel "File Open..."
I like to give the user of my script the option to change a picture, like he want's. I do not know which picture and I do not no where it is. So he has to look for it on his machine or server. In the moment do I do it by an Inputbox, so that he has to copy in the link ("C:\Pictures\.....)
 
I hope you understand now better 🙂
 
Thomas
0 Kudos
Message 3 of 10
(4,854 Views)
Sorry, I don't understand your problem. You can integrate a "file-select-dialog" for asking a filename and path of a image.  You can changing the content of image by setting the property "Picture1.Picture". All you've to do is creating a dialog with a empty (or invisible)  image, integrating a file-select-dialog and assigning the selection to Picture-property of the image.
0 Kudos
Message 4 of 10
(4,852 Views)
Thats it. I was looking for that 🙂
Thanks a lot

Message Edité par tom_the_dude le 07-12-2006 04:56 AM

0 Kudos
Message 5 of 10
(4,849 Views)

Hello,

with "FileDlgASCIIName" I can choose where the path will be saved. How can I declare for that just a variable?

Thomas

0 Kudos
Message 6 of 10
(4,789 Views)

Hi Tom,

It's not clear to me from your question what you're asking.  The variable "FileDlgASCIIName" is a parameter in the "FileNameGet()" command that specifies into which new ASCII file the "FileNameGet()" command will write the paths of the selected files in the dialog.  This is only useful when you want to implement a file dialog that enables multiple file selection.  The new ASCII file can be used as a DIAdem "List" file, or you can just read in the paths with standard VBScript File I/O functions.  Below you will find an example of the latter approach.  If you wanted something other than a working example of a multi-select file dialog, then please restate your question.

Regards,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 7 of 10
(4,768 Views)
Hello Brad,
 
I try to explain it again and better 😉
Like in your example when you choose a file, the function will always write the path in to a new file. In my case, I do not need that.
The user will always just choose one file. I have in my script already a variable which is suppost to contain a path for a picture. Now I will give the user the opportunity to choose a free picture. Instead that I have a new file with the path in it, I would be sufficient to have the path just in my variable.
 
I hope you understand now better.
 
Thomas
0 Kudos
Message 8 of 10
(4,756 Views)
Hello Thomas!

If you keep FileDlgASCIIName empty it will work. Just have a look on the following code.
Option Explicit
 
Call
FileNameGet(
"ANY", "FileRead", "C:\", "Image (*.bmp),*.bmp", "", "", "Select Image File")
 
If UCase(DlgState) =
"IDOK" Then
MsgBox
"Selected File: '" & FileDlgName & "'"
End If
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 9 of 10
(4,747 Views)
OK, the function is giving the path out through FileDlgName.
 
Great, thx
0 Kudos
Message 10 of 10
(4,742 Views)