Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

OI processing WM_ACTIVATE (winmsg 6) for every control when remote deskstop session is started

edited August 2021 in OpenInsight
Our users have started working from home, and they are experiencing the following OI problem:

Let' say a user has connected to his work computer via RDP and OI is already open on the Desktop. A few seconds after connecting, the OI app will start flashing and become unresponsive for a while (the time period seems to be related to the number of forms that are open).

I observed that during the period of flashing and unresponsiveness, OI is being inundated with WM_ACTIVATE messages. It seems like one message is being sent for every control.

I will try to fix this myself, but I am wondering if anyone else has seen this before?

Comments

  • I just tested it on the example app that comes with OI, and I did not get the period of flashing and unresponsiveness. So I'm guessing it's something we're doing..
  • I have never seen or heard of this being reported before. My guess is that you are capturing the WM_ACTIVATE message in your promoted CREATE event and this is why you are getting inundated with it. If you don't need it then try disabling it and see if that helps.
  • Actually I was wrong. It's not WM_ACTIVATE. It's WM_SYSCOLORCHANGE. But I guess I need to look into why our app is notjust ignoring these messages.
  • edited August 2021
    This seems to be the culprit


    Case Message EQ WM_SYSCOLORCHANGE
    // User is changing a color theme. Adjust the running windows to change their colors WindowList = Utility("OBJECTLIST", "", "WINDOW") NumWindows = Count(WindowList, @FM) + (WindowList NE "") For Loop = 1 to NumWindows Window = WindowList<Loop> GoSub Set_System_Color Next Loop

    So when you start an RDP session, it must change the colour setting on the user's computer. After commenting out this code, the flashing goes away, but the app is still unresponsive. I am guessing I need to block this event.

    How do you use qualify event to block an event for all controls? I have only ever done it for a window or a single control.
  • Actually, never mind, I can see our code is just calling qualify_event for each control. I will just remove this code

    Ctrls = Get_Property(window_fullname, 'CTRLMAP') NumCtrls = fieldCount(Ctrls, @FM) For Loop = 1 to NumCtrls Ctrl = Ctrls<Loop> Type = Get_Property(Ctrl, 'TYPE') Send_Message(Ctrl, 'QUALIFY_EVENT', WM_SYSCOLORCHANGE, True$)
  • I've been traveling so unable to respond as quickly as I would like. After you mentioned this was WM_SYSCOLORCHANGE and knew instantly that this was something we qualify in FrameWorks. Looks like you found the relevant code to disable.
Sign In or Register to comment.