Jump to content
Sign in to follow this  

Help with SelectFile

Recommended Posts


Is There any way except control* to use the data of that activex

i tried guictrlread but nothing

Does someone has any idea?

$fname = "Form1"
$Form1 = GUICreate($fname, 633, 447, 193, 125)
$Obj1 = ObjCreate("CompatUI.SelectFile.1")
$Obj1_ctrl = GUICtrlCreateObj($Obj1, 56, 56, 486, 93)

(And no fileopendialog)

Edited by vakis

Share this post

Link to post
Share on other sites

Hallo Vakis

; ===========================================
; Simple example to embed CompatUI.dll objects
; Selectfile example
; By Kåre Johansson 2008
; ===========================================
$GUI = GUICreate('Title', 633, 447, 193, 125)
$Obj = ObjCreate("CompatUI.SelectFile.1")
if Not Isobj($Obj) Then; check component state
  ConsoleWrite('Could not open com object' & @CRLF)
$Obj_ctrl = GUICtrlCreateObj($Obj, 56, 56, 486,23); Height is fixed to a maximum at 23
$Obj_Event = ObjEvent($Obj,"_UIEvent_"); role out an event handle
With $Obj; Create a component pool to initiate component
  .BrowseTitle = 'My Title'
  .BrowseInitialDirectory = 'C:\Windows\'
  .BrowseFilter = '*.Exe'
  .FileName = 'C:\Windows\notepad.exe'

While 1
Switch GUIGetMsg()
  Case 0
  Case -3
  ConsoleWrite($Obj.FileName & @CRLF); get the selected file
$Obj = 0; free component

; Only two events available to this object
Func _UIEvent_StateChanged($Long)
  ConsoleWrite('Evets - state changed:' & $Long & @CRLF)

Func _UIEvent_SelectionComplete()
  ConsoleWrite('Evets - SelectionComplete' & @CRLF)

Simple as that - The component holds 4 objects where Selectfile is one of the easy ones, read more at link:


Hope this helps

Kjactive ;)

Edited by kjactive

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.