NotifyIcon with WPF applications

NotifyIcon is an utility form System.Windows.Forms which can be used by any application to invoke the default notification from the system tray. As per my latest requirement, I have to create an application that runs on system tray and occationally shows notification using the system tray default notifications. While working with it, I have wasted a considerable amount of time, and thought it would be worth mentioning the same in a blog.

Shout it Submit this story to DotNetKicks Bookmark and Share
Read Disclaimer Notice

Microsoft TechEd 2012 on the Go.. Are you attending?

Well,  Microsoft is going Big with their event TechEd 2012 which will be held just in 2 days from now. Everyone is excited to visit Bangaluru for this awesome event and learn lot of technology. I am going to visit Bangalore soon. If you are going, just text me at and come and say hi to me during the event.

Visit the link below to know more about the event
Microsoft TechEd India 2012 -> Go Big

Now if you cannot join us in Bangaluru for this event, you can still see the event live. Register yourself immediately.

Catch TechEd Online for FREE!!!

Register for TechEd Live!
Click to Read Details!

I hope to see you all around.

Shout it Submit this story to DotNetKicks Bookmark and Share
Read Disclaimer Notice

Inter-Process Communication using MemoryMappingFile

In an operating system, a Memory Mapping file are virtual storage place which has direct byte to byte correlation between the Virtual Address Space and the corresponding physical storage. So when we access the Virtual Address space via a memory mapping file we are directly communicating with the kernel space where the file is actually loaded. The portion of calculation between the physical storage and logical storage is hence avoided.

Memory Mapping files allows application to access files in the same way as memory. Generally as address between the physical storage and virtual memory address space, we cannot access the physical address directly. But using Memory Mapping Files, the process loads a specific range of address within the process address space with which the storage of memory into the file can be done by just assigning value to a dereferenced pointers. The IO operation on a MemoryMapping file is so fast that from the programmers point of view it seems to be like accessing the memory rather than actual physical storage. To increase performance memory mapping files are not actually stored to the disk file as well, but rather it will be stored automatically in background when FlushViewOfFile is executed or paging file is written. To Read more about memory mapping files, read here.

Memory Mapping file inside .NET Framework

.NET introduces a separate namespace to handle Memory Mapping files. Previously, we needed to do this using unmanaged Api's but with the introduction of managed API into the .NET framework library, it becomes very easy to handle MemoryMapping file directly from .NET library.

As memory mapping files are loaded into memory on a separate range of address space, two process can easily share the same page file instance and thus interprocess communication can be made with fast access to memory. It is recommended to back data with an actual disk file when large data is loaded into memory, so that there is no memory leak on the system when there is large memory pressure.

Shout it Submit this story to DotNetKicks Bookmark and Share
Read Disclaimer Notice

Optimizing INPC Objects against memory leaks using WeakEvents

Working with WPF has always been a fun. Dealing with animation and richness in UI to its optimum level often gives you an edge to present something to your client and to ensure that your client shouts with a "WOW!". The Wow factor of applications can give you high rank in the first place, but increases expectation from the software. It is practically very hard to maintain with this expectation as time progresses. The survival of the fittest chooses one which best suits to the problem.

One of the major problems that developers face today is the memory leaks in an applications. Often the software that is built looks great but does not follow basic guidelines to ensure that the application is not memory hungry or even there are no existing memory leaks.

Note : By memory leak we mean, some portion of memory is not reclaimed by the garbage collector even though the object is not in use. 

By this way, the memory usage of the application increases at a certain extent and finally crashes with the OutOfMemoryException. To detect a memory leak there exists a large number of tools of which some are free while others are used as commercial purposes. Most of these problems can be fixed by either using Disposable pattern ( IDisposable interface) or manually de - referencing each and every object that are not in use. Sometimes, this can be also done in destructor / finalizers in .net too (but remember using destructors lose GC cycle).

Shout it Submit this story to DotNetKicks Bookmark and Share
Read Disclaimer Notice

I am reviewing Microsoft's 70-515 C# exam PrepKit from UCertify

I have got a offer from uCertify to review their PrepKit and I have accepted that challenge and now I am reviewing   70-515 Exam .NET 4.0 PrepKit from uCertify. Initially it looks like a simple tool that has a number of practice sets listed on the initial screen to try out few tests. The home screen also contains few links that points to Study Materials related to the exam that you are registered for. Lets take a look how the initial screen looks like :  

The menu contains different links to Tests, Quiz, Notes, Articles, Reports etc for easy navigation. 

As soon as I am done with the full review I will post it for you all.

If you are looking for a Certification, you can buy it from them :

Thanks and stay tune.
Shout it Submit this story to DotNetKicks Bookmark and Share
Read Disclaimer Notice

Awarded Microsoft MVP in a row

Its new years eve. I was struck in traffic to join a Birthday party of one of my friend. Its all of a sudden I realized that it is my MVP renewal date too. I forgot it totally.

I opened my Mobile, browsed to my account and saw, I have got a mail from MVP Award Team.

"Dear Abhishek Sur,

Congratulations! We are pleased to present you with the 2012 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others. We appreciate your outstanding contributions in Client App Dev technical communities during the past year.

The Microsoft MVP Award provides us the unique opportunity to celebrate and honor your significant contributions and say "Thank you for your technical leadership."

Nestor Portillo
Community & Online Support"

I am really passionate about this award and I am really happy to receive this award for yet another time in Client App Dev category. This came to me as a New Years Gift. Thank you so much Microsoft for considering my activities and I want to personally thank Mr. Abhishek Kant, as my MVP Lead,  Abhijit Jana, Kunal Chowdhury, Amit Bansal, Dhananjay Kumar, Pinal Dave, Anoop Madhusudanan and last but not the least my own Community KolkataGeeks all of whom inspired me so much on my community activities. I would also like to thank the whole Microsoft Team for providing us such an opportunity to be in touch with this elite group.

And finally thank you to all my blog readers. I feel truly honored to receive such an award.

Happy New Year to all of you. Its time to party..... .

Shout it Submit this story to DotNetKicks Bookmark and Share
Read Disclaimer Notice

Author's new book

Abhishek authored one of the best selling book of .NET. It covers ASP.NET, WPF, Windows 8, Threading, Memory Management, Internals, Visual Studio, HTML5, JQuery and many more...
Grab it now !!!