Monday, November 24, 2008

Change the manufacturer name in a .CAB file.

Few days ago I faced a problem about changing the manufacturer name in a .cab file. I solved the problem and sharing the solution with you.
To change the manufacturer name, open the .vddproj file in notepad. Find the manufacturer name there and change it. Also change the company (manufacturer) name in project Properties -> Application -> Assembly Information. After this rebuild the .cab. The manufacturer name will be changed. Now the question is how you will be sure that the manufacturer name has been changed? It is very simple. Just install the .cab in a device. After this go to RemoveProgram option of device. You will see the manufacturer name of the application. Or you can check in another way. First install the .cab in a device. Again try to install the same cab in that device. You will get a message that will warn you about the existence of that application in the device. In that message you will see the name of the manufacturer.

Saturday, November 22, 2008

Device connection problem

Sometimes it is seen that we have connected a Windows Mobile device through data cable with our pc, but the connection is not established. There may be many reasons. One of them is blockade by Firewall. Sometimes the firewall in our pc blocks the port that is being used to create connection between our pc and WM device. In this situation, we have to stop the service of the firewall to create the connection.

Friday, November 21, 2008

Set image as Form background in Windows Mobile.

In Windows Application we can set an image as a Form background easily as there exists a property of the Form named “FormBackgroundImage”. But in Windows Mobile Application Forms does not have this type of property. So, here if we want to set an image as a Form background then we can use a PictureBox Control having the same size as the Form and set an image in that PictureBox. But the problem is that after adding the PictureBox Control to the Form if we add any control dynamically to that Form, it will not be visible as the PictureBox control overlaps on it. So this technique is not good. Another technique is, we can use DrawImage method to set an image as Form background. Here we can easily add controls dynamically to the Form; the controls will remain visible.