Bug 7257

Find window in Powerbuilder Stops Working 22 November, 2021

jorge gonzalez
15 September, 2021
Product: PowerBuilder Category: IDE
Version: 2017 R3 Build: 1858
Classification: Publishing: Public
Priority: P3
Status: Verifying Reason:
Communication Status: Waiting for Customer
Mark Lee @Appeon 22 November, 2021
#21
Hi Jorge,

Sorry for the late reply.
According to our testing and analysis, I think this is a Windows normal behavior. If you open a desktop app, it will open on the opposite monitor because it was on that one last time the app was used. You can refer to the following links:
https://answers.microsoft.com/en-us/windows/forum/windows_10-start/opening-programs-on-second-monitor-not-main/ebc1d56d-8b75-47d4-91b8-64ea71cc206a


For the issue you are facing, after your click on the Find menu option, please try Windows key + shift + left/right or Windows key + shift + up arrow/ down arrow and see if it can work it around.

·         Windows key + shift + left/right : will move the window to another screen in the same relative position.    
You can refer to the following link for detail.
https://superuser.com/questions/738081/how-to-make-applications-open-on-the-correct-monitor-when-using-multiple-monitor

Please let us know if this resolves the issue for you.

Regards,
Mark Lee
Mark Lee @Appeon 17 September, 2021
#20
Hi Jorge,

Thanks for your feedback.
This is a piece of relatively important information. Maybe the new find text window appears on the other monitor.
I will configure this environment and verify the issue and update you later.

Regards,
Mark Lee
jorge gonzalez 17 September, 2021
#19
Yes at my work computer that I RDP into that machine is connected to two monitors. I am a contract programmer and it's rare for me to have two monitors and I've seen this problems popping up on occassion over the years.  I think I can provide you a pbvm.
Mark Lee @Appeon 17 September, 2021
#18
Hi Jorge,

Thanks for providing the video and feedback. Another question, does your machine use a multi-screen display?
 
Since we cannot reproduce this problem locally, we will analyze the code internally. If our developer still can't find the relevant reason,
may I ask if you can provide a reproducible VM for us to verify and analyze the issue?

Regards,
Mark Lee
jorge gonzalez 16 September, 2021
#17
PB_filetext_search_problem.mp4 (1497KB)

I got it to happen again. I've enclosed an mp4 file. At the beginning of the little movie (mp4) I am pressing ctr+f and the little window does not appear. I then right click and select ctrl+f4 and the little window does not appear. I then select ctrl+f4 from the top menu and again nothing appears as you can see. One thing I've noticed about this problem is that after selecting ctrl+f4 the PB IDE loses focus.I have to click on the script area for it to regain focus.

This problem has been around for many years on many different computers that I've worked on and others developers have had the same problem. 

I've been working with PB since 1992.
Mark Lee @Appeon 16 September, 2021
#16
Hi Jorge,

Thanks for your feedback.
 
And we are glad to hear that it works in the newly opened PB instance. It is recommended to work around in this way for the time being.
 
In addition, according to our test verification, we have not reproduced this problem. So have you been able to reproduce this problem on other computers? Or does any other colleague encounter the same problem?

Regards,
Mark Lee
jorge gonzalez 16 September, 2021
#15
As soon as the problem occurrs again I will get you the info you are after. As for:

"If you close the current PB instance and then reopen PB IDE and the script window, will the Find Text window appear if you press Ctrl+F?"

Yes the find text window appears after pressing Ctrl+F for the newly opened PB instance.
Mark Lee @Appeon 16 September, 2021
#14
menu

Hi Jorge,
 
Thanks for reporting this problem.
We have set up an environment and will verify it tomorrow and see if we can reproduce it on our side.
BTW, if you right-click the script window, is the Find option Enabled in the popup menu? (see the attachment)
If you close the current PB instance and then reopen PB IDE and the script window, will the Find Text window appear if you press Ctrl+F?
 
Besides, could you please provide a video that demonstrates the issue for us? Thanks in advance.

Regards,
Mark Lee
jorge gonzalez 15 September, 2021
#13
Chris this problem also happens when my Windows session times out and i have to login again. You know if you don't do anyting on your machine for several minutes Windows logs out and you are forced you to login again.
jorge gonzalez 15 September, 2021
#12
We still use PB 2017 at work. Thanks for your help
Chris Pollach @Appeon 15 September, 2021
#11
Hi Jorge;

  That is great extra information and this might be related to how the IDE performs under these software layers. Off-hand, I cannot recall any CTRL+F issues being related to working under this configuration. I searched the Support DB and found a few Find issues but they were way back to PB 2017. Personally, I use this feature every week when working in the evenings on my framework and have never encountered this issue. However, I only use real PCs (no Citrix).

  I will now transfer this ticket over to the main Support / Engineering team for their review & feedback. They might know of something related to this behaviour under these conditions.

Regards ... Chris
jorge gonzalez 15 September, 2021
#10
PB is not running in Citrix
jorge gonzalez 15 September, 2021
#9
1. I connect via IE (not edge) using cisco ssl vpn to a certain group my employer has setup.
2. This allows me to start up a smart tunnel.
3. Then I use RDP to connect to my work computer

Note. I don't know much about network stuff. I am just letting you know the steps i follow.
Chris Pollach @Appeon 15 September, 2021
#8
Hi Jorge;

  That is good information. How do you connect to the IDE o for example RDP?
  Is the PB IDE running under Citrix?

Regards ... Chris
jorge gonzalez 15 September, 2021
#7
The problem is not associated with a particular script but it has something to do I think with the network. My connection to a network.   I am able to create the problem just about everytime when reconnecting to my work computer in the morning:

Steps:
I connect to my work computer from home. I disconnect at the end of the work day. After re-connecting in the morning to my work computer and starting work in a PB instance that i left open the previous day the Find Text window usually does not appear.
Chris Pollach @Appeon 15 September, 2021
#6
   Ahhh... OK - I was too deep in the O/S mindset!  :-(

   Yes, we have had a few (very few) PB developers log an issue with the IDE find  text in the script or declaration panes (and even using search dialogue on the Workspace/Target). However, these were found to not work when special / hidden characters were used.

   Would it be possible to share a script where the Find Text does not work?

Regards ... Chris
jorge gonzalez 15 September, 2021
#5
Chris it's the little FindText window that usually appears in the PB IDE when you press ctrl+f.  It has nothing to do with these API functions.
Chris Pollach @Appeon 15 September, 2021
#4
PS: For W10, I use ...
FUNCTION ulong FindText(ref FINDREPLACE pFindreplace) LIBRARY "comdlg32.dll" ALIAS FOR "FindTextW"
Chris Pollach @Appeon 15 September, 2021
#3
Hi Jorge;

  Sorry, I was looking at your Ticket's title where you stated "Find Window".

  Here is the API declaration that I use for the FindText ... 

FUNCTION ulong FindText(ref FINDREPLACE pFindreplace) LIBRARY "comdlg32.dll" ALIAS FOR "FindTextA"

Are you using the same?

Regards ... Chris
jorge gonzalez 15 September, 2021
#2
Chris it's the Find Text window built into the PB IDE that stops displaying.
Chris Pollach @Appeon 15 September, 2021
#1
Hi Jorge;

  I use the FindWindow API call every day in my framework for various things. It is one of the key API calls that I rely on. 
  However, I did have to check the API declaration for W10 for this to work properly starting in PB2017 and higher, as follows:


FUNCTION uLong FindWindow ( ref String classname, ref string windowname ) Library "USER32.DLL" ALIAS FOR "FindWindowW"

FUNCTION uLong FindWindowEx ( uLong hwnd, uLong childAfter, ref string classname, ref string windowname ) LIBRARY "USER32.dll"  ALIAS FOR "FindWindowExW"

FUNCTION uLong FindWindowEx ( uLong hwnd, uLong childAfter, long classname, ref string windowname )  LIBRARY "USER32.dll"  ALIAS FOR "FindWindowExW"

FUNCTION uLong FindWindowEx ( uLong hwnd, uLong childAfter, ref string classname, long windowname )  LIBRARY "USER32.dll"  ALIAS FOR "FindWindowExW" 


HTH
Regards ... Chris
jorge gonzalez 15 September, 2021
*Phenomenon:   The Find Text window I use to search for text in PB scripts stops appearing. When I click on ctrl+f the find text window does not appear. When I click on the Find menu option nothing appears. I have to restart PB so it works again. This can be a real drag if I have a lot of windows open in PB.  This problem has been around in PB for many years.


*Reproduce Steps:  I connect to my work computer from home. I disconnect at the end of the work day. After re-connecting in the morning to my work computer and starting to work in a PB instance that i left open the previous day the Find Text window usually does not appear.


Remarks:
OS:
Windows 10
Platform:
All
Database Type:
Database Version: