05 October, 2009

Done and Dusted!!!

Having handed in the two small assignments, the big Party Toonz assignment and sat the Chapter 11 test today (and spoiled my 100% record by not paying attention to what I was doing properly), I am over the moon to say that I have finished the programming section of the course - no offence Rachael - hooray!!

28 September, 2009

Party Toonz Assessment - Blog 3.

Yee hah!! Fingers crossed, that's this assignment put to bed for now - although the last little bit wasn't without its problems ...

A couple of days ago I wrote the Help file, made the About page and coded them both into the application. No worries. Then I had my first attempt at publishing, just like it said in the book - what a disaster! The Artwork and Music files were no longer able to be read for the exisiting data and I couldn't upload any new music - it gave me an error message about an unhandled exception or something like that. My database was connecting properly as I had changed the file path for the connection string, so I guessed I would have to do something similar with the Artwork and Music files too. I had stupidly assumed that they would be copied when the application was published.

Anyway, to cut a long story short, I changed all the Application.StartupPath & "\...\" paths for the Artwork, Music and Help files to have them being accessed from a PARTYTOONZ folder in the C: drive, just as I had done with the database, plus created matching folders for them coming from the C: drive obviously, and that seemed to work fine. It was a little bit of a pain because I forgot about the file paths feeding the picture boxes, but once I had changed those too it all seems to be working fine again. I just emailed Jake about this as he thinks there might be another way of doing this, but hopefully since I have burned both versions on to disc to hand in, Rachael will be happy with what I have done. I have made sure that the user knows that the file has to be run from the C: drive in the installation instructions.

So, for hopefully the last time, jobs done are:
• Help File
• About Information
• Application Published
• Disc Label
• Installation Instructions
• All 3 Blogs Written

Jobs still to be done:
• NONE!!

Signing off for the last time.

Deb.

25 September, 2009

Party Toonz Assessment – Blog 2 Footnote.

The next items on the jobs to do list were to create the classes for the Reader and Writer then code up the favourite’s buttons. Again I was surprised how reasonably smoothly this went, so much so that I had another one of my ‘brilliant’ ideas! Instead of the user having to click the favourite button to pass the track information to the current track panel and THEN having to click the play button of the media player, couldn't we just code it so that both things happened when they clicked the favourite’s button? Well apparently we could, and quite easily by just duplicating the If statement from the Play button, so this is exactly what we did! Hey presto!! A much simpler option for the user :o).

I also ended up coding another aspect of the favourites buttons in a slightly different way than the example we had been given, by having the track name appear in a label above the Favourite Button, so that I could have each favourite button display a message to the user about what they needed to do to play their favourite tracks. Then, after adding the appropriate coding regarding the Reader and Writer to the Load Event and Exit Event respectively, I tested each of the buttons and opened and closed the application a few times, and most of the bits and bobs seemed to be working well. Also the details from the favourites buttons were happily saved and restored as expected. I just needed to brush up on a couple of little errors I had made with regard to the various messages on the buttons, etc.

While I was doing this, Jake had wondered off on a tangent and started trying to code in complicated things that were way over my head (as he had been trying to do all along)! He did however find out how to do a couple of things that we had been talking about - locking the size of the form so that the user couldn't play with the layout, and hiding the controls at the top right corner of the screen so that the user would only be able to exit using the menu system - so that was really helpful.

By the end of the day my application seemed to be working smoothly, so all I now have left to do are the finishing touches which I can do at my own pace (but want to try and get out of the way asap). Poor Jake on the other hand still has some work to do on getting his extra complications all working well - I tried to help him out but I think I just confused him even more! In the end I just said my goodbyes and left him too it ... after beating him at pool again obviously ... as I knew he would be able to figure them out much more quickly without my 'help'.

So, as we stand now, further jobs done:
• Reader and Writer Classes
• Favourite Buttons

Jobs still to do:
• Help File
• About Information
• Publish

Signing off for the night again.

Deb.

Party Toonz Assessment – Blog 2.

Today’s work on the assignment started off with another of my ‘bright’ ideas. When adding a new track to the library, if the user didn't have an artwork image to match the track, I had initially asked them to pick any old picture to be displayed instead. However, upon reflection, I thought it might be better to give the user the option of just having the Party Toonz Logo displayed as a default. Putting the initial If statement into the Add New Track form was reasonably straight forward (with Jake’s help). However after testing we realised I also had to also add an If statement to the Delete button to make sure that the Party Toonz Logo was never deleted from the Artwork source folder.

Then we coded up the play button for the media player, which was actually easier than I thought it would be – hoorah! Rachael’s example looked really complicated because it included things like the OpenFileDialog and the Listbox but, seeing as these things were already taken care of with our existing interface, all we had to do was set up a variable to store the File Path for our previously selected track (from the GetTrack procedure). Done! The only “snag” of sorts was that we didn’t want the user to be able to use the existing buttons of the media player as they wouldn't be coded correctly, but this was easily fixed by covering the existing buttons with our newly coded buttons. Something else to tick off the list :o).

So, jobs done:
• Insert Media Player
• Create Play/Pause/Stop Buttons
• Create Volume Up/Down/Mute Buttons

Jobs still to do:
• Reader and Writer Classes
• Favourite Buttons
• Help File
• About Information
• Publish

Signing off from Blog 2.

Deb.

24 September, 2009

Party Toonz Assessment - Blog 1 Footnote.

As mentioned in the first post, seeing as our reason for packing up early had disappeared, Jake and I decided to bash on with the project and try and get the four Select/Edit/Delete/New buttons finished. The code for the Select button itself was mercifully short and sweet, and the code for the GetTrack procedure was also reasonably straight forward, thanks partly to our increased understanding after working through the steps for the delete button, but also in no small part thanks to Rachael's very detailed examples.

The Edit button started off quite well ... until some silly person (ok, I think it was me) suggested that if the user would be able to edit the Track Name and Artist Name, shouldn't they be able to edit the Album Name and Artwork as well? Hmmmmm. Adding in the Album Name was pretty straight forward, and the creation of the Edit form went pretty well (or so we thought) until we tested it out. Everything went fine until we tried to update a record without selecting a new picture. When we did that, instead of the original picture remaining associated with the record, no image would be displayed at all. It also didn't help matters that Jake and I had decided to approach this part of the project in a slightly different way to each other. To cut a long story short, after much head scratching and playing around with various bits of code, Jake managed to get his working and between us we also managed to figure out a line of code that would get mine working too, so at about 6.30pm we called it a day ... sorry night. That left just enough time for Jake to get his revenge at pool of course!!

However once back home, and refreshed after dinner, I thought I would spend a little time making my Add New Track and Edit Track forms look pretty - how long could that possibly take I thought ... Well, once I got over my OCD tendancies of not having to have EVERYTHING perfectly aligned, not that long as it turned out. They are not the most fantastic looking interfaces in the world, but hopefully they are reasonably user friendly and I like the gimic of having the logo I "created" in the background of each form.

Having done that, and seeing there was nothing on TV, I thought I would then wind Jake up by making a start on the Media Player :o). At this stage I was still unsure as to whether the Media Player should be in a form of its own or not, however I personally would prefer it do be on the main form if possible so I spent a little time arranging my original interface to fit it in. I then added the Stop/Pause and Volume Buttons and coded them up, although I will be leaving the rest of the coding til tomorrow when I am heading back to Jake's so that we can work on as much of the rest of the assignment as possible again.

So, to sum up, the list of jobs done can now include:
• Select Button
• Get Track Procedure
• Edit Button and Form
• Windows Media Player (majority of buttons)

Jobs we hope to complete tomorrow:
• The rest if the Windows Player buttons
• The 4 Favourite buttons, etc.
It sounds so easy ...

Ok, definitely signing off for the night now.

Deb.

Party Toonz Assessment – Blog 1.

Having completed the two smaller assessment items ourselves and found them to be reasonably straight forward, Jake and I decided we should try and tackle the Party Toonz assessment together as it looked a lot more difficult - two minds and all that! As we were due to get together on Thursday the 24th, I spent a couple of hours the day before reading through the assignment, creating a basic interface, creating the splash screen, downloading the Windows Media Player object, and creating the database. Jake did the same thing so that we could pretty much start programming from the get go.

We started by creating the main connection string to the database and writing the Load List Box procedure so that we had some data to work with. We then quickly added the menu strip so that we could at least tick something off the list! Then we attempted something a bit harder – coding the New Track button and creating the form to go with it! This took a reasonable length of time as we were still trying to get our heads round the requirements of the project, but it was really useful to have older projects to look back on – for example the Cats and Dogs project so that we could remember how to list more than one file extension for the OpenFileDialog - as well as the latest examples form Rachael.

After some serious cheering and fist pumping when that worked (and a quick trip to Hungry Jacks for lunch!) our next task was to tackle the delete button – well our sample data was a bit silly. Having already used the Connection Object and Command Object sections of code in the Add New Track form, this all started to make more sense, and so coding the Delete button was not too painful, apart from the fact that we couldn’t test it out as we hadn’t coded up the Select button yet. However, the lack of blue squiggly lines made us think we must be on the right track!! Who said ignorance is bliss again??

At this point we were due to stop (as I had to go to a tutoring lesson) so we decided to sum up our efforts for the day and write this blog … then, while I was in the process of beating Jake at pool (sorry Jake), I got a phone call cancelling my session so we decided to bash on regardless. However, having already started these blogs posts, we thought that we would finish them first.

So, all joking aside, this is where we are now (although we are about to do a little more) …

Jobs done:
• Main Interface
• Splash Screen
• Database
• Menu Strip
• New Track Form
• Delete Button (hopefully)

Jobs we hope to finish today:
• Select Button and Get Track procedure (so we can check the delete button is working)
• Edit Button and Form

Signing off from Blog 1.

Deb.

23 September, 2009

File Handling and System IO task.

I have commented these questions on Rachael's blog, but just in case someone else reads this first and knows the answers ...

Hi Rachael.
Just a quick question about the "File Handling and System IO" task.
For Activity 8 we are asked to place five button controls on the interface (btnOpenFile, btnSaveFileAs, btnOpenLog, btnSaveLog and btnDeleteFile) but we are only given code to include for the first three. Is there some code missing from the assessment sheet or are those extra two buttons not required?
We are however given code for a button called btnClearTextbox which we have not yet added to the interface. Is this a new button or the code for one of the other buttons which we can just rename?
Hope this makes sense and that you are having a nice break.
Deb.

22 September, 2009

You learn something new everyday!

"Jackaroos (male workers) and Jillaroos (female workers) are station employees who undertake a range of activities on cattle and sheep stations."

Sadly, I knew all of the words in the Slang Words array apart from Jillaroo!!

08 September, 2009

Session 16

* For the first half of todays session we continued with the Chapter 11 project.
* Then we went over the relationships between the various classes in the project.

* A parent/child relationship exists between Student and OnCampusStudent.
* Student is the parent (or the base class) and OnCampusStudent is the child.
* OnCampusStudent inherits from Student.

* StudentCostsFile has an association only with Student and OnCampusStudent.

* In the Student class, the variables are declared with the keyword Protected.
* This means they can be seen by its subclasses.

* The chapter also talks about three tiers within the project:
1. The Presentation Tier: The interface.
2. The Persistence Tier: The data that you keep.
3. The Business Tier: Where all the main processing gets done.

Session 15

Today we worked through the Chapter 11 project - the Landelline College Registration Costs form. The whole thing was reasonably easy to do - however that doesn't mean I understood it! The two problems I had were 1. losing my completed interface when I went out for coffee, and 2. missing out the entire Else clause from the If statement on page 839 - very clever!

Session 14

Rachael gave us this session to work on the activity from yesterday seeing as a lot of people hadn't started it yet.

30 August, 2009

Session 13 Activity

Just finished the Database design and programming activity and am worried that I have done something wrong as it seemed pretty straight forward and only took half an hour to complete. And even then I created the form from scratch rather than saving a copy of the one we did in class, even if I did then pretty much replicate it. What have I missed??

25 August, 2009

Session 12

* Today we added some select clauses that contained filters (WHERE, LIKE) to our array, e.g.
"SELECT * FROM ApprovedTravelRequests WHERE Location = 'Richmond, VA'"
* The above query would return all records from the table where the Location was Richmond, VA.
* We can also run a "fuzzy" query that only looks for certain letters within the words:
1. "SELECT * FROM ApprovedTravelRequests WHERE Location LIKE 'R%'"
2. "SELECT * FROM ApprovedTravelRequests WHERE Location LIKE '%R'"
3. "SELECT * FROM ApprovedTravelRequests WHERE Location LIKE '%R%'"
* Example 1 would return all records where the location STARTS with an R, example 2 would return all records where the location ENDS with an R, example 3 would return all records where the location CONTAINS an R ANYWHERE in the name.
* The Percentage sign % is called a WILD CARD CHARACTER.
* We can also run queries using the relational operators >, <, >=, <=, <>, =, for example:
"SELECT * FROM ApprovedTravelRequests WHERE [Travel Cost] >= 1000"
* When using a numeric value there is no need to put it inside ''.
* We can also run queries using the logical operators AND, OR, for example:
"SELECT * FROM ApprovedTravelRequests WHERE [First Name] = 'Janet' And [Last Name] = 'Dunford'"
"SELECT * FROM ApprovedTravelRequests WHERE [First Name] = 'Janet' Or [Last Name] = 'Tirrell'"

Session 11

* In this session we talked a little more about SQL - Structured Query Language.
* An SQL statement always starts with either SELECT, DELETE, UPDATE or INSERT.
* We can also add a FILTER to an SQL statement, for example:
"SELECT * FROM ApprovedTravelRequests WHERE FirstName = 'Janet'"
SELECT * = SELECT ALL
ApprovedTravelRequests = Name of Table
WHERE = Filter
FirstName = Field
* The above will return all the details for that person.
* We can also specify which details should be returned:
"SELECT Location FROM ApprovedTravelRequests WHERE FirstName = 'Janet'"
* The above will only return the details from the Location field.
* To return the details from more than one field we use a comma between the field names:
"SELECT Location, TripDates FROM ApprovedTravelRequests WHERE FirstName = 'Janet'"

21 August, 2009

Session 10

* There are four database operations, three of which cause changes: 1. insert; 2. delete; 3. update; 4. select (only opens it).
* When constructing a database, ID IS KING!!
* All databases must 1. have an ID column, 2. use the AutoNumber data type to populate this column, 3. have a primary key defined.
* The new version of Access does these three things for you!
* DO NOT have spaces in your field names - either use capitals or underscores.
* SQL stands for Structured Query Language.
* In SQL * means all, e.g. the command "Select * from TableName".
* When writing our code in Visual Basic, objects need to be connected to a database.
* Rachael used the following analogies:
1. Connection String - The Supermarket address.
2. Connection Object - The car.
3. Command Object - The shopping list.
4. DataAdapter Object - Mum doing the shopping.
5. DataSet Object - The pantry.

17 August, 2009

Session 9

* Today we started talking about databases.
* A database is a type of PERSISTANT data storage.
* There are 2 different types of database - 1. Flat file and 2. Relational.
* An example of a flat file database would be an Excel spreadsheet (it deals with only one topic).
* An example of a relational database would be an Access file (can contain many different areas of information).
* The common features of relational databases are: creating tables; populating tables; retrieving data; generating queries; generating reports.
* Each TABLE in a database deals with a specific topic of information.
* Every column in a table is called a FIELD.
* Every row in a table is called a RECORD.
* When you define a new field you must also define the data type, e.g. text, memo, number, date/time, yes/no, currency, etc.
* Using related tables reduces repetition of data.
* When you are working with databases understanding how the IDs work is crucial.
* The first thing you should do when you build a table is define an ID field.
* The AUTONUMBER data type in Access provides an automatically incremented, sequential and unique number for our IDs.
* Every table has one PRIMARY KEY - a unique identifying feature (field) for the table.

Databases

* A database is a method of storing, managing and retrieving related information using tables.
* Technically a database is anything that stores information, so telephone books, filing cabinets, dictionaries, etc. are all databases.
* In business, common databases are customer lists, product information, mailing lists, etc.

http://www.asp.net/learn/sql-videos/video-103.aspx is a link to a video tutorial about databases that all who have commented on it say is a good, easy to understand tutorial for beginners.

11 August, 2009

Session 8

* In todays class we talked about file handling (working with simple text files).
* We talked about performing tasks such as creating, writing, reading, deleting, moving and copying the text files.
* We had to import the class library for StreamReader and StreamWriter to the application as it was not automatically included: Imports System.IO
* We then added code to the click event of each button on our form to perform the desired task, e.g.
1. btnCreateFile - File.Create("C:\mycreatefile.txt")
2. btnWriteFile - Dim objWriter As New StreamWriter("C:\mywritefile.txt")
objWriter.WriteLine("I am NOT a multimedia rockstar!")
objWriter.Close()
3. btnReadLine - Dim objReader As StreamReader
objReader = File.OpenText("C:\mywritefile.txt")
txtFileContents.Text = objReader.ReadLine()
objReader.Close()
4. btnReadFile - as btnReadLine except .ReadToEnd() replaces .ReadLine()
5. btnMoveFile - File.Move ("C:\mycreatefile.txt", "E:\Chisholm\Rachael\mycreatefile.txt")
6. btnCopyFile - File.Copy("C:\mywritefile.txt", "E:\Chisholm\Rachael\mywritefile.txt")
7. btnDeleteFile - File.Delete("E:\Chisholm\Rachael\mywritefile.txt")

10 August, 2009

Chapter 9 project

On page 695, where they give you the details for designing the form, there is a slight typo in the text for the button - it reads Calculate Depression instead of Calculate Depreciation! It's only a small typo and nothing to worry about, but seeing as my head is already buzzing trying to make sense of this chapter, it at least afforded me a little chuckle!! My Calculated Depression - off the scale :o).

Session 7

* In todays class, after the Chapter 8 test, we talked in more detail about arrays.
* An array is a variable that can store more than one value.
* Each item in an array that contains a value is called an element.
* Arrays provide access to data by using a numeric index to identify each element.
* To initialize an array you must write a declaration statement that includes the name of the array, how many items it has to store, and what sort of data it can store.
* Setting the size of an array is called dimensioning the array.
* If you know the values to be placed in each element you can declare the the array by assigning values to the elements.
* Parallel arrays store data in two or more arrays.
* If a number is not used int he declaration statement the array us implicitly sized, i.e. the number of values is determined at execution.
* The other aspects of arrays covered in Chapter 9 are:
1. Initializing an array with default values.
2. Accessing array elements using a loop.
3. Array boundaries.
4. Reinitialising an array.
5. Using the length property.
6. Scope of arrays.
7. Passing an array.
8. Sorting an array.
9. Searching an array.
10. Two dimensional arrays.

09 August, 2009

Chapter 8 project

In the btnClear_Click event handler, nine lines of code are used to change various labels, buttons, text boxes and list boxes from visisble to not visible. Isn't there a way of doing this in one line of code, i.e. so that you can say Me.(this and this and this and this).Visible = False??

Session 6

* Today we talked about the Try-Catch set of statements as well as the various types of exceptions used when handling errors.
* An exception is a class of objects.
* All exceptions share certain characteristics.
* Some of the possible exception types include:
1. ArgumentNullException - a variable that has no value is passed to a procedure;
2. DivideByZeroException - a value is divided by zero;
3. FormatException - a variable is converted to another type that is not possible;
4. NullReferenceException - a procedure is called when the result is not possible;
5. OverflowException - a value exceeds its assigned data type;
6. SystemException - used to catch all generic exceptions.

03 August, 2009

Session 5

* After the test we started working through Chapter 8, Using Procedures and Exception Handling.
* We talked about the fact that it's good to break your code into multiple small procedures so that they are easy to maintain and re-use.
* We recapped the difference between procedures and functions (a function returns a value).
* An example of procedure might be (the keyword sub tells us it is a procedure):
Public Sub MyProcedure()
'Do Something
End Sub
* An example of a function might be:
Public Function MyFunction() As Boolean
'Do Something
End Function
* Function is the keyword, MyFunction is the name, Boolean is the value.
* The data type or value stipulated depends on what the code is looking for.
* An example of a function is the IsNumeric function - it is a common task for which code has been written and added to the VB library so that it can be reused.
* We also briefly touched on the parameters ByVal and ByRef.
* When you enter arguments into a function, intellisense automatically adds in one of these parameters for each of the arguments.
* ByVal passes the actual object to the function (a duplicate is created), ByRef passes a reference to the object to the function.

02 August, 2009

Chapter 7 Test.

Just finished studying for the Chapter 7 test. Don't know if it's just me, but the multiple choice questions seemed a bit more "duh'uh" than normal, e.g. Which property of a CheckBox indicates that it has been checked? Erm, the Checked property??!! And which object shows the days organised by month relevant to the year? Erm, Calendar anyone??!! Or am I just being a smart arse ...

Chapter 7 project

This was a horrible project as the Guided Program Development had lots of confusing and omitted information. Once I got past the part where you had to resize and position the div elements it got a bit better. Spent a lot of time looking back in the chapter for information that seemed to be missed out though, for example the Guided Program Development omitted to tell you what to name the Calendar object so I had errors in my code. Luckily it was pretty easy to correct.

Session 4

* Last Tuesday we started off by talkign about string functions:
.Length - finds the length of strings
.ToLower() - converts the string to all lower case
.ToUpper() - converts the string to all upper case

* We also talked about Validation Controls, e.g. The RequiredFieldValidator.
* The RFV can be assigned a TextBox to "watch" or we can code the validation ourselves.

* Finally we worked on the Chapter 7 project ...

I Tweeted!

In session 3 we also set up Twitter accounts! My user name is Chippyandme.

We then opened up the Twitterizer.Framework file and imported the framework so that we could update our Twitter posts direct from our VB program - very cool!!

Session 3

Last Monday we started working through Chapter 7: Creating Web Applications.
* When you open a new website the basic metadata and html are already in place.
* The .aspx file extension refers to active server pages.
* The top line of the code tells the web page where all the dynamic code is.
* There are 3 possible views: Design (preview page), Split and Source (code only).
* In Solution Explorer the .aspx.vb file is where our VB code will go.
* When you run a Web Application for the first time an error message pops up - leave it as default and click on OK.
* When you run the program it mocks up the webpage in IE, and when you look at the source code extra code has been added in. This comes from the web.config file which never leaves the server.
* It is an excellent place to store sensitive information.
* It is written in XML which is a hierarchy of nodes not code and is written in plain English which makes it the transmission format of choice.

Session 2

At the start of session 2 we talked a little bit about Do loops.
* There are 2 types of Do loops - Do Until and Do While.
* Each of these can be either Top Controlled or Bottom Controlled, e.g.
TOP Controlled:
Do Until 1 To 10
'Body
Next
BOTTOM Controlled:
Do
'Body
Loop Until x = 10
* After this we worked through the Chapter 6 project - the Highway Radar Checkpoint program.

Semester 2 Begins.

Little bit slow at getting some posts up this semester - sorry.

Session 1 was spent mostly doing some revision of what we learned last semester, such as:
* Declaring and assigning variables
* Variable types e.g. string, char, integer, decimal, date, boolean
* Scope and lifetime of variables
* The concatenation operator &
* Using the MessageBox show method
* The difference between procedures and functions
* Decision structures - If statements and Selected Case statements
* The SDLC (Software Development Life Cycle)
* Class Diagrams
* Arrays
* Loops: For ... Next loops (when you DO know the number of loops to be executed) and Do loops (when you DO NOT know the number of loops to be executed)

19 May, 2009

End of programming for Semester 1.

Having sat the Chapter 6 Test today and handed in the Alarm Clock assignment last week, that is the end of the programming course requirements for this semester! As this means I probably won't be using Visual Basic for the next seven weeks ... I hope I don't forget everything I have learnt so far!!

17 May, 2009

Chapter 6 Test - again!

In the Multiple Choice part, question 12 and 13, just wondering if anyone can help. As I understand it from the book, when you have a For ... Next loop that runs from 1 To 4 the loop will run 4 times and stop when it gets to 5. Therefore, in question 12 when the values are 1 To 25 with a Step of 3, that would be 1, 4, 7, 10, 13, 16, 19, 22 and 25 - hence looping 9 times ... but when we ran that code in VB it seemed to stop at 25 therefore only running 8 times. Does that make sense? So basically, do people think the answer to number 12 is 8 or 9, and along the same lines in the answer to number 13 3 or 4?? Can anyone help???

Chapter 6 Test.

Quick question for anyone who's looked over the test paper. Where it says Visual Studio 2005 in a couple of the questions, I am assuming that we should just read it as 2008 and that it's not a trick question??

03 May, 2009

BLOG TASK: What other methods are available when using Now?

I found 40 alternative methods (other than AddMinutes) available when using Now:

Add; AddDays; AddHours; AddMilliseconds; AddMonths; AddSeconds; AddTicks; AddYears; Compare; CompareTo; DaysInMonth; Equals; FromBinary; FromFileTime; FromFileTimeUtc; FromOADate; GetDateTimeFormats; GetHashCode; GetType; GetTypeCode; IsDaylightSavingTime; IsLeapYear; Parse; ParseExact; ReferenceEquals; SpecifyKind; Subtract; ToBinary; ToFileName; ToFileNameUtc; ToLocalTime; ToLongDateString; ToLongTimeString; ToOADate; ToShortDateString; ToShortTimeString; ToString; ToUniversalTime; TryParse; TryParseExact.

20 April, 2009

Chapter 5 crossword.

Quick question for those who managed to get all the answers correct in the crossword - does anyone have a print out of it? I completed it over the holidays and got one answer wrong but could not see a way of finding out which one it was as it wouldn't let me go back. I tried to check a few that I thought might have been wrong by reentering them but they were all correct (amazingly). Can anyone help? It's starting to bug me ...

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!!

23 February, 2009

16 February, 2009

Monday's task.

This is a website that introduces Visual Basic for complete beginners. This might be a useful site for me as I know nothing!
http://visualbasic.about.com/od/standalonevb6/l/bllearnvba.htm

This is a link to the website for downloading the free Express Edition of Visual Basic 2008. I might not need this if I can get a copy of the full program but, just in case, it will be useful to access this easily in the future.
http://www.microsoft.com/express/vb/default.aspx

Day 1, Week 2

This is the first entry on my blog for Rachael's class.