Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: How to Print to USB Printer under Win 7 using VS 2015

$
0
0

Since you mention that you are using "form1.cbl" this would indicate that you ARE using .NET managed code to create a Windows Forms GUI application. This is not available in a native project so a managed project is what you should be using.

I can understand that using these .NET classes and OO COBOL in general can be quite a new experience for a traditional procedural COBOL programmer. It is a new way of thinking.

Although you can use these Form.cbl programs to contain all of your COBOL logic including file handling I would highly recommend that you do not do this. It is much better to separate the UI layer of an application from the business layer containing your processing code and data file handling. This is especially true in an event driven application like a Windows Form. The form1.cbl should really contain only UI code and then it should either CALL procedural programs compiled as managed code or INVOKE methods in additional classes that handle the program logic other than the UI.

This separation will become important especially when you go into maintenance mode or perhaps you would like to replace the Windows forms with another UI like WPF or convert to a web application using ASP.NET. Then you could keep your existing business logic and just replace the front end.

Thanks.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>