Highlighted
Honored Contributor.
Honored Contributor.
1784 views

Odd control focus behavior

Jump to solution

I have 2 separate solutions in the attached zip.  One solution - NatCon1 - contains 1 native project - NatCon1.

The other solution - ManWin1 - contains 2 managed projects - ManCon1 and ManWin1.

These are intended to demonstrate:  1) a native-calling-managed scenario (based on your CCW concept, but using separate solutions), as well as 2) a managed-calling-managed scenario (within the same solution). 

Here is the weird behavior - in VS2013, when using native NatCon1 Program1 to call managed ManWin1 via "Start Debugging", it appears to honor the forced default setting of the focus onto the Exit button on ManWin1 Form1.  (see the "invoke button1::Select().").  But, when doing it via "Start Without Debugging", it appears not to honor the [attempted] forced focus onto that Exit button.  The debugging aspect would be associated with the native project, not with the called managed project, so I am confused why it works one way, then another, based on this.  And I would like for it to honor the setting of the focus without being in debug mode.

What have I overlooked?  

(Note:  I was not able to upload the zip file (even after splitting it into 2 files) due to the comically-undersized limit of file uploads - 64kb apparently.  How can I upload?

 

   

0 Likes
1 Solution

Accepted Solutions
Highlighted
Honored Contributor.
Honored Contributor.

RE: Odd control focus behavior

Jump to solution

Correction:  the above statement is incorrect.  It should be as follows:

invoke self::Activate()

View solution in original post

0 Likes
4 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Odd control focus behavior

Jump to solution

Please open up a support incident with Customer Care and we will take a look at the reported issue. You can then attach your zip files directly to the support incident.

Thanks.

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

RE: Odd control focus behavior

Jump to solution

OK, done.  Incident/ticket # 2827941.  Thanks.

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

RE: Odd control focus behavior

Jump to solution

This has since been resolved as per incident # 2827941.  The resolution was to add the following statement in the Form Load event of the called ManWin1 program:

invoke button1::Select()

Woops!  the above should say:

invoke self::Activate() 
0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

RE: Odd control focus behavior

Jump to solution

Correction:  the above statement is incorrect.  It should be as follows:

invoke self::Activate()

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.