31 October 2006

Important article on application setting .net 2.0

The old way and the new way.
COM Self Registration - With interop dll
Referring to interop file with self regitstration ability just refer to the com dll and set the property Isolated to True and press save, then run the tlbimp with the dll and generate the interop file for that com and refer to it, the interop will be self registry for that com object part of the application.

30 October 2006

Click once Part 1

Suppose we have a desktop application(winform) and we need to convert it (get it) worked in web environment, Hard to maintain

Microsoft develop the new platform of having by click application execution, run from the network or install from the network (add shortcut) in local computer or event the legacy way of CDROM.

Called ClickOnce, Microsoft ship those platform with nice tools which ease to develop and handle so migrating your application to click once can be very easy and fun.

Things you need to look for when deploy ClickOnce in (for) your application,

• Security - Its hard to maintain secutiy permission sets acquired for the application deployment because each change in development phase can react on the deployment phase which is too risky.
I prefer to set the fulltrust for the application because my application almost do and will do everythings as ; IO, event log, Env, Registry and etc, So why to become involved in that story.

• Com object - Self registration is the key very simple in .net 2.0 (2005) just change a property and everythings will work, Why to use that / As all you know com object demand registration on local machine registry in order to work (Its a component), Read more on : Deploying COM Components with ClickOnce.

More issues i will update during my research and work on clickonce

29 October 2006

Something I encounter, in case you have got system which have thread on the air run in the background and they have their own mechanism of monitoring, in case the application trying to exit Application.Exit, or application.ExitThread, What you think will be, If you think your application is closing, so you are wrong, open the task manager and its still on the air, in previous 1.1 .Net framework it worked properly and application was really exit but now its not, So what you are going to do is To call Environment.Exit(code) and it will close.
Hello,

Thought you write code and run it and oppos the computer is shut down, ha !
So its happened to me and I tried to figure out why, what cause to that bug - a critical one, so Here the code who can shut down the computer you on it, Remember, I have no warranty to the code and its conclusions.

So,

Open a modal dialog and write this code, i.e. when the dialog closing event occurred

Win32.SetForegroundWindow(this.Owner.Handle);

this.ShowInTaskbar = false;


(must be in the same order).

Enjoy or not.