You would call your own methods in the same manner that you would call any method in a .net framework class, using either the set statement if you are returning a value or the invoke statement if you are not.
Take a look at the samples browser under Start menu-->All Programs-->Micro Focus Visual COBOL-->Samples and then select Windows Presentation Foundation in the left hand window and then one of the samples listed in the right hand side and open this up in Visual Studio.
Also click on COBOL for .NET in the left window and select Core .NET for a sample that demonstrates using basic .NET functionality like callng methods, etc...
for any sample stuff on WPF, I usually search the web for samples in C#: The xaml part of those samples will fit for Visual COBOL. An example here is to get more events which will need a hook in XAML.
Using Visual COBOL 2.1 upd 1 I had no problem so far in moving such C# into Visual COBOL, which makes it easier to mix legacy structures with the new stuff. This include things like datagrid and tabbed screens.
For examples of passing parameters or returning parameters:
01 mystring string. procedure division.
set mystring to "test" invoke self::MyMethod(mystring) set mystring to self::MyMethod2 end method. method-id MyMethod public. procedure division using mystring as string.
set mystring to "Hello" goback. end method.
method-id MyMethod2 public. procedure division returning mystring as string.
set mystring to "Hello" goback. end method.
Recent badge winners
Neil Morrishas earned the badge Consistent Trajectory