( Index )
Month

 

Brief Information about the January 2015 CSIG Meeting

JUMPWEB.cs - A Simple App for Launching a Program ......    by B. Arnold

LATE BREAKING NEWS:   http:// www.techsupportalert.com /content/microsoft- visual-studio- now-free-non- commercial-use.htm

(General Csig Info)    This month's application is a simple C-sharp program that accesses the Operating System Clipboard and extracts information.  It then calls the system browser (IE, Firefox, etc. ) to jump to a given web site. Amazingly, the program is only about a page and a half.  Although programmed in C# it is easily converted to C++ since it uses the DOT NET libraries. See below for further information.


Sample

Sample of Apps Dialog Box

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 4 different language compilers: C++, C++ Express, C-Sharp, and C-Sharp Express. These are all capable of creating Windows (tm) programs. (Some are FREE!)

This month's program includes the following.

Sample

This is a CLI DOT NET program is coded using C-sharp (C#) and is very similar to C++.  It also still uses the same DOT NET libraries.

The program uses a number of DOT NET Library functions including the following:
Load  Windows Forms CLASSES Timers
Clipboard  Try  Catch Close
MessageBox Process  C# Start
Exceptions WaitCursor DOT NET  

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++ 9.0, etc.
.Net 4.5, etc.
CLI
Common Language Infrastructure

Sample Code from Past Meetings

// FORM1.H ACGNJ CSIG MEETING December 16, 2014 - WRITTEN BY BRUCE ARNOLD using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Collections; namespace Circles { public partial class Form1 : Form { const int FIFTY_CIRCLES = 50; const int DIAMETER = 250; const int TIMER_INTERVAL = 2000; // milliseconds static ArrayList CircleArray = new ArrayList(); public Form1() { InitializeComponent(); this.DoubleBuffered = true; // for better, smoother screen updates. this.WindowState = FormWindowState.Maximized; } ~Form1() { CircleArray.RemoveRange(0, CircleArray.Count); // Clear memory. } // Here is where we create a brand new circle. The default constructor of "Circle" // then calls the constructors of its "base" classes. Remember: "It's turtles all // the way down!" A loop creates 50 circles at a time. private void timer1_Tick(object sender, EventArgs e) { this.timer1.Interval = TIMER_INTERVAL; int windowWidth = this.ClientRectangle.Width; int windowHeight = this.ClientRectangle.Height; Random autoRand = new Random(); int xorg, yorg; CircleArray.RemoveRange(0, CircleArray.Count); // Clear memory. for (int loop = 0; loop < FIFTY_CIRCLES; ++loop) { Circle cc = new Circle(); // Create new circle. cc.Diameter(windowHeight / 4); int bkg = autoRand.Next(9); switch (bkg) { case 0: cc.BkGround(Brushes.SandyBrown); break; // Random case 1: cc.BkGround(Brushes.Red); break; // color case 2: cc.BkGround(Brushes.Orange); break; // pick. case 3: cc.BkGround(Brushes.Yellow); break; case 4: cc.BkGround(Brushes.Green); break; case 5: cc.BkGround(Brushes.Blue); break; case 6: cc.BkGround(Brushes.Violet); break; case 7: cc.BkGround(Brushes.LightGray); break; case 8: cc.BkGround(Brushes.White); break; } xorg = windowWidth - cc.cx + 200; if (xorg < 0) xorg = 0; // Calculate limits. yorg = windowHeight - cc.cy + 200; if (yorg < 0) yorg = 0; xorg = autoRand.Next(xorg) - 100; // Randomize values yorg = autoRand.Next(yorg) - 100; cc.Position(xorg, yorg); CircleArray.Add(cc); } Invalidate(); } private void Form1_Paint(object sender, PaintEventArgs e) { foreach (Circle obj in CircleArray) { obj.Paint(e); } }

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