Sunday, December 13, 2009

Some urdu poetry that I found today and liked it !

In this poetry, the poet has asked his / her friend to end the grieves by giving him / her a little and sweet smile.
When one has much to take care of, and has many tensions in his / her daily life, there must be some one special that makes one happy even with a single smile !

Be sweet to the one who takes care of you and be a source of happiness for him / her !

See the splendid living of our shameless prime minister !

Saturday, December 12, 2009

Great comedian, Sohail Ahmad

Suicide attacks: Islamic view

Defining a true Muslim or defining the "Jihaad" would ask me to quote the example set by Hazrat Imam Hussain (God be pleased with him), the grand son of Holy Prophet Hazrat Muhammad (Peace be upon him).

Hazrat Imam Hussain (God be pleased with him) fought for the cause of Islam, and laid his life on this and not the lives of common people ! When Yazzid wanted Hazrat Imam Hussain(God be pleased with him) to accept his terms, Hazrat Imam Hussain(RA) decided to handle the matters with him by visiting his place. He had the option to have a fight / war with Yazzid on this in or near Madina city, but he did not ! This is becuase he thought that this could cause common peoples' deaths and ruins ! He decided to fight with or handle the matters with Yazzid himself alone or only including his family and close relatives, he did not pose this war on common public. He could ask the people of Madina to prepare for the war against anti Islamic view of Yazzid, wouldn't the common people be with him ? Of course they must had been with him, because they were his lovers and the lovers of Islam ! But see the greatness of Hazrat Imam Hussain(RA) that he did not decide to have the common people killed. He sacrificed himself for Islam, not the common poeople.

Now, the question is, how can one be the true Muslim ? The one who just has beard and says that he is Muslim ??? We know that the criteria is the actions, not our face ! True Muslim is the one that follows Hazrat Muhammad (PBUH) and his followers in his actions.

Now see, Usama bin Ladin (if he exists or existed) is / was not a true Muslim as he became the reason for casualties of common people, he did not follow Hazrat Imam Hussain(RA). He should have come to front to say the US that he is the reason for all this and they could do anything with him and save common people.

Now I should come to the current situation, the suicide attacks in Pakistan. These people are absolutely not Muslims ! Here I should explain one important thing, the suicide attackers have been brain washed by others, the enemies of Islam. See this link, how our enemies brain wash the innocent persons to become the reason of destruction : http://www.nation.com.pk/pakistan-news-newspaper-daily-english-online/Regional/Islamabad/12-Dec-2009/Bombers-artificial-Jannat-unearthed . See how they are preparing the young people to waste their lives for no cause !

If they are Muslims, why do they not come to front ? Is this the real Islamic way of preaching good values taught by Islam ? Is it right to kill common people who even do not know what is happening ?

If they want to make the people act right, act according to Islam, they MUST follow the examples set by our beloved Prophet(PBUH). You know, when our beloved Prophet(PBUH) used to be angry at some one's action, he(PBUH) just did not talk to that person, and that person used to ask colleagues(RA) of Prophet(PBUH) about what was the reason. By God, Prophet(PBUH) was the most lenient person in such matters, in teaching any thing or in forbidding from any thing, he(PBUH), God forgive me, did not kill any one to teach something or to forbid him from something. Think if you kill the actor, who will act then ? If some one does something wrong, he could do that by mistake, or he could do that because he / she has not been taught about that, so should we kill him / her ? We should become an example instead for others, as our beloved Prophet(PBUH) used to do.

As a last word, I would request you all to bear others, to explain things gently,... and most importantly, whenever you decide to do something, for God sake, see how our beloved Prophet(PBUH) did that.

Spread love like our beloved Prophet(PBUH) did. God bless you all !

Saturday, November 14, 2009

Deploying an Outlook 2003 custom form along with VSTO add-in

You can design a form using Microsoft Outlook form designer (Tools -> Forms -> Design a form). The form is saved as the template (.oft) file. An outlook user can design and set a custom form as his default email composing form by publishing the form.

When we need to use / access the custom form in VSTO plug-in code, we need to publish this form on end user's machine first and on that machine, make this form default for composing the new mails.

When publishing a custom form, we need to give it a class name, that distinguishes our form. When deploying on end user's machine, we need to tell outlook the form class name (our form class set during publishing on user's machine) to use for composing the emails.

I followed the following approach for publishing and deploying the custom Outlook 2003 form with VSTO add-in :
  1. Design the custom form as required in Outlook form designer.
  2. Add a custom action in the add-in installer to make registry entries in order to make our form default composing form :
    We need to set our form's class name (say the class name is "MyCustomForm") in the following registry entry :

    Registry key:

    HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Custom Forms\Compose

    Value name : IPM.Note
    Value type : binary (in our case, our form class name is MyCustomForm, so we will need to convert this string to binary and set this binary as the value of IPM.Note)

    We need to set the class "IPM.Read" as the default form class for reading the email messages so that our form should not be used for reading the email messages (if we have the form only for composing the emails). We will set this registry entry :

    HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Custom Forms\Compose

    Value name : IPM.Note
    Value : IMP.Read (need to convert it to binary first, have given the code later)
    Value type : binary

    Below is the code that sets the all above registry entries :

    string clsName = "IPM.Note.MyCustomForm";
    byte[] bytes = new byte[clsName.Length + 2];
    //Convert to binary
    for (int i = 0; i < bytes.Length - 2; i++)
    {
    bytes[i] = (byte)clsName[i];
    }

    bytes[bytes.Length - 2] = 0;
    bytes[bytes.Length - 1] = 0;
    Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Custom Forms\Compose", "IPM.Note", bytes, RegistryValueKind.Binary);

    //Set default reading form to be the outlook's default form for reading / opening messages.

    clsName = "IPM.Read";
    bytes = new byte[clsName.Length + 1];
    for (int i = 0; i < bytes.Length - 1; i++)
    {
    bytes[i] = (byte)clsName[i];
    }

    bytes[bytes.Length - 1] = 0;
    Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Custom Forms\Read", "IPM.Note", bytes, RegistryValueKind.Binary);
    }//try
    catch (System.Exception exception)
    {
    EventLog.WriteEntry("ILC Outlook 2003", "Error making custom form entries : " + exception);
    }

    We need to publish our form with class name as we set in the registry entry above for compose.
  3. Publish the form with class name e.g. in our case MyCustomForm.
  4. Access form's controls in the add-in code to make it function along with the add-in :

    e.g. Accessing a list box in add-in code :

    //Add reference to Microsoft.Interop.Vbe.Forms assembly
    //Add using statement as MSF= Microsoft.Interop.Vbe.Forms
    //Suppose you have modified the "Message" tab of the outlook custom form

    Inpector Inspector = Application.ActiveInspector();
    MSF.UserForm usf = (Inspector.ModifiedFormPages as Outlook.Pages)["Message"] as MSF.UserForm;
    MSF.ListBox lstAttachment = usf.Controls.Item("lstAttachments") as MSF.ListBox;
    // now you can use lstAttachment in your code anywhere.

Monday, September 7, 2009

Every thing should have a purpose

This world, this life has been granted for a good purpose, not for wasting it in fruitless things. One should realize his / her purpose in this world, so he / she could contribute something nice to this society.
More or less recently, I have seen some media discussions about the relationship of Veena Malik (an actor) and Muhammad Aasif (a cricket player). To me, this all looks much foolish and purposeless. Can anyone point out some real and fruitful purpose behind these inquiries and discussions about them ? Isn't media touching their privacy ? And we know how Islam protects one's privacy.
I would relate an occasion from the life of our belowed Prophet (Peace Be Upon Him) here. One day our Prophet (PBUH) was sitting in home and combing the hair. One of his companions came outside his door for some task / need and knocked his door. After knocking the door he also peeped inside the house of Prophet (PBUH) through the hole of the door. Prophet (PBUH) took notice of his this action, came out and said : "I could pull your eyes out with this iron comb if I wanted as you have violated my privacy.".
In this way one is allowed to punish the violators of his / her privacy. One of the media channels have published a video they captured by following Veena Malik's car. Isn't it nonsense ? Why is anyone concerned with their relationship, whether it exists or not ? There relationship is legal if they have got married. No one can have objection on this. Is someone getting harmed from their relationship ? If they are saying that they don't have any kind of relationship, why are media curious about asking more and more ? Actually, our media is not realizing their purpose and getting out of their bounds. They don't realize their real duties, legal and religious. They are just creating a mess in the society and harming the minds of the people, mostly illiterate young ones.

I would just name such actions as "Pendu Productions". I have seen such things in villages, where some one can expect such things as people are mostly illiterate, every one is peeping through others' private actions, really very bad and against Islam.

Let's try to correct ourselves and hence, correct our society.

Friday, September 4, 2009

Ramadan, a blessing of Allah

Ramadan is a great blessing of Allah. Fasting prevents a person from evils. This is a period of having tries to be good, to be honest, to be punctual in prayers & in one's duties. There is a good saying "Practice makes a man perfect", so this is a month of practice of virtues, a month allowing you to try to be perfect !

Very unfortunate is the person that does not practice fasting during this holy month. Such persons think, as they cannot understand, that this would make them weak, but this is a practice that strengthens a person's powers and abilities. Many of such illiterate persons feel proud after doing such evils, but they don't know that they are harming not only themselves, but also the society. But most important is that we should ask them to become right, that's our duty, so should be puntual to our duties so we could be near to perfection !

Be sweet & patient .... !