inputbox
Moderator: Rathinagiri
-
- Posts: 245
- Joined: Sat Aug 02, 2008 5:03 pm
Re: inputbox
Hit57042 wrote:Why does inputbox not work without MAIN WINDOW??
(Messageinfo and msgyesno do)
Richard
AFAIK is because inputbox is a HMG window, any Hmg window need the Main window, the msg*() are api functions.
Carlos
Regards/Saludos, Carlos (bcd12a)
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: inputbox
Richard :t57042 wrote:Why does inputbox not work without MAIN WINDOW??
(Messageinfo and msgyesno do)
Richard
what is your need for Inputbox before creating the main window?
Use Inputbox from WinAPI : http://www.codeproject.com/Articles/242 ... ing-WinAPI
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Inputbox
Nice one, Daniel !danielmaximiliano wrote:Use Inputbox from WinAPI: http://www.codeproject.com/Articles/242 ... ing-WinAPI
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: inputbox
+1danielmaximiliano wrote:Richard :t57042 wrote:Why does inputbox not work without MAIN WINDOW??
(Messageinfo and msgyesno do)
Richard
what is your need for Inputbox before creating the main window?
Use Inputbox from WinAPI : http://www.codeproject.com/Articles/242 ... ing-WinAPI
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: inputbox
Hi Richard,
You can also simulate InputBox start with, if you do a trick, you do give very small MAIN window after your MsgInfo, big do!
Espro serve you!
regards
You can also simulate InputBox start with, if you do a trick, you do give very small MAIN window after your MsgInfo, big do!
Espro serve you!
regards
Code: Select all
#include "hmg.ch"
Function main()
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 1 ; //640,480
HEIGHT 1 ;
TITLE 'InputBox Demo' ;
MAIN ;
ON INIT (MsgInfo("Hola"),Form_1.WIDTH := 640, Form_1.HEIGHT:=480)
@ 50 ,100 BUTTON Button_1 ;
CAPTION "InputBox Test" ;
ACTION CLick() ;
WIDTH 200 ;
HEIGHT 30
@ 100 ,100 BUTTON Button_2 ;
CAPTION "InputBox (Timeout) Test" ;
ACTION TCLick() ;
WIDTH 200 ;
HEIGHT 30
@ 150 ,100 BUTTON Button_3 ;
CAPTION "InputBox (Timeout) Test 2" ;
ACTION TCLick2() ;
WIDTH 200 ;
HEIGHT 30
END WINDOW
ACTIVATE WINDOW Form_1
Return
Procedure Click
MsgInfo ( InputBox ( 'Enter text' , 'InputBox Demo' , 'Default Value' ) )
Return
Procedure TClick
MsgInfo ( InputBox ( 'Enter text' , 'InputBox Demo' , 'Default Value' , 5000 ) )
Return
Procedure TClick2
MsgInfo ( InputBox ( 'Enter text' , 'InputBox Demo' , 'Default Value' , 5000 , 'Timeout Value' ) )
Return
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: inputbox
See this code:
Code: Select all
Function Main()
SET WINDOW MAIN OFF
InputBox()
_HMG_SYSDATA [ 271 ] := .F. // _HMG_IsModalActive, InputBox() is a modal Window
SET WINDOW MAIN ON
...
Return
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Inputbox
Yeah !
I forgot this great detail !
Very simple and functional !
Thank you Dr. Claudio fo reminding us !
I forgot this great detail !
Code: Select all
#include <hmg.ch>
Function Main()
Local cTest:=""
SET WINDOW MAIN OFF
cTest := InputBox ( "Type your name: ", "HMG InputBox Demo without Main Form", cTest )
_HMG_SYSDATA [ 271 ] := .F. // _HMG_IsModalActive, InputBox() is a modal Window
SET WINDOW MAIN ON
MsgInfo(cTest)
Return Nil
Thank you Dr. Claudio fo reminding us !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Inputbox
Thank you Javier for your example.Javier Tovar wrote:You can also simulate InputBox start with, if you do a trick, you do give very small MAIN window
But instead of doing this:
I would HIDE the main form.
But for sure, SET WINDOW MAIN OFF/ON it's the best option.
It's good to have it on mind.
B.Rgds
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Re: inputbox
Nicesrvet_claudio wrote:See this code:
Code: Select all
Function Main() SET WINDOW MAIN OFF InputBox() _HMG_SYSDATA [ 271 ] := .F. // _HMG_IsModalActive, InputBox() is a modal Window SET WINDOW MAIN ON ... Return
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG