Re: Help: ORA_FFI and ORADLG.DLL library...
Date: 1997/11/13
Message-ID: <346AE5DC.E71D8A67_at_jameswatt.ac.uk>#1/1
LAU Chung Fun wrote:
>
> I want to more details about "cmdialog.vbx". Could you help me send me more
> information such as how to use and how to code? If using VBX, it doesn't
> need oradlg.dll, right?
>
Here's what I did - NB this only works with 16-bit Forms, 32-bit versions don't like VBXs. I still can't find a file requester as an ActiveX control. The code will run on Win95, but you'll need the 16-bit Forms runtime. I use V1.2 .
- Attach a VBX item to your block.
- Set 'VBX Control File' to 'cmdialog.vbx'.
- Set 'VBX Control Name' to 'CommonDialog'.
- Set 'VBX Control Value Property' to 'Filename'.
I use a function for file requester access:
------------------------------ 8>< --------------------------------
FUNCTION CALL_FR (def_path char := 'C:\',
def_ext char := '.TXT',
title char := 'File Request',
filter char := NULL,
def_file char,
savemode boolean := FALSE)
RETURN VARCHAR2 IS
retval varchar2(256) := NULL;
temp varchar2(10);
p1 varchar2(30);
filt varchar2(256) := null;
BEGIN
vbx.set_property('block.vbx_item','Action','0'); filt := filter;
if filt is not null then
filt := filter || '|';
end if;
filt := filt || 'All Files(*.*)|*.*';
vbx.set_property('block.vbx_item','DialogTitle',title);
vbx.set_property('block.vbx_item','InitDir',def_path);
vbx.set_property('block.vbx_item','Filename',def_file);
vbx.set_property('block.vbx_item','DefaultExt',def_ext);
p1 := vbx.get_property('block.vbx_item','Filename');
vbx.set_property('block.vbx_item','Filter',filt);
if savemode then
vbx.set_property('block.vbx_item','Action','2'); else
vbx.set_property('block.vbx_item','Action','1'); end if;
retval := vbx.get_property('block.vbx_item','Filename'); if upper(retval) = upper(p1) then
retval := null;
end if;
synchronize;
return retval;
END;
- 8>< -------------------------------- .. where 'block.vbx_item' needs to be replaced with your item name.
I think the cmdialog.vbx documentation is available someplace on the net but I can't remember where. Sorry.
Hope this helps.
Jamie Keir Received on Thu Nov 13 1997 - 00:00:00 CET
