Page 1 of 1

HMG ActiveX Support Demo

Posted: Thu Sep 19, 2013 7:36 am
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

HMG ActiveX Support Demo

Posted: Thu Sep 19, 2013 11:32 am
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.

Re: HMG ActiveX Support Demo

Posted: Thu Sep 19, 2013 1:09 pm
by danielmaximiliano
Bienvenido al foro de HMG IKChang
desde Buenos Aires Argentina

Welcome to the forum of HMG IKChang
from Buenos Aires Argentina

Re: HMG ActiveX Support Demo

Posted: Thu Sep 19, 2013 2:23 pm
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... :?

Re: HMG ActiveX Support Demo

Posted: Fri Sep 20, 2013 2:03 am
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

Re: HMG ActiveX Support Demo

Posted: Fri Sep 20, 2013 3:26 am
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

Re: HMG ActiveX Support Demo

Posted: Fri Sep 20, 2013 8:30 am
by esgici
hmgchang wrote: Maybe this might present my problem : ...
Probably you need apply this patch.

Happy HMG :D

Re: HMG ActiveX Support Demo

Posted: Mon Sep 30, 2013 2:16 am
by hmgchang
Thks Sir for the patch...

:D