Problem with disabled windows on Terminal Server

This forum is for eXpress++ general support.
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Problem with disabled windows on Terminal Server

#21 Post by rdonnay »

Visual Edlin
I remember that. It was the talk of the whole conference.
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Problem with disabled windows on Terminal Server

#22 Post by Tom »

I was never forced to use Edlin. We have a word in german, "grace of late birth", do you know that? 8-) (To be honest, it's just a little later birth.)
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Problem with disabled windows on Terminal Server

#23 Post by Tom »

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?
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Problem with disabled windows on Terminal Server

#24 Post by rdonnay »

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.
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Problem with disabled windows on Terminal Server

#25 Post by rdonnay »

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:

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 need to figure some other way to determine the status of the main window.
I'm going to try ::hasDisplayFocus
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Problem with disabled windows on Terminal Server

#26 Post by rdonnay »

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

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.

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Problem with disabled windows on Terminal Server

#27 Post by skiman »

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.
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Problem with disabled windows on Terminal Server

#28 Post by rdonnay »

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.

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.

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Problem with disabled windows on Terminal Server

#29 Post by Tom »

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.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Problem with disabled windows on Terminal Server

#30 Post by Tom »

Here is the log. It seems to be the xbeP_SystemPropertyChanged event causing trouble.
Attachments
DEBUG.ZIP
(564 Bytes) Downloaded 79 times
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Post Reply