HMG ActiveX Support Demo

HMG Samples and Enhancements

Moderator: Rathinagiri

Post Reply
User avatar
hmgchang
Posts: 273
Joined: Tue Aug 13, 2013 4:46 am
Location: Indonesia

HMG ActiveX Support Demo

Post by hmgchang »

Hello, Iam IkChang, I am new to this forum still learning both this forum and hmg.

1. I have question regarding the InputBox function. I tried the one of the sample in
hmg.3.1.5/samples/controls\activex\ACTIVEX.1\demo1.prg : ( with adding msginfo( cAddress))

Code: Select all

/*
 * HMG - Harbour Win32 GUI library Demo
 *
 * Copyright 2002-2008 Roberto Lopez <mail.box.hmg@gmail.com>
 * http://www.hmgforum.com//" onclick="window.open(this.href);return false;
 * Activex Sample: Inspired by Freewin Activex inplementation by 
 * Oscar Joel Lira Lira (http://sourceforge.net/projects/freewin).
*/

#include "hmg.ch"

FUNCTION Main()

	DEFINE WINDOW Win1 ;
		AT 0,0 ;
		WIDTH 800 ;
		HEIGHT 500 ;
		TITLE 'HMG ActiveX Support Demo' ;
		MAIN 

		DEFINE MAIN MENU

			POPUP "Test"
				MENUITEM "Navigate" ACTION TestNavigate()
			END POPUP 			

		END MENU

		@ 10 , 50 ACTIVEX Test ;
			WIDTH 700  ;
			HEIGHT 400  ;
			PROGID "shell.explorer.2"  

	END WINDOW

	Center Window Win1

	Activate Window Win1

RETURN NIL

*------------------------------------------------------------------------------*
Procedure TestNavigate()
*------------------------------------------------------------------------------*
Local oObject
Local cAddress := ''

	* Look at other samples for alternatives

	cAddress := InputBox ('Navigate:','Enter Address','http://www.hmgforum.com/')

	If .Not. Empty ( cAddress )

		Win1.Test.Object:Navigate(cAddress)
	Else	
    MsgInfo( cAddress)  && addition
	EndIf

Return
3. The InputBox wont stop to before going on to the next statement.
4. Pls help and point out where I have done wrong
5. BTW, I wonder if this issue ever been posted, how can I search and look for it ?

Thks
Just Hmg It !
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HMG ActiveX Support Demo

Post by Pablo César »

Hi Chong,

1. You posted in wrong place again... Please open new topic when you need to threat new matters.

2. My advice is also to put TAG CODEs for source code when is posted. This will helps to understand by differentiate message from source codes.

3. Look in red color, you will see the right position of your new line of implementation:
*------------------------------------------------------------------------------*
Procedure TestNavigate()
*------------------------------------------------------------------------------*
Local oObject
Local cAddress := ''

* Look at other samples for alternatives

cAddress := InputBox ('Navigate:','Enter Address','http://www.hmgforum.com/')

If .Not. Empty ( cAddress )

Win1.Test.Object:Navigate(cAddress)

MsgInfo( cAddress)

EndIf

Return
MsgInfo it was in otherwise of existing URL (never going to happend unless user remove all URL).

4. You have a button "Search" at head of each page of HMG Forum for looking for message by string (by any key words), you can also look for "author" messages too.

There is also a link "View unread posts" you will find all the topics you have not readed. Please note, ifg somebody answer will be listed again for your reading.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: HMG ActiveX Support Demo

Post by danielmaximiliano »

Bienvenido al foro de HMG IKChang
desde Buenos Aires Argentina

Welcome to the forum of HMG IKChang
from Buenos Aires Argentina
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: HMG ActiveX Support Demo

Post by Pablo César »

danielmaximiliano wrote:Bienvenido al foro de HMG IKChang
desde Buenos Aires Argentina

Welcome to the forum of HMG IKChang
from Buenos Aires Argentina
He has introduced himself already... http://hmgforum.com/viewtopic.php?p=28380#p28380

So many presentations... so confuse... :?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
hmgchang
Posts: 273
Joined: Tue Aug 13, 2013 4:46 am
Location: Indonesia

Re: HMG ActiveX Support Demo

Post by hmgchang »

Oopss... I did it again ! my mistakes and my apologies...
and thanks very much for your info and help...
and for 'Hello' for others
:D
Just Hmg It !
User avatar
hmgchang
Posts: 273
Joined: Tue Aug 13, 2013 4:46 am
Location: Indonesia

Re: HMG ActiveX Support Demo

Post by hmgchang »

Code: Select all

	cAddress := InputBox ('Navigate:','Enter Address','http://www.hmgforum.com/')
        [color=#BF0000]MsgInfo( cAddress)[/color]
	If .Not. Empty ( cAddress )
		Win1.Test.Object:Navigate(cAddress)
	EndIf
Maybe this might present my problem :
1. To my logic, the above should wait me to alter/entry the value for cAddress
2. After press Enter, the MsgInfo should display what I entered for the cAddress
3. but what happen is : It display the MsgInfo( cAddress) first before I get the chance to entry the inputbox.
4. Actually I have a screen capture but dont know how to paste it here. pls advise how !

Thks n rgds
Just Hmg It !
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG ActiveX Support Demo

Post by esgici »

hmgchang wrote: Maybe this might present my problem : ...
Probably you need apply this patch.

Happy HMG :D
Viva INTERNATIONAL HMG :D
User avatar
hmgchang
Posts: 273
Joined: Tue Aug 13, 2013 4:46 am
Location: Indonesia

Re: HMG ActiveX Support Demo

Post by hmgchang »

Thks Sir for the patch...

:D
Just Hmg It !
Post Reply