Skip to main content

I am trying obtain the location for the coordinates of my windows form in the program so that I may pass these coordinates to the next form. I want to be able to show a form in the same position as my previous form.  Doing this in C# is something like public System.Drawing.Point Location { get; set; }. But I simply do not know that the commands are in Visual Cobol. Thanks in advance for your help.

I am trying obtain the location for the coordinates of my windows form in the program so that I may pass these coordinates to the next form. I want to be able to show a form in the same position as my previous form.  Doing this in C# is something like public System.Drawing.Point Location { get; set; }. But I simply do not know that the commands are in Visual Cobol. Thanks in advance for your help.

You would do it the same way in COBOL like you would in C# as they both use the same .NET Framework classes.

 

Something like:

declare mypoints = self::Location declare newform = new type Form2 set newform::Location to mypoints set newform::StartPosition to type FormStartPosition::Manual invoke newform::ShowDialog

You would do it the same way in COBOL like you would in C# as they both use the same .NET Framework classes.

 

Something like:

declare mypoints = self::Location declare newform = new type Form2 set newform::Location to mypoints set newform::StartPosition to type FormStartPosition::Manual invoke newform::ShowDialog
This worked so thank you! Sorry for the late response as I been having trouble logging into this site ever since Micro Focus change their site portals.