by digvijay
19. April 2011 19:29
I just watched this great presentation from Nikhil Kothari about Script#: Compiling C# to JavaScript using Visual Studio. Real nice!!!
by Digvijay
25. January 2011 05:32
The MCP site is way too slow to update results and certification status but I could see my results on Prometric site (it should have been before Jan 21, but better late than never )

So I feel great now that in 2010 alone I did clear 9 beta exams from Microsoft of the total 11 I appeared for.
EDIT:
Got it today!
_1401_thumb.png)
cheers!
by Digvijay
11. October 2010 10:21
I could register for the two new exams which are the first for Silverlight and Windows Azure.
Let us see how they go!
by Digvijay
29. June 2010 12:45
by Digvijay
30. March 2010 13:39
by Digvijay
20. October 2009 00:17
Last week I appeared and cleared the TS: Microsoft .NET Framework 3.5 - Windows Communication Foundation exam. I scored 870 of 1000 and I believe its a good exam for i plan to work with BizTalk Server 2009 in near future. I am now reading "Professional BizTalk® Server 2006 by Darren Jefford,Kevin B. Smith and Ewan Fairweather (amazon page) which is quite a good book for i can see that they really have tried to make it as practical as it can be for some one who has just started to work with BizTalk, know what you are doing is more important than how to do it.
Anyhow, i hope i get to work with BizTalk soon on a real assignment.
by Digvijay
18. September 2009 02:10
Over this weekend, I was just trying to perform a search in my (exchange account) Outlook inbox via a C# WinForms application and initially i assumed i would need to write an add-in and do so. However a quick search revealed that i could just use the interop assemblies and perform the search:
ApplicationClass app = new ApplicationClass();
app.AdvancedSearchComplete +=
new ApplicationEvents_11_AdvancedSearchCompleteEventHandler(app_AdvancedSearchComplete);
string folder = "'" + app.Session.GetDefaultFolder(OlDefaultFolders.olFolderInbox).FolderPath + "'";
app.AdvancedSearch(folder, "urn:schemas:httpmail:subject LIKE '%" + searchText +
"%' OR urn:schemas:httpmail:textdescription LIKE '%" +
searchText + "%'", true, DateTime.Now.Millisecond);
This above snippet sets up all we need to do the search and we handle it as follows:
void app_AdvancedSearchComplete(Search SearchObject)
{ if (!DesignMode)
{ try
{ if (SearchObject.Results.Count > 0)
{ items.Clear();
MailItem mailItemLoop = SearchObject.Results.GetFirst() as MailItem;
do
{ if (mailItemLoop != null)
{ items.Add(new OutlookSearchItem(mailItemLoop));
}
mailItemLoop = SearchObject.Results.GetNext() as MailItem;
}
while (mailItemLoop != null);
}
}
catch(System.Exception ex)
{ MessageBox.Show(ex.Message);
}
finally
{ // Do data binding for display
}
}
Here is a screenshot of the sample application:
The sample code is here:
I hope someone finds it useful!
by Digvijay
25. August 2009 02:49
Recently i read the blog post by Mads kristensen about IsolatedStorage (read here)and more often then ever i need to use IsolatedStorage in small applications i write that target Vista and Windows 7. However it was left to me read and write the settings and i felt it could be done better and i needed a finer control on the validation etc.
So i put together a nice example of using XmlSerializer with IsolatedStorage and now i use it with my applications.
I thought it would be cool to put it here if someone is interested in exploring the code or using it.
Leave me a comment if you use it and/or like it!
Download here:
by Digvijay
23. July 2009 01:05
I went back to SubSonic website just to check what is new and I was happy to see the 3.0 release. Just downloaded and started to play around with it. Also, this week while i was reading again my favorite book on Data Binding - "Data binding with Windows Forms 2.0" by Brian Noyce I thought I can just try the code I am writing with new shiney SubSonic 3.0!
ActiveRecord looks nice but i was thrilled to see the SimpleRepository Screencast and could not help writing a small application using it. It is quite flexible as far as selecting a Database is concerned. I have used SubSonic 2.x earlier and i liked it, after playing around for a couple of hours i felt what would i do without it.
And as Rob Conery said “A SimpleRepository which is just about zero-drag and even builds your database for you” and i was amazed to see it really does all that is promised!. Though the release has a few bugs when i was writing my demo application but i could see on GitHub other people discussing those bugs and proposing fixes.
Here you can download the demo application i wrote which shows some data binding concepts and how to go about using SubSonic SimpleRepository in a Forms application. Hope you find it informative.
But as Rob discussed in another post if SubSonic is a toy or a tool for serious development i would say i did use SubSonic 2.x in more than 4 projects which are in production now and I had far less bug reports where data access is concerned. And i hope to do better with SubSonic 3.x.
Let use see what comes next :)
by digvijay
12. June 2009 23:56
I am working on an application where we needed the user to be able to view a PDF and be able to add some annotations/comments and save it back. One choice was to just launch Acrobat Professional and let the user do what they wanted and other was to integrate Acrobat in our application.
Acrobat SDK (which is now free) does provide several samples and shows how to do it however, it is never easy to do it when you have a specific task in mind. I managed to show the PDF but adding the comment etc is not easy via the API and i was wondering how to enable comments and annotations when the Acrobat window is opened in my application.
I managed to do it via the API but I am not sure why it works sometimes and why it does not at other times.
Anyway, here is a snippet:
/// <summary>
/// Opens the document.
/// </summary>
/// <param name="fileName">Name of the file.</param>
public void OpenDocument(string fileName)
{
if (this._avDoc == null)
{
this._avDoc = new AcroAVDocClass();
}
if (string.IsNullOrEmpty(fileName))
{
throw new ArgumentNullException("The filename specified is either empty or null.");
}
if (!File.Exists(fileName))
{
throw new FileNotFoundException("The filename specified does not represent a file on disk or could not be found.");
}
this._currentFileName = fileName;
try
{
this._avDoc.Close(1);
bool b = this._avDoc.OpenInWindowEx(this._currentFileName,this.Handle.ToInt32(),
(int)AVOpenParams.AV_DOC_VIEW, 0, 0, (short)PDViewMode.PDUseNone,
(short)AVZoomType.AVZoomFitPage, 0, 0, 0);
Debug.WriteLine("OpenInWindowEx returned: " + b.ToString());
}
catch
{
throw;
}
}
This allowed me to render the acrobat in a Control derived window.
using Acrobat;
/// <summary>
/// The PDF Component.
/// </summary>
[ToolboxBitmap(typeof(PDFEditor))]
public class PDFEditor : Control
{
#region Fields
/// <summary>
/// The name of the currently open file.
/// </summary>
private string _currentFileName = string.Empty;
/// <summary>
/// The AcroBat AVDoc Interop object.
/// </summary>
private CAcroAVDoc _avDoc = null;
#endregion Fields
#region Properties
/// <summary>
/// Gets the name of the currently open file.
/// </summary>
/// <value>The name of the current file.</value>
public string CurrentFileName
{
get
{
return this._currentFileName;
}
}
.....
}
And yes, you need to have Acrobat Pro installed and a reference to the acrobat.tlb from COM tab added to your project.
Hope someone finds this Tip useful.