My sweet nephew, Jassim Aziem
Saturday, July 17, 2010
Wednesday, June 9, 2010
Some fun at river side (Chanab river Sialkot)
On last weekend, I went to river Chanab and had some fun there. It passes by my village, at a distance of about 3km. River Chanab starts from Jamu & Kashmir and from there it enters Pakistan at Bajwat (Border area near Sialkot). Next to Bajwat, we have Marala where two canals (Uper Chanab & Lower Chanab) are spawned out from River Chanab, this place is called Marala Head Works.
From Marala, Chanab river continues to west towards Gujrat, passing by the areas of Sialkot.
It passes by my village at about a distance of 25-30 km from Marala. Below are some pics that I captured during my visit to this river side.
From Marala, Chanab river continues to west towards Gujrat, passing by the areas of Sialkot.
It passes by my village at about a distance of 25-30 km from Marala. Below are some pics that I captured during my visit to this river side.
This is an example of soil erosion.
This is again due to soil erosion done by the river.
A scene just before evening.
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 !
Saturday, December 12, 2009
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 :
- Design the custom form as required in Outlook form designer.
- 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. - Publish the form with class name e.g. in our case MyCustomForm.
- 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.
Subscribe to:
Posts (Atom)