( Index )
Month

 

Brief Information about the March '17 CSIG Meeting

REVIEW:  Discussion and Video Show about the new Visual Studio 2017

by Bruce Arnold .

 

 

Welcome to the CSIG, a Special Interest Group of the ACGNJ. This is an exciting time for the C Language programming since Microsoft now has several different language compilers that include: C++,  and C-Sharp. These are all capable of creating Windows (tm) programs. (Some are FREE!)  During the meeting there will be time for Random Access Questions as well as other discussions.

Here's a brief synopsis of the coming meeting:

The Microsoft Web Site has a new section on Visual Studio 2017.  WHAT'S NEW  This was just released the 2nd week of March 2017. As in the past, I will be using the free version which in this case is called "Visual Studio Community 2017".  Shown below is a view of the C# project creation screen for a Windows Forms user interface.  Also, as in the past, Microsoft has left out the Windows Forms Template for C++.  In the comming months we will discuss workarounds for this issue.  During tonight's meeting, we will discuss some of the interesting items on the web site as well as show some of the Microsoft videos. This new development system also allows coding in Apple, Linux, and Android operating systems.   And of course there will be time for Random Access and questions.


There are a number of ways to refer to Microsoft's latest compilers and code. Here's what Wikipedia says: The Common Language Infrastructure (CLI) is an open specification developed by Microsoft that describes the executable code and runtime environment that form the core of the Microsoft .NET Framework. The specification defines an environment that allows multiple high-level languages to be used on different computer platforms without being rewritten for specific architectures.

Microsoft .Net Framework 4.5
C++ / C#
Visual Studio Community 2017
CLI
Common Language Infrastructure
Managed

Sample Code

/* ****************************************************************************
Acgnj.cs    Version 1.00    B.Arnold    2/21/2017

Object:  To use the DOT NET "webBrowser" class to create a dedicated app 
for displaying the ACGNJ club website.

Note:  A warning popup message will appear when a new site is rendered.
See code at end of file for a "work in progress" attempted solution.
**************************************************************************** */

using System;
using System.Drawing;
using System.Windows.Forms;
using System.Text.RegularExpressions;

namespace Acgnj
    {
    public partial class Form1 : Form
        {
        int zoom;
        Screen mScreen;    // Screen working area

        public Form1()
            {
            InitializeComponent();
            this.zoom = 100;
            this.Width = 1200;
            this.Height = 1000;
            }

        //
        //  Center and Adjust the size of the Display Window.  Then render the web page.
        //
        private void Form1_Load(object sender, EventArgs e)
            {
            mScreen = Screen.FromControl(this);
            if (mScreen.WorkingArea.Right < this.Width) this.Width = mScreen.WorkingArea.Width;
            if (mScreen.WorkingArea.Bottom < this.Height) this.Height = mScreen.WorkingArea.Bottom;
            this.CenterToScreen();
            this.webBrowser1.Url = new Uri("http://www.acgnj.org");
            }

        //
        //  Display the web address in the lower left corner of the window.
        //  The Web Document Loading starts now.
        //
        private void webBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e)
            {
            KillPopup();
            UpdateFooter();
            }

        //
        //  Restore the proper zoom level.
        //
        private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
            {
            UpdateFooter();
            }

        //
        //  Change the zoom level via buttons.
        //
        private void zoomOUT_Click(object sender, EventArgs e)
            {
            zoom -= 20;
            if (zoom < 20) zoom = 20;
            UpdateFooter();
            }

        private void zoomIN_Click(object sender, EventArgs e)
            {
            zoom += 20;
            UpdateFooter();
            }

        //
        //  Update the text information on the footer line.
        //
        private void UpdateFooter()
            {
            this.zoomLevel.Text = String.Format(" {0} %", zoom);
            this.webBrowser1.Document.Body.Style = String.Format("zoom: {0}%", zoom);
            this.renderedSize.Text = webBrowser1.Document.Body.ScrollRectangle.Size.ToString();
            this.Uri.Text = webBrowser1.Url.ToString();
            }


SOURCE CODE

Source Code Files

For help, email me at b a r n o l d @ i e e e . o r g
Back to C++ Main Page