Re: Activex Sample
Posted: Tue Sep 09, 2008 6:37 pm
Yes! Fantastic.
Exclusive forum for HMG, a Free / Open Source xBase WIN32/64 Bits / GUI Development System
http://www.hmgforum.com/
Hola Luisluisvasquezcl wrote:do you have install openoffice?.
Code: Select all
/*
* MINIGUI - Harbour Win32 GUI library Demo
*
* Copyright 2002-2008 Roberto Lopez <harbourminigui@gmail.com>
* http://harbourminigui.googlepages.com/
* Activex Sample: Inspired by Freewin Activex inplementation by
* Oscar Joel Lira Lira (http://sourceforge.net/projects/freewin).
*/
#include "minigui.ch"
FUNCTION Main()
Public lOpen := .F.
define window win2 at 0,0 width 800 height 500 main
define button activex
row 10
col 10
width 80
caption "Click Here"
action modalactivex()
end button
end window
win2.center
win2.activate()
return nil
function modalactivex
DEFINE WINDOW Win1 ;
AT 0,0 ;
WIDTH 800 ;
HEIGHT 500 ;
TITLE 'HMG ActiveX Support Demo' ;
modal ;
ON PAINT ( Win1.Test.Width := Win1.Width - 28,;
Win1.Test.Height:= Win1.Height- 95 )
DEFINE MAIN MENU
POPUP "Test"
MENUITEM "Open file" ACTION Test()
MENUITEM "Close file" ACTION Win1.Test.Object:Navigate("about:blank")
SEPARATOR
MENUITEM "Exit" ACTION Win1.Release
END POPUP
END MENU
DEFINE LABEL LABEL_1
ROW 0
COL 10
WIDTH 80
HEIGHT 24
VALUE "Http:"
END LABEL
DEFINE TEXTBOX TEXT_1
ROW 0
COL 100
WIDTH 300
HEIGHT 24
VALUE ""
END TEXTBOX
DEFINE BUTTON BTN_1
ROW 0
COL 400
WIDTH 24
HEIGHT 24
CAPTION "Go"
ACTION Win1.Test.Object:Navigate( Win1.Text_1.Value )
END BUTTON
DEFINE ACTIVEX Test
ROW 30
COL 10
WIDTH 700
HEIGHT 380
PROGID "shell.explorer.2"
END ACTIVEX
END WINDOW
Center Window Win1
Activate Window Win1
RETURN NIL
Procedure Test()
local cFile := GetFile({{'Excel','*.xls'},;
{'Word','*.doc'},;
{'PowerPoint','*.ppt'},;
{'All files','*.*'}})
if Len( cFile ) > 0
Win1.Test.Object:Navigate( cFile )
//Win1.Title := Win1.Test.Object:Document:Name
else
Win1.Test.Object:Navigate( "about:blank" )
endif
Return