Adding a Border around text – Free CSS Tutorials for Beginners 2.4

Posted by NosaLee in CSS Programming on 29-05-2012. Tags: , ,

Back to Home Previous Course Next Course
We’ll now use the Editor to add a border around a paragraph of text. This will demonstrate how to use the ID Selectors.
So create a new web page. Add a paragraph or two of text. Again, it’s a two step process to set up and apply an ID selector. So[......]

Read More…

Change the Background color behind Text – Free CSS Tutorials for Beginners 2.3

Posted by NosaLee in CSS Programming on 29-05-2012. Tags: , ,

Back to Home Previous Course Next Course
We’ll now use the HTML Editor to add a style that changes the background colour behind some text. This will demonstrate the how the Class Selector works. With your HTML Editor, adding a Class Selector Style is a two step process:
 
Step One –[......]

Read More…

How to Create a Class Library in C# .NET – Free C# Tutorials for Beginners 16.1

Posted by NosaLee in .NET Programming on 29-05-2012. Tags: , ,

Back to Home Previous Course
You can create a class library of your code, save it as a DLL and then reuse your C# code in other projects. The process is quite straightforward.
Start a new project. From the New Project dialogue box, select Class Library instead of Windows Application. In the Name box[......]

Read More…

Drawing Text in C# .NET – Free C# Tutorials for Beginners 15.5

Posted by NosaLee in .NET Programming on 29-05-2012. Tags: , ,

Back to Home Previous Course Next Course
You can also draw text to a form. You set up a font, a brush, an optional text direction, and then draw your text to the form. Here’s an example:
C# code to draw a string of text to a form
So you set up a Font object and specify the font and font size in between the round brackets of Font. We&#[......]

Read More…

Drawing Polygons in C# .NET – Free C# Tutorials for Beginners 15.4

Posted by NosaLee in .NET Programming on 29-05-2012. Tags: , ,

Back to Home Previous Course Next Course
You can also draw irregular shapes, like Polygons. To do that, you set up a series of points, and hand them to the DrawPolygon method.
The first thing to do is to set up an array of points:
Point[] polygonPoints = new Point[5];
This sets up a new point array [......]

Read More…

Brushes in C# .NET – Free C# Tutorials for Beginners 15.3

Posted by NosaLee in .NET Programming on 29-05-2012. Tags: , ,

Back to Home Previous Course Next Course
If you want a filled rectangle instead of a blank one, you need a SolidBrush object. The Brush can then be used to Fill shapes.
Add the following to your code:
SolidBrush brushOne = new SolidBrush(Color.Blue);
So we’ve set up a new SolidBrush and called[......]

Read More…

Drawing Rectangles in C# .NET – Free C# Tutorials for Beginners 15.2

Posted by NosaLee in .NET Programming on 29-05-2012. Tags: , ,

Back to Home Previous Course Next Course
Another useful graphics class is Rectangle. As its name suggests, it’s used to draw rectangles. But, strangely, it can also be used to draws circles and ellipses.
Add the following to your code, just beneath the third line:
Rectangle recOne = new Rectan[......]

Read More…

Graphics in Visual C# .NET – Free C# Tutorials for Beginners 15.1

Posted by NosaLee in .NET Programming on 29-05-2012. Tags: , ,

Back to Home Previous Course Next Course
C# .NET allows you to draw straight to a form or form objects. You do all the drawing with inbuilt Graphic objects.
The first thing to do is to set up a Graphics object. You then specify what it is you want to draw on. To draw directly to a form, you can do t[......]

Read More…

Dates and Times – Free C# Tutorials for Beginners 14.1

Posted by NosaLee in .NET Programming on 29-05-2012. Tags: , ,

Back to Home Previous Course Next Course
At some stage of your programming career, you’ll need the ability to manipulate dates and time. A typical example would be a database programme where you want to record when an entry was made, especially if it’s an order for a product. Or if you w[......]

Read More…

Getting at the values on other Forms – Free C# Tutorials for Beginners 13.3

Posted by NosaLee in .NET Programming on 29-05-2012. Tags: , ,

Back to Home Previous Course Next Course
Turn your Form2 into a Change Case dialogue box, just like ours below:
A Change Case form
When the OK button is clicked, we want the text in the text box on Form1 to change case, depending on which of the three options was chosen.
The problem we face is that the text box is pr[......]

Read More…