30 March, 2009

VB Tutorials

http://www.java2s.com/Tutorial/VB/CatalogVB.htm

VB.NET OpenFileDialog

Here is code to use open file dialog control in a windows based application.
Put a File dialog control on the form and a button and add the below code in the button click event.

OpenFiledialog.Filter = "Image Files*.jpg;*.gif;*.bmp;*.png;*.jpegAll Files*.*"
OpenFiledialog.InitialDirectory = "C:\"
OpenFiledialog.FilterIndex = 1
OpenFiledialog.Title = "Open File"
If (OpenFiledialog.ShowDialog() = Windows.Forms.DialogResult.OK) Then
thumb = OpenFilephoto.FileName
Picturephoto.Image = Image.FromFile(thumb)
End If


http://www.dotnetspider.com/resources/22420-Open-File-Dialog-Control.aspx

UML Class Diagram (again)

In software engineering, a class diagram in the Unified Modeling Language (UML), is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, and the relationships between the classes.

http://en.wikipedia.org/wiki/Class_diagram

UML Class Diagram

UML class diagrams show the classes of the system, their inter-relationships, and the operations and attributes of the classes. Class diagrams are typically used, although not all at once, to:
* Explore domain concepts in the form of a domain model
* Analyze requirements in the form of a conceptual/analysis model
* Depict the detailed design of object-oriented or object-based software

A class model is comprised of one or more class diagrams and the supporting specifications that describe model elements including classes, relationships between classes, and interfaces. There are guidelines for:
General issues
Classes
Interfaces
Relationships
Inheritance
Aggregation and Composition

http://www.agilemodeling.com/style/classDiagram.htm

23 March, 2009

Understanding classes and objects

http://www.learnvisualstudio.net/content/videos/2101_understanding_classes_and_objects.aspx

For the visual learner, this lengthy video explains the parts of a class, which is the basic building block used in every VB.NET application. Classes have properties and methods, contructors and destructors, and methods can be overloaded. This video starts you out at the very basics of all these concepts.

Unfortunately you need to subsribe for this one.

VB.NET Classes and Objects

Concept of Class
A class is simply an abstract model used to define new data types. A class may contain any combination of encapsulated data (fields or member variables), operations that can be performed on the data (methods) and accessors to data (properties). For example, there is a class String in the System namespace of .Net Framework Class Library (FCL). This class contains an array of characters (data) and provide different operations (methods) that can be applied to its data like ToLowerCase(), Trim(), Substring(), etc. It also has some properties like Length (used to find the length of the string).

A class in VB.Net is declared using the keyword Class and its members are enclosed with the End Class marker

Class TestClass
' fields, operations and properties go here
End Class

Where TestClass is the name of the class or new data type that we are defining here.

Objects
As mentioned above, a class is an abstract model. An object is the concrete realization or instance build on a model specified by the class. An object is created in memory using the 'New' keyword and is referenced by an identifier called a "reference".

Dim myObjectReference As New TestClass()

In the line above, we made an object of type TestClass that is referenced by an identifier myObjectReference.The difference between classes and implicit data types is that objects are reference types (passed by reference to methods) while implicit data types are value types (passed to methods by making a copy). Also, objects are created at heap while implicit data types are stored on a stack.

http://www.programmersheaven.com/2/Les_VBNET_4_p1

10 March, 2009

UNICODE

Unicode is a computing industry standard allowing computers to consistently represent and manipulate text expressed in most of the world's writing systems. Developed in tandem with the Universal Character Set standard and published in book form as The Unicode Standard, Unicode consists of a repertoire of more than 100,000 characters, a set of code charts for visual reference, an encoding methodology and set of standard character encodings, an enumeration of character properties such as upper and lower case, a set of reference data computer files, and a number of related items, such as character properties, rules for normalization, decomposition, collation, rendering and bidirectional display order (for the correct display of text containing both right-to-left scripts, such as Arabic or Hebrew, and left-to-right scripts).

http://en.wikipedia.org/wiki/Unicode

ASCII

American Standard Code for Information Interchange (ASCII) is a coding standard that can be used for interchanging information, if the information is expressed mainly by the written form of English words. It is implemented as a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that work with text. Most modern character-encoding schemes—which support many more characters than did the original—have a historical basis in ASCII.

http://en.wikipedia.org/wiki/ASCII

09 March, 2009

The homework form Page 290.

Has anyone apart from me found this exercise really hard? My GUI is really crowded with various labels and textboxes asking for information and stipulating to the user how it must be entered. I wanted to try and make it look "colourful and fun" for the user but it's just too busy. Then, when displaying the answers, you again have various labels and textboxes making the whole thing more crowded. What am I doing wrong??

Obviously I need to go and read some more of the textbook or look back over my notes as I remember we talked about concatenation so there must be a way of having the labels and textboxes combined to save clutter. I guess there is also a way of clearing space half way through so you can replace the boxes asking for the date information with the answer but I don't remember seeing how to do that.

And then of course there's the whole how on earth do we work out the answer??!! I thought I had it sussed by trying a couple of different dates, but then when I put in another it went pear shaped again. Help????!!!! Am going to have to give up on this exercise tonight and see what everyone else did tomorrow before my laptop gets thrown out of the window!!