Activex Sample

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
Rathinagiri
Posts: 5027
Joined: Tue Jul 29, 2008 6:30 pm
Location: Sivakasi, India
Has thanked: 75 times
Been thanked: 83 times
Contact:

Re: Activex Sample

Post by Rathinagiri » Tue Sep 09, 2008 6:37 pm

Yes! Fantastic. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
luisvasquezcl
Posts: 963
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Been thanked: 3 times
Contact:

Post by luisvasquezcl » Tue Sep 09, 2008 9:30 pm

Hi Esgici
do you have install openoffice?.
I Try to open a document .swx and i can not.
regards

User avatar
esgici
Posts: 4251
Joined: Wed Jul 30, 2008 9:17 pm
Location: iskenderun / Turkiye
Has thanked: 131 times
Been thanked: 42 times
Contact:

Post by esgici » Tue Sep 09, 2008 10:33 pm

luisvasquezcl wrote:do you have install openoffice?.
Hola Luis

Of course !

Without proper program IE does can't anything.

f.e. if MS-Office not installed we also can't open word, excel... etc files with Activex control.

In fact IE too calls appropriate program for open files.

Saludos

--

esgici
Viva INTERNATIONAL HMG :D

User avatar
Rathinagiri
Posts: 5027
Joined: Tue Jul 29, 2008 6:30 pm
Location: Sivakasi, India
Has thanked: 75 times
Been thanked: 83 times
Contact:

Post by Rathinagiri » Wed Sep 10, 2008 3:12 am

I am using OpenOffice.org 2.4 version. I can open .ods .odt (open document spreadsheet/text) easily.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
Rathinagiri
Posts: 5027
Joined: Tue Jul 29, 2008 6:30 pm
Location: Sivakasi, India
Has thanked: 75 times
Been thanked: 83 times
Contact:

Post by Rathinagiri » Wed Sep 10, 2008 7:46 am

When in modal window, the above sample gives error and breaks in the middle if nothing is opened and just closed. For example, compile the following code and enter the modal window by clicking "click here" and just close the window by either clicking [x] or clicking menu 'test -> exit'

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
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest