Strange SET DIALOGBOX POSITION behaviour
Moderator: Rathinagiri
- mustafa
- Posts: 1158
- Joined: Fri Mar 20, 2009 11:38 am
- DBs Used: DBF
- Location: Alicante - Spain
- Contact:
Re: Strange SET DIALOGBOX POSITION behaviour
Hola Theo (trmpluym)
Te mando un sample que hice hace
Tiempo para sustituir Inputbox
No es lo que tú buscas pero aquí está
Es una ventana CHILD que no deja moverse
Tiene un DEFINE TIMER Timer_1 y no se puede
Anular con las Teclas ( Control+F4 )
Solo sale con el Botón [Cancel] o con [Esc]
Un saludo
*-------------------- Google ---------------------*
Hi Theo (trmpluym)
I send you a sample I made ago
Time to replace Inputbox
It's not what you want but here's
It is a child window that leaves move
It has a DEFINE TIMER timer_1 and can not be
Cancel with the keys (Ctrl + F4)
Just goes with the button [Cancel] or [Esc]
greeting
Mustafa
Te mando un sample que hice hace
Tiempo para sustituir Inputbox
No es lo que tú buscas pero aquí está
Es una ventana CHILD que no deja moverse
Tiene un DEFINE TIMER Timer_1 y no se puede
Anular con las Teclas ( Control+F4 )
Solo sale con el Botón [Cancel] o con [Esc]
Un saludo
*-------------------- Google ---------------------*
Hi Theo (trmpluym)
I send you a sample I made ago
Time to replace Inputbox
It's not what you want but here's
It is a child window that leaves move
It has a DEFINE TIMER timer_1 and can not be
Cancel with the keys (Ctrl + F4)
Just goes with the button [Cancel] or [Esc]
greeting
Mustafa
- Attachments
-
- Imputbox.zip
- (1.53 KiB) Downloaded 295 times
Re: Strange SET DIALOGBOX POSITION behaviour
Hi Mustafa,
Thanks for the nice sample !
I never used 'DEFINE TIME' i certainly can use it
Still learning everyday ...
Greetings from the Netherlands.
Theo
Thanks for the nice sample !
I never used 'DEFINE TIME' i certainly can use it
Still learning everyday ...
Greetings from the Netherlands.
Theo
Re: Strange SET DIALOGBOX POSITION behaviour
I changed the source file c:\hmg.3.4.3\SOURCE\h_controlmisc.prg with only four lines to add the possibility to center the InputWindow in the parent window.
The lines i added are line 3099 ...
... and 3876 to 3878
The orignal syntax is:
nRow and nCol are optional. When nRow or nCol are 0 the InputWindow is positioned in the center of the screen.
With the modification i made the functionality stays the same but when nRow of nCol is a negative number (<0) the InputWindow is positioned in the center of the parent form.
Maybe an idea to include in the next release?
The lines i added are line 3099 ...
Code: Select all
Local cParentWindowName:=ThisWindow.Name
Code: Select all
If nRow < 0 .or. nCol < 0
CENTER WINDOW _InputWindow IN &cParentWindowName
EndIf
The orignal syntax is:
Code: Select all
InputWindow( [cTitle], acLabels, aValues, aFormats [, nRow] [, nCol] [, aBackColor] [, aToolTips] [, aHotKeys] [, aStyles] [, bCode] ) --> aResult
With the modification i made the functionality stays the same but when nRow of nCol is a negative number (<0) the InputWindow is positioned in the center of the parent form.
Maybe an idea to include in the next release?
- Attachments
-
- h_controlmisc.zip
- (55.61 KiB) Downloaded 247 times
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: Strange SET DIALOGBOX POSITION behaviour
Hi Claudio,srvet_claudio wrote:I will check.
Sorry for holding on, but unfortunately i am not able to fix this problem my selves .
Where you able to find the source of the bug ?
It seems to be related to the menu function.
Theo
Re: Strange SET DIALOGBOX POSITION behaviour
Help ?
Anybody else knows how to solve this problem (see first message in this post) ? It looks very sloppy when the dialog messages pop-up in completely the wrong position after using a menu function.
Anybody else knows how to solve this problem (see first message in this post) ? It looks very sloppy when the dialog messages pop-up in completely the wrong position after using a menu function.
- serge_girard
- Posts: 3161
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Strange SET DIALOGBOX POSITION behaviour
Theo, I really wouldn't know how to solve!
Serge
Serge
There's nothing you can do that can't be done...
Re: Strange SET DIALOGBOX POSITION behaviour
Thanks Serge, hopefully somebody else is able and willing to fix this nasty bug soon !
I developed an application but because of this bug i cannot release my application
I developed an application but because of this bug i cannot release my application
Re: Strange SET DIALOGBOX POSITION behaviour
Hola trmpluym
Si cambias por la función MSGYESNO(), funciona OK.
-----------------------------------------------------------------------
Hello trm Pluym
If you change the MSGYESNO () function works OK.
Si cambias por la función MSGYESNO(), funciona OK.
-----------------------------------------------------------------------
Hello trm Pluym
If you change the MSGYESNO () function works OK.
Code: Select all
Function EndProg()
IF MSGYESNO('Quit program ?','Quit?',MB_ICONQUESTION + MB_YESNO)
Return(.T.)
ENDIF
Return(.F.)
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
Re: Strange SET DIALOGBOX POSITION behaviour
Thanks Andrés,
You are right the problematic behaviour does not occur using the MsgYesNo() function.
So the bug is narrowed down to the it MessageBoxTimeout() function !
I switched over to the MessageBoxTimeout because it is more flexible than MsgYesNo(). With the MessageBoxTimeout() function (when functioning correct) normally i can achieve the same functionality as the MsgYesNo() function but also the functionality of the MsgStop() function and the MsgRetryCancel() function.
But until Claudio who has programmed the MessageBoxTimeout() function ( see: viewtopic.php?t=3273 ) or anybody else who understands the source finds a solution for the bug, i have to switch back to the older less powerfull MsgYesNo(), MsgStop(), .., .. functions.
But now i have a workaround and i can finish my program !
Many thanks again Andrés
You are right the problematic behaviour does not occur using the MsgYesNo() function.
So the bug is narrowed down to the it MessageBoxTimeout() function !
I switched over to the MessageBoxTimeout because it is more flexible than MsgYesNo(). With the MessageBoxTimeout() function (when functioning correct) normally i can achieve the same functionality as the MsgYesNo() function but also the functionality of the MsgStop() function and the MsgRetryCancel() function.
But until Claudio who has programmed the MessageBoxTimeout() function ( see: viewtopic.php?t=3273 ) or anybody else who understands the source finds a solution for the bug, i have to switch back to the older less powerfull MsgYesNo(), MsgStop(), .., .. functions.
But now i have a workaround and i can finish my program !
Many thanks again Andrés