2007-12-21

Internet Explorer 8

Internet Explorer 8

Just as he was the first to talk about IE7, Bill Gates kept the tradition alive and discussed IE8 at the Mix ‘n Mash event here on campus yesterday. Bill was talking to some bloggers about IE.Next and called it IE8, the same way we do here in the IE team hallway.

So, yes, the version after IE7 is IE8. We looked at a lot of options for the product name. Among the names we considered and ruled out:

IE 7+1
IE VIII
IE 1000 (think binary)
IE Eight!
iIE
IE for Web 2.0 (Service Pack 2)
IE Desktop Online Web Browser Live Professional Ultimate Edition for the Internet (the marketing team really pushed for this one ;-)
Ie2.079 (we might still use this for the Math Major Edition)

Of course, some people care about other aspects of IE8 much more than they care about the name. As I’ve walked different people through the plan, I’ve gotten “Does it have feature X?” “When is the beta?” “When does it release” and even the more thoughtful “What are you trying to accomplish with this release?”

You will hear a lot more from us soon on this blog and in other places. In the meantime, please don’t mistake silence for inaction.

Thank you ieblog
Dean Hachamovitch
General Manager
Published Wednesday, December 05, 2007 2:33 PM by ieblog

2007-12-13

Serialize & Deserialize Class To File

This sample show serialize and deserialize by use binary format.

1. Import this 2 names space

Imports System.Runtime.Serialization.Formatters.Binary
Imports System.IO

2. The class or object that you want implement must insert attribute Serializable.

< system.serializable() >
Public Class Person
Private m_sFirstName As String
Private m_sLastName As String

Public Sub New()
End Sub

Public Property FirstName() As String
Get
Return Me.m_sFirstName
End Get
Set(ByVal value As String)
Me.m_sFirstName = value
End Set
End Property

Public Property LastName() As String
Get
Return Me.m_sLastName
End Get
Set(ByVal value As String)
Me.m_sLastName = value
End Set
End Property

Public ReadOnly Property FullName() As String
Get
Return Me.m_sFirstName & " " & Me.m_sLastName
End Get
End Property

End Class


3. Sample code show how to do this.

' Create object instance
Dim pPerson As New Person()

pPerson.FirstName = "TOM"
pPerson.LastName = "BROWN"

' Create file by FileStream class
Dim fs As FileStream = New FileStream("c:\test.bin", FileMode.OpenOrCreate)

' Creat binary object
Dim bf As New BinaryFormatter()

' Serialize object to file
bf.Serialize(fs, pPerson)
fs.Close()

' Open file and deserialize to object again
Dim fsRead As New FileStream("C:\test.bin", FileMode.Open)
Dim objTest As Object = bf.Deserialize(fsRead)
fsRead.Close()

2007-12-01

Caculate DateTime By TimeSpan Class

A TimeSpan object represents a time interval, or duration of time, measured as a positive or negative number of days, hours, minutes, seconds, and fractions of a second. The largest unit of time used to measure duration is a day. Time intervals are measured in days for consistency because the number of days in larger units of time, such as months and years, varies.

Sample Code

Dim dFirstDate As DateTime = DateTime.Now

' Add day
Dim dLastDate As DateTime = DateTime.Now.AddDays(15)

' Subtract DateTime
Dim pTimeSpan As TimeSpan = dLastDate.Subtract(dFirstDate)

' Subtract DateTime Output
Console.WriteLine("Days : " & pTimeSpan.TotalDays)
Console.WriteLine("Hours : " & pTimeSpan.TotalHours)
Console.WriteLine("Minutes : " & pTimeSpan.TotalMinutes)
Console.WriteLine("Seconds : " & pTimeSpan.TotalSeconds)

' Compare DateTime
Dim nResult As Integer = DateTime.Compare(dLastDate, dFirstDate)
If nResult = 0 Then
Console.WriteLine("First date is equals to Last date")
ElseIf nResult > 0 Then
Console.WriteLine("First date is lesser than the Last date")
Else
Console.WriteLine("First date is greater than Last date")
End If