Monday, April 09, 2012

Creating an Office Ribbon in Outlook

I have stared working on an Outlook addin which shall have the most commonly used utilities needed. I shall be releasing the tool as freeware , but till then let me share how can you integrate an Office Fluent Ribbon to Outlook.

I am using Addin Express to do this , and below are the steps I have followed

1) Add a AdxRibbonTab and ImageList in the Visual Designer.
2) In the Imagelist one can add several images , and access them by the index, 0 being the first image in the Imagelist.
3) Add the buttons in the Ribbon tab, in my case I have added two Convert to PDF, and About.

Now you can tie up the button events and write your code there.



Wednesday, April 04, 2012

Enabling and disabling Office Addins programatically using C#

The following code is an example for enabling / disabling Outlook addins.

I have used the Interop.Outlook as I was developing for Outlook. If you want to do this for other Office applications, eg, Word , Excel, Powerpoint, please reference the respective interop.

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Office.Core;
using Microsoft.Office;
using Microsoft.Office.Interop.Outlook;


private static void Connect(bool bStatus)
{
  // More code
   
objComAddin.Connect = bStatus;

}
}

Monday, February 27, 2012

Time Tracking using Fanurio

Productivity is often a measure of the time spent to get the task done. However, often during our work, sometimes one might get busy with several other things . like preparing a meeting agenda, responding to personal emails – which distracts the person from the original work. The time tracking in this scenario becomes a bit complex as one did not work on the assigned task for the entire eight hours.

A time tracking tool, like Fanurio is very handy to tackle software project management . The user can start the timer, when starting the actual work, and pause / resume the timer when he/she is working on something else ( eg. responding to personal emails). The tracking lets the user know what is the exact number of hours he had spent for the primary task. This also lets the client know the actual time spent for the projects, and thereby provide transparency between the user and the client for hourly jobs.
When the user is idle for a considerable time, the tool can also let the user know using notifications – at times notifications might act as a reminder to start the main task.

Monday, August 29, 2011

Hiding the scroll bar in Checklistbox

Recently I was working on a checklist box control, which was disabled  but did not prevent the vertical scroll bar from appearing. As I had to to keep the checklist box disabled,  I added a panel  on to the checklist box, but still the horizontal scroll bar was visible. Please see the comparison in the picture.



The only resolution I could come was to hide the scroll bar of the checklist box from appearing. I wrote the following code and instantiated an object of it, and it did the trick.

Thursday, November 25, 2010

Implementing Timeout feature in C#

The timeout feature is a handy tool in computer programming , when the user wants to execute some code  after a specific time period . Normally the timeout feature can be acheived by the Sleep command. The following code has a sleep for 2 seconds; also note that Sleep blocks the calling thread .

if (timeout > 0 )
  Threading.Sleep(2000);


Now, what if the user wants to do a polling - there are several options like Timers, WaitforSingleObject , and many others according to your needs . The code I am providing below , also implements the timeout feature using the StopWatch class .