Windows Phone Developers

Sunday, February 21, 2010

You must explicitly enable access to the Microsoft Office Visual Basic for Applications project system ...

You must explicitly enable access to the Microsoft Office Visual Basic for Applications project system before you can create or open a Visual Studio Tools for the Microsoft Office System project. By default, access is disabled to help stop the spread of macro viruses. After enabling access, you will still be protected by Microsoft Office macro security levels.

Do you want to allow access to the Visual Basic for Applications project system?








If you want to Turn in manually use the following options from Office




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

Is it necessary to have PIA installed on client-computer for OBAs

Strange but true, the answer is NO. Office Solutions can be used in computers which doesn’t have PIA, if it is developed in .NET 4 Framework

When you create an Office solution that targets the .NET Framework 4, the Office PIAs do not need to be installed on end user computers. By default, the Embed Interop Types property of each Office PIA reference in an Office project that targets the .NET Framework 4 is set to True. When you build the project, the type information for the PIA types that are used by your solution is embedded into the solution assembly. At run time, the embedded type information is used instead of the PIAs to call into the Office application's COM-based object model.

Following table (part of help) shows the difference in developing and deploying Office applications using different versions of .NET Framework

Feature

.NET Framework 4

.NET Framework 3.5

Deploy solutions without Office primary interop assemblies

When you target the .NET Framework 4, you can deploy solutions without the Office primary interop assemblies (PIAs).

When you target the .NET Framework 3.5, the Office primary interop assemblies (PIAs) must be installed on the end user computer before your solution will run.

C# features that simplify Office development

When you target the .NET Framework 4, you can use late binding to simplify the code you write to work with the Office object models.

When you target the .NET Framework 3.5, you must explicitly cast objects and use reflection to access late-bound members.

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

Saturday, February 13, 2010

How to Check if a Character is a WhiteSpace using C# (.NET)

Check if the character is white-space

This can be done using IsWhiteSpace Method in C#/VB.NET as follows



public void check_whitespace()
{
string sample = " StartsWith";
MessageBox.Show(Char.IsWhiteSpace(sample, 0).ToString ());
}
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, February 12, 2010

Customize Twitter with .NET (C#/VB) using Visual Studio

How to create Twitter Screen Saver in VB.NET

If you want to create Twitter Screen Saver in VB.NET, Visual Studio provides with an easy option ... use the Online Templates?

Go to New Projects --> Online Templates -->Select the Template You want

Here is the screen shot of the same

Visual Studio 2010 Online Project TemplatesTwitter Screen Saver in VB.NET 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

What are the Project Types in .NET 4.0 (Visual Studio 2010)

Types of Projects in .NET 4 (Visual Studio 2010)

VS 2010 (.NET 4.0) comes up with a wide range of possibilites for developers. Here is a list of C# project types

Windows Forms Application

WPF Application

Console Application

ASP.NET Web Application

Class Library

ASP.NET MVC Application

Silverlight Application

Silverlight Class Library

WCF Service Application

ASP.NET MVC Web Application

ASP.NET Dynamic Data Entities

Windows Azure

Office Applications (Excel 2010 Workbook, Outlook Addin, Word 2010 Document)

Activity Reports

WCF Workflow Application

Crystal Reports




Visual Studio 2010, .NET Framework 4.0 Application Types

Please refer Model View Controller (MVC) - Simply Explained! for more info on structure of MVC / MVVM. 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

Saturday, February 6, 2010

How to send mail using Gmail in C#

How to send mail using .NET


Here is a simple code that sends mail from gmail account

I have used this code to get the details from contact page to my mail ID



The code uses System.Net Mail namespace






protected void btnSubmit_Click(object sender, EventArgs e)
{

try
{
string sFrom = "telanganadeccan@gmail.com";
string sTo = "info@rowsandcolumns.in";
string sMessage = txtComments.Text + "\n" + txtName.Text;
string sSubject = txtName.Text;
string sMail = txtEmail.Text;
MailAddress oMailfrom = new MailAddress(sFrom);
MailAddress oMailTo = new MailAddress( sTo);
MailMessage message = new MailMessage(oMailfrom, oMailTo );
message.Body = "From " + sSubject + "\n Mail ID " + sMail + "\n Comments :\n" + sMessage;
SmtpClient client = new SmtpClient();
client.Timeout = 20000;
message.Subject = sSubject;
client.EnableSsl = true;
client.Send(message );

Response.Redirect ("~/Thanks.aspx");
}
catch (Exception ex)
{

Response.Redirect("~/Thanks.aspx");
}
}
}

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