Jump to content
Sign in to follow this  

Object for searching a file

Recommended Posts

Hey guys,

in my GUI, i want an object for searching files and then put the path in an input field that i can use it further.

It works but how can i use the path?

$F1 = ObjCreate("CompatUI.SelectFile.1")
$F1_ctrl = GUICtrlCreateObj($F1, 40, 136, 374, 23)oÝ÷ Ù»­jëh×6MSG(0, "asd", GUICtrlRead($F1_ctrl))

doenst work.

pls help me, j9nes

Share this post

Link to post
Share on other sites

You're trying to interact with the COM control in a non-COM manner. You need to continue using COM methods and properties in order to get what you want out of the FileSelect class. I have never used the Program Compatibility Controls, though, so I can't help you with the specifics. But I do have a question. I'm not sure I understand why you're using this approach to create a file selection control, though. Why not just use common controls like an input box, button, and label, and hook them together with a FileOpenDialog()?

Something like this, triggered by a button or something:

$var = FileOpenDialog($message, @WindowsDir & "\", "Images (*.jpg;*.bmp)", 1 + 4 )

If @error Then
    MsgBox(4096,"","No File(s) chosen")
    $var = StringReplace($var, "|", @CRLF)
    MsgBox(4096,"","You chose " & $var)


(Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...