Personal C Sharp                                                         By
HomeHow To StartExamples-DesktopExamples-WebPC# MethodsReference-DesktopReference-Web

Click on one of the following categories:


Using Controls

Drawing I

Drawing II, 3D Assemblies



Handling threads

Security, Cryptography and Signed Assemblies


Accessing External Objects And Performing System Operations

Using the Windows Presentation Foundation (WPF)

Speeding-up PC#, Accessing Windows' API's and communicating with hardware devices

Boosting PC# speed further by using C and Assembly Sub-Programs.



EXAMPLE 1: The simplest program to display the message "Hello World!". 
EXAMPLE 2: Two more ways to display the same message.
EXAMPLE 3: Using a much better display. 
EXAMPLE 4: Creating a menu which gives the user the choice of displaying the "Hello World!" 
           message in either red, blue or green colors. Each time the user selects one color,
           the message is displayed in that color then the menu appears again to allow him a
           new choice.
EXAMPLE 5: Creating a set of menues to show how to do most programming tasks in PC# which 
           do not involve graphics.
EXAMPLE 6: Using the Console instead of the "Text Screen" for text input and output.

Using Controls 

EXAMPLE 1: Creating a button and a text field. If the user enters "red", "green" or "blue" 
           into the text field then clicks the button, the button's background color changes

EXAMPLE 2: Shows how to create and handle events of several controls with variety of sizes,
           colors, fonts and texts. Several Buttons, Text fields and a Combo Box are used.
           It shows how to use the events received from one control to change the contents of

EXAMPLE 3: Shows how to create and handle events of "Radio Button groups, "Check box groups",
           single and multi item "List Box" sets. It also shows how to create and write text
           into text areas.

EXAMPLE 4: Discussing some layout considerations using the same form which has been 
           generated in Example 3 for the discussion.

EXAMPLE 5: Graphical menu's.  Creating and handling events of 3 menu groups. The first one
           which is of type "MainMenu" is installed at the top of the form.  The Second one
           which is of type "ContextMenu" is installed at a specific location within the form.
           The third one which is also of type "ContextMenu" is attached to a button. Whenever
           the user Right-Clicks the button, the menu appears.

EXAMPLE 6: Installing  "Tooltips" and  using "Background Images" with controls.

EXAMPLE 7: Shaws how to create "Chained Forms" which means forms that follow each others at
           a specific order.

EXAMPLE 8: Shaws how to create "Selectable Forms". In this example, the user is given the
           choice of selecting one of two forms. Each form contains a "Return" button which
           returns the user back to the selection menu when clicked.


EXAMPLE 1:  Startup program. Plotting X,Y axis then drawing some shapes using Cartisian
            and Polar coordinates.
EXAMPLE 2:  Application which shows the need for Polar coordinates.
EXAMPLE 3:  Demonstrating the value of "Shear" and "Rotation". Drawing a diamond shaped
            object or a parallelogram.
EXAMPLE 4:  Drawing both sides of an ace of diamonds card using gradient paint to decorate
            its back side.
EXAMPLE 5:  Drawing an "ace of hearts"?
EXAMPLE 6:  Giving your drawings 3-D look using 4 different methods.
EXAMPLE 7:  Using Special Effects - Depth. Display text in large size letters with 3-D look.
EXAMPLE 8:  Using Special Effects - Reflection. Drawing a piece of jewelry.
EXAMPLE 9:  Drawing shadows and the use of Affine transform.
EXAMPLE 10: This example shows how to make the object you are drawing look elevated up
            or down.
EXAMPLE 11: Saving your drawing into file.
EXAMPLE 12: Reading the file back and drawing the image.
EXAMPLE 13: How to handle a mixture of Controls and drawings and how to make them control
            each others.
EXAMPLE 14: Printing text lines, text files and a bitmap object with different setup options.
EXAMPLE 15: Printing a full page of text and drawings.
Example 16: Drawing on the Text Screen.

EXAMPLE 1: Reading a Sequencial Access File (SAF) using two modes, "read all" and "read line".
EXAMPLE 2: Demonstrates writing, appending and reading back of a Sequencial Access File (SAF)
EXAMPLE 3: Shows how to obtain current directory name, how to check if a file or directory
           exists, how to create files and dir's and how to delete them, how to get a list of
           all files & sub-folders in a folder and how to copy one file to another.
EXAMPLE 4: Shows how to write 2 lines into a no header Random Access File (RAF) then read them
EXAMPLE 5: Shows how to make a RAF with a header containing all information necessary for
           reading it. It also shows how to enter two records of data into the file then read
           them back.


EXAMPLE 1: Writing a program which you can run at any time to get the latest stock price of
           Microsoft from Yahoo's Financial website.
EXAMPLE 2: Shows how to use FTP protocol to upload and download files, create and delete
           files and directories at your website. 
EXAMPLE 3: Shows how to send an e-mail message with an attachment file programatically.
EXAMPLE 4: Shows how to check for new e-mail messages, how to retrieve a message and how to
           delete a messages programatically. 
EXAMPLE 5: Shows how to use lower level TCP-IP networking to connect to a server and exchange
           messages with it then close the connection.
Handling Threads

EXAMPLE 1: Shows how PC# has made writing a thread safe program so easy, simple and error free.
EXAMPLE 2: Shows how to do graphics in a multi-thread environment.
EXAMPLE 3: Shows how threads can communicate together and share a common project.
EXAMPLE 4: Shows how to do filing in a multi-thread environment.
Accessing External Objects

EXAMPLE 1: Shows how to do one network troubleshooting technique programatically. The
           IPCONFIG utility is executed to obtain TCP-IP configuration values. Its text
           output is searched and the WAN IP address is obtained then the PING utility is
           used to check the WAN connection.
EXAMPLE 2: Shows how to write a script file then execute it with a C# program.

EXAMPLE 3: Shows how an application can store data into the system registry.

EXAMPLE 4: Shows how to read data back from the system registry.