I remember that. It was the talk of the whole conference.Visual Edlin
Problem with disabled windows on Terminal Server
Re: Problem with disabled windows on Terminal Server
The eXpress train is coming - and it has more cars.
Re: Problem with disabled windows on Terminal Server
I was never forced to use Edlin. We have a word in german, "grace of late birth", do you know that?
(To be honest, it's just a little later birth.)
![Cool 8-)](./images/smilies/icon/cool.gif)
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Problem with disabled windows on Terminal Server
Hi, Roger.
I was in contact with Till again about this problem. He confirmed the (mis-)behaviour, but Alaska is not going to change something there. This is what he wrote as a suggestion for a solution (translated with Google):
Once again the proposed solution: in my tests, the xbeP_SetDisplayFocus event arrived at the point in time at which :isEnabled() returned False. So it would be easy to suppress the event when this (fault) condition occurs and from your description this would be correct in your case even if the dialog actually gets the display focus (see the scenario with the taskbar above), there applies: deactivated == Do not touch my children.
The test could be done in the implementation of XbpDialog:handleEvent() or in a class derived from it. Since Roger is already involved: surely something like this would be easy to implement in the eXpress framework?
I was in contact with Till again about this problem. He confirmed the (mis-)behaviour, but Alaska is not going to change something there. This is what he wrote as a suggestion for a solution (translated with Google):
Once again the proposed solution: in my tests, the xbeP_SetDisplayFocus event arrived at the point in time at which :isEnabled() returned False. So it would be easy to suppress the event when this (fault) condition occurs and from your description this would be correct in your case even if the dialog actually gets the display focus (see the scenario with the taskbar above), there applies: deactivated == Do not touch my children.
The test could be done in the implementation of XbpDialog:handleEvent() or in a class derived from it. Since Roger is already involved: surely something like this would be easy to implement in the eXpress framework?
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Problem with disabled windows on Terminal Server
Tom -
I agree with Till that this is something I could handle in the DC_XbpDialog() class, however I need a way to test this.
Is it possible for you to give me a temporary account on a server that demonstrates the problem?
If you can't do that, I think I have a customer who has a more current version of terminal server.
I will ask him.
I agree with Till that this is something I could handle in the DC_XbpDialog() class, however I need a way to test this.
Is it possible for you to give me a temporary account on a server that demonstrates the problem?
If you can't do that, I think I have a customer who has a more current version of terminal server.
I will ask him.
The eXpress train is coming - and it has more cars.
Re: Problem with disabled windows on Terminal Server
I'm working on Till's suggestion, however IsEnabled() always returns .T. even when the Main Window cannot receive focus.
This is my new class method:
I need to figure some other way to determine the status of the main window.
I'm going to try ::hasDisplayFocus
This is my new class method:
Code: Select all
METHOD DC_XbpDialog1:handleEvent( nEvent, mp1, mp2 )
IF nEvent == xbeP_SetDisplayFocus
wtl ::title, ::isEnabled()
ENDIF
RETURN ::XbpDialog:handleEvent( nEvent, mp1, mp2 )
I'm going to try ::hasDisplayFocus
The eXpress train is coming - and it has more cars.
Re: Problem with disabled windows on Terminal Server
I made a mistake when testing for ::isEnabled().
I was looking at the wrong window.
Please make this change to _DCGETBX.PRG and give it a try.
Add a new method to DC_XbpDialog1() class - Line 12955
I was looking at the wrong window.
Please make this change to _DCGETBX.PRG and give it a try.
Add a new method to DC_XbpDialog1() class - Line 12955
Code: Select all
Was: METHOD Init, Create, Resize, Show, Destroy, setButtons, setOffset
Is: METHOD Init, Create, Resize, Show, Destroy, setButtons, setOffset, handleEvent
METHOD DC_XbpDialog1:handleEvent( nEvent, mp1, mp2 )
IF nEvent == xbeP_SetDisplayFocus .AND. !::isEnabled()
RETURN nil
ENDIF
RETURN ::XbpDialog:handleEvent( nEvent, mp1, mp2 )
The eXpress train is coming - and it has more cars.
Re: Problem with disabled windows on Terminal Server
Hi,
I did the test and the error remains.
Procedure:
- Change of code
- New dclipx.dll
- Restarted server
- Login on server with RDP
- Start the sample and open the modal dialog.
- Disconnect from server.
- Login on server with RDP
- Error is on screen.
I did the test and the error remains.
Procedure:
- Change of code
- New dclipx.dll
- Restarted server
- Login on server with RDP
- Start the sample and open the modal dialog.
- Disconnect from server.
- Login on server with RDP
- Error is on screen.
Re: Problem with disabled windows on Terminal Server
This change was the one that Till suggested, yet it didn't solve the problem.
Possibly, preventing the event handling does no good.
Or it could be an error that occurs before there is any event to handle.
Please try the below debugging.
This will write to a file named DEBUG.LOG.
If it never gets to the event handler before the error occurs, then I don't know what to do next.
BTW - You need to give titles to both windows: Main Window, Test Window.
Possibly, preventing the event handling does no good.
Or it could be an error that occurs before there is any event to handle.
Please try the below debugging.
This will write to a file named DEBUG.LOG.
If it never gets to the event handler before the error occurs, then I don't know what to do next.
BTW - You need to give titles to both windows: Main Window, Test Window.
Code: Select all
METHOD DC_XbpDialog1:handleEvent( nEvent, mp1, mp2 )
WTL DC_AppEventDefine(nEvent), ::title
IF nEvent == xbeP_SetDisplayFocus .AND. !::isEnabled()
RETURN nil
ENDIF
The eXpress train is coming - and it has more cars.
Re: Problem with disabled windows on Terminal Server
Sorry for my late answer; I once again had that top-modern corona-thing, although I'm vaccinated at least twenty or thirty times. 8)
I will test that later the day. Unfortunatley, I can't give you a guest access to our RDP server.
I will test that later the day. Unfortunatley, I can't give you a guest access to our RDP server.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Problem with disabled windows on Terminal Server
Here is the log. It seems to be the xbeP_SystemPropertyChanged event causing trouble.
- Attachments
-
- DEBUG.ZIP
- (564 Bytes) Downloaded 98 times
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."