August 18, 2005

Multilanguage Application

If you want to develope the Multi Language Application with newest Microsoft technology for supporting multi language feature then you can follow below:
New innovations in dot net technologies causes you not to need to add a new form for each language. You can have a form with multi configuration, image, and text … on interface.
Step 1: Insert New Form: Ctrl+Shift+A>WindowsForm
Step 2: Insert New Language: [On Form]RightClick>Properties>Design>Language>Select a new language like(French, Italy, US, Persian and ...)
Step 3: Insert New Language again: more and more...
Step 4: For Changing Languages you can use below
Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-FR");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-ES");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("it-IT");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("fa-IR");
PS: this method is compatible with Microsoft .Net Framework 2.0 Beta 2 Compiler but I think that you can use this for old version and newest version of .net resealed.

July 12, 2005

NSIS Error

Error:
Installer integrity check has failed. Common causes include incomplete download and damaged media. Contact the installer’s author to obtain a new copy.

More information at:
http://nsis.sf.net/NSIS_Error

Error:
The installer you are trying to use corrupted or incomplete.


Solution:
run you exe file in CMD mode.
[FileName].exe /NCRC

Solution:
This could be the result of a damage disk, a failed download or a virus.
You may want to contact the author of this installer to obtain a new copy.
It may be possible to skip this check using the /NCRC command line switch (NOT RECOMMENDED)
If you have this error then you can go to Start>Run>cmd (or command for Win98 or ME)
and then go to your destination folder and run your setup (or any exe file) like this:
[FileName].exe /NCRC
for Example:
SharpDevelop_1.1.0.1964MayBetaRefresh_Setup.exe /NCRC

July 10, 2005

Express Manager

Do you have quistion like these? ;-)

- Where's the SQL Server Express Manager?
- I can't see the SQL Server Express Manager in start menu.
- I install the Microsoft SQL Server 2005 CTP but i havn't SQL Server Express Manager.
- I have just "Configuration Tools" sub menu in "Microsoft SQL Server 2005 CTP" at start menu.

The new Express Manager with considerable GUI(graphic User Interface) is seprated than Microsoft SQL Server 2005 CTP Package that come with Microsoft Visual Studio 2005 Beta 2.0 and you must download it from microsoft site.
This package is ExpressManager.msi with about "1004KB" size
Aftre install the Microsoft SQL Server 2005 CTP and Express Manager, you must enable SQL Server (SQLEXPRESS). for this work you can used of these two ways:

1- Start > Run > SQLServerManager.msc > SQL Server Configuration Manager (local) > SQL Server 2005 Services > SQL Server (SQLEXPRESS) > Right Click >Start

2- Start > Run > compmgmt.msc > Service and Applications > SQL Server Configuration Manager > SQL Server 2005 Services > SQL Server (SQLEXPRESS) > Right Click > Start

After that you must start the Express Manager from start menu.

In first look you see the "Connect to Server" form that must enter a "Server Instance" and then press Connect. (for example you can enter ".\SQLEXPRESS" in editbox)

Application: Microsoft SQL Server2005 Express Manager Preview 1
Version: 9.00.1116.00

Ok, wellcome to Microsoft® SQL Server™ 2005 Express Manager.

PS: If you don't like that type ".\SQLEXPRESS" for ever strat the Express Manager you can use of Express Manager Arguments.

-? Show the list of Arguments
-S server_name[\instance]
-d database
-U user_login
-P password

Start>Run>C:\Progra~1\Micros~4\XM.exe -? (for show the all Arguments)
Start>Run>C:\Progra~1\Micros~4\XM.exe -E -S .\SQLEXPRESS (for start without command)

Or you can edit your shortcut and insert new Arguments at the last of the target field.
Start>\Microsoft SQL Server 2005 CTP>SQL Server Express Manager>RightClick>Properties>Taget>"C:\Program Files\Microsoft SQL Server 2005 Express Manager\XM.exe" -E -S .\SQLEXPRESS

May 30, 2005

Project Properties

Error: There was an error trying to load project properties window. Close the window and try again.
Object reference not to an instance of an object.

If you have this error and you can't load project properties and etc... Don’t worry! Because you have chance for continue your tasks without solving this error.
For example if you want to change your application's icon you must edit a XML base file in an editor (like notepad).
Go to your project directory and open [projectname].csproj (for example like WindowsApplication1.csproj) in notepad or any simple text editor.
You can see a part of a TEXT in XML format like below:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition="'$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.40607</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{CDBB5C9E-C36D-489B-A538-6FD750DE8CBC}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>WindowsApplication1</RootNamespace>
<AssemblyName>WindowsApplication1</AssemblyName>
<WarningLevel>4</WarningLevel>
<ApplicationIcon>app.ico</ApplicationIcon>
...
You can see the <ApplicationIcon>app.ico</ApplicationIcon> that can solve your Application Icon problem without loading the project properties page.
This XML file is so simple and you can solve more other problems with a little search;-)
After that, you must load your solution and compile it again.
This method is for Visual Studio Project 2005 (Whidbey) but absolutely can used for VSP2002 and VSP2003 and VSP2005Beta2 and I think that can be also used for Orcas (next generation of Visual Studio)
The mentioned points are for C# project but absolutely not different for VB.Net, J# and other .Net projects.