Windows Phone Developers

Sunday, July 20, 2008

Solution: Class must implement 'Sub OnDeserialization(sender As Object)' for interface 'System.Runtime.Serialization.IDeserializa

Solution: Class 'CVideoLibraryOrder' must implement 'Sub OnDeserialization(sender As Object)' for interface 'System.Runtime.Serialization.IDeserializationCallback'.

The above error occurs if the IDeserializationCallback.OnDeserialization is not implemented in the class, when the class has a non-serializable member

Sub IDeserializationCallback_Deserialize(ByVal sender As Object) Implements IDeserializationCallback.OnDeserialization

' Calculate the total after Deserialization

VTotal = VPrice * VQty

End Sub

Implements the ISerializable interface and is called back by the deserialization event when deserialization is complete.


Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

Solution for Error Type 'IDeserializationCallback' is not defined.

This error occurs when the class implements IDeserializationCallback interface but the required import directives are not available

Public Class CVideoLibraryOrder

Implements IDeserializationCallback

Public VID As Integer

Solution : Use the following Imports statement at the beginning of the class/module

Imports System.Runtime.Serialization

Each source file can contain any number of Imports statements. These must follow any option declarations, such as the Option Strict statement, and they must precede any programming element declarations, such as Module or Class statements.

You can use Imports only at file level. This means the declaration context for importation must be a source file, and cannot be a namespace, class, structure, module, interface, procedure, or block.

Import aliases are useful when you need to use items with the same name that are declared in one or more namespaces.

Note that the Imports statement does not make elements from other projects and assemblies available to your project. Importing does not take the place of setting a reference. It only removes the need to qualify names that are already available to your project.

Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

Programmatically Change the Caption of Windows Form using C#

Set Dialog / Form start-up position through C# code for Windows form

private void InitializeComponent()

{

this.components = new System.ComponentModel.Container();

this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

this.Text = "New Form";

this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

}


Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

Overload resolution failed because no accessible 'New' can be called with these arguments:

'Public Sub New(handle As Microsoft.Win32.SafeHandles.SafeFileHandle, access As System.IO.FileAccess)': Argument not specified for parameter 'handle'.

'Public Sub New(handle As System.IntPtr, access As System.IO.FileAccess)': Argument not specified for parameter 'handle'.

'Public Sub New(path As String, mode As System.IO.FileMode)': Argument not specified for parameter 'path'.


Occurs because the filepath argument is missing

Dim FS As FileStream = New FileStream(, FileMode.Open)

Solution

Dim FS As FileStream = New FileStream(“c:\sample.txt”, FileMode.Open)


Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

Office host applications and their support for add-ins

Host

Shared Add-In

VSTO 2005 SE Add-In

Access 2003

Yes

No

Excel 2003

Yes

Yes

FrontPage 2003

Yes

No

Outlook 2003*

Yes

Yes

PowerPoint 2003

Yes

Yes

Project 2003

Yes

No

Publisher 2003

Yes

No

Visio 2003

Yes

Yes

Word 2003

Yes

Yes

Access 2007

Yes

No

Excel 2007

Yes

Yes

InfoPath 2007

No**

Yes

Outlook 2007

Yes

Yes

PowerPoint 2007

Yes

Yes

Project 2007

Yes

No

Publisher 2007

Yes

No

SharePoint Designer 2007

No**

No

Visio 2007

Yes

Yes

Word 2007

Yes

Yes

* It is also possible to create Outlook 2003 application add-ins with Visual Studio 2005 Tools for Office without using VSTO 2005 SE. Thus, there are three ways to create add-ins for Outlook 2003: shared add-ins using COM Interop, Visual Studio 2005 Tools for Office, and VSTO 2005 SE.

** The Visual Studio 2005 Shared Add-In template does not list InfoPath or SharePoint Designer as supported hosts. However, if you manually create the necessary keys in the registry, both hosts will load shared add-ins created with the template.


Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

Friday, June 20, 2008

Change the Target .NET Framework Version of an Existing Project

Change the Target .NET Framework Version of an Existing Project

This procedure describes how to change the .NET Framework version target of an existing project.

To change the .NET Framework version of a project

1. In Visual Studio 2008, open the project you want to change.

2. Right-click the project in Solution Explorer and then click Properties. Doing this displays the Project Designer.

3. Go to the Target Framework drop-down list. For Visual Basic projects, click the Compile tab and then click Advanced Compile Options. The Target Framework list is in the Advanced Compiler Settings Dialog Box (Visual Basic). For Visual C# projects, the Target Framework list is on the Application tab of the Project Designer. For more information, see Application Page, Project Designer (C#).

4. In the Target Framework list, click a .NET Framework version that is different than the current one for your project.








Your project now targets the new .NET Framework version. The project will unload and then reload in the integrated development environment (IDE).
Note:
If you change the .NET Framework target to an different version, you may receive error messages if your code contains references to earlier or later assembly versions. To resolve these errors, you must manually modify the references.
Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

Solution for .NET Framework 2.0 update not found. The win32manifest will not be embedded.

Solved : .NET Framework 2.0 update not found. The win32manifest will not be embedded.









There are many issues when you upgrade your machine. One such issue came up with upgradation - the .NET Framework 2.0 update not found. The win32manifest will not be embedded.

One way to solve this is uninstall .NET 3.5 framework and re-install it.





Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon