Sunday, May 20, 2012

The Exposed

I think it would be a negative sort of comment on the current technology rather on how well it is implemented.  We see that many of us are getting exposed by using social networking sites, they are only a part, but the major exposer is using the site that promise to provide excellent security but have a poor maintenance and tracking records are the culprit for the problem of Being Identified, sites like online sms, apps on phones that use contacts and online accounts, apps that use other site emails and password of the users have to be monitored on there activity by way of software's like firewall sort of a thing so that user can know of the activity of that code and what it is accessing.

Thursday, May 17, 2012

Xaml vs Docx– with Richtextbox and WPF

This week I was trying to create a small text editor, actually behind the scenes it is a notebook sort of a thing, but for this blog, it is a editor.  I tried with the WPF RichTextBox Editor, lets say that the control has to improve a great lot to make it easier and more flexible for programmer to work on but to the current extend for my program it is sufficient.  The TextRange class or object plays a major role in this, when saving the data, we need to use it this way:

Dim txtrange As New TextRange(mainRTB.Document.ContentStart, mainRTB.Document.ContentEnd)

Where MainRtb is my RichTextBox, the text range has the save function rather than the Rtb,  with this save feature there are many options like serialization, text, tiff etc and the one I choose is XamlPackage which is a merge of xaml format with zip compression, it is good.

I tested the file size by copy 162 pages of pure text from word to this format and the size is great difference, docx took 116KB were as xaml took only 19Kb, but even if there is a single image docx would have a upper hand.  I think looking into xaml compression for images would be a great improvement for future file handling.

Wednesday, May 16, 2012

AMD Revival

Finally, a revival to the fans of AMD like me, who is using AMD processors from childhood, AMD announced its TRINITY processor technology as a competitive and end of the success line of Intel Ivy Bridge processors.

For more details on trinity tech google it and 1st hand info can bee found at

Wednesday, May 9, 2012

Format Date Display throughout application

After a thorough searching and testing came to a way that helps in changing the display format of date or time to my wished format , in this case it is “dd/MM/yyyy” and the code is simple too.  It is as follows:

Dim c As System.Globalization.CultureInfo
c = System.Globalization.CultureInfo.CreateSpecificCulture(System.Globalization.CultureInfo.CurrentCulture.Name)
c.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy"
Thread.CurrentThread.CurrentCulture = c

and not to forget to import System.Threading.

Thursday, May 3, 2012

INotifyPropertyChanged – VB.NET Simple Way

Binding, making the UI data get sync/updated with the data is the most time taking coding area.  This aspect got simplified with the Two Way Binding in WPF or any .Net program.

It is easy to implement a INotifyPropertyChanged in VB program by doing these 3 lines of code where 2 lines at at class level and 1 at object level and not to forget “Imports System.ComponentModel”

Code Lines are:

Public Class SampleClass
        Implements INotifyPropertyChanged

Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged

RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(“Propety Name”))

Example follows:


Clear image can be found at

Edit:  The INotifyPropertyChanged is for a class or structure, in other terms, it is used to notify (raise event) to whom ever listening or using the property that the value is changed and do the needful as accordingly.