Support us on YouTube by Subscribing our YouTube Channel. Click here to Subscribe our YouTube Channel

Thursday 30 April 2015

Visual Studio Code - A Free Cross-Platform Code Editor For OS X, Linux And Windows

Introduction:
Scott Guthrie, Microsoft's executive vice-president of cloud and enterprise introduced Visual Studio Code at Microsoft Build 2015 conference held on Wednesday. Visual Studio Code is the first code editor and first cross-platform development tool supported by the OSX, Linux and Windows in the Visual Studio Family. Visual Studio Code provide built-in support for ASP.NET 5 development with C#, Node.js as well as for web technologies such as HTML, CSS, Less, SASS and JSON etc.

Installation Procedure:
Go to https://code.visualstudio.com/ and Click on Code for Windows button.
Visual Studio Code Install
or Go to https://www.visualstudio.com/products/code-vs and Click on Download Code button.
Visual Studio Code Install
Select operating system/platform on which you want to install (Code is free and available on Linux, Mac OSX and Windows). I am going to install it on my Windows 8 Operating System.
Visual Studio Code Install
After Downloading VSCodeSetup.exe (58 MB approx), Double click on setup. It will hardly take 1 minute to complete the installation.
Visual Studio Code Setup file

Visual Studio Code Splash Screen
Installation Completed Successfully. We are ready to explore its cool feature.
Visual Studio Code Main Screen
User Interface of VSCode is divided into 4 areas:
1. Editor
2. Sidebar
3. Statusbar
4. Viewbar

Visual Studio Code UI

Features:
1. Command Palette:
With the help of Command Palette, you can access all the functionality of VSCode. Press Ctrl+Shift+P or F1 to open the Command Palette.
Visual Studio Code command palette
2. Multi-Cursor:
VSCode has support for Multiple cursors. You can edit the same file at multiple places by pressing Alt+Click which will add another cursor(much Similar to the Sublime Editor).
Visual Studio Code multi-cursor
3. IntelliSense and Syntax coloring:
Visual Studio Code features
4. Debugging, Themes Customization and lots of other features
Visual Studio Code Theme

For more information, visit https://code.visualstudio.com/Docs
Hope you like it. Thanks.

Saturday 18 April 2015

AutoCompleteTextBox in C# Windows Form Application

In this Article, We will learn how to create AutoCompleteTextBox using C# Windows Form Application. In my previous article, we learned How to Search Records in DataGridView Using C#.

Let's Begin.
Create a new Windows Form Application.
Drop a Label and TextBox Control from the ToolBox.
Now go to Code behind file(.cs code) and add the following Code:
using System;
using System.Windows.Forms;

namespace AutoCompleteTextBoxDemo
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        //AutoCompleteData Method
        private void autoCompleteData()
        {
            //Set AutoCompleteSource property of txt_StateName as CustomSource
            txt_StateName.AutoCompleteSource = AutoCompleteSource.CustomSource;
            //Set AutoCompleteMode property of txt_StateName as SuggestAppend. SuggestAppend Applies both Suggest and Append
            txt_StateName.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            txt_StateName.AutoCompleteCustomSource.AddRange(new string[]{"Maharastra","Andhra Pradesh","Assam","Punjab","Arunachal Pradesh","Bihar","Goa","Gujarat","Haryana"});
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            autoCompleteData();
        }
    }
}
In the preeceding code, We set the AutoCompleteSource, AutoCompleteMode and AutoCompleteCustomSource properties of Textbox named as txt_StateName so that it automatically completes the input string.
Preview:

AutoComplete TextBox using a Database:
In this example, We will Suggest/Append the data in TextBox(txt_StateName) from the Database. For Demonstration, I have created a Database (named Sample). Add a Table, tbl_State. The following is the table schema for creating tbl_State.
Add the following lines of code:
using System;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace AutoCompleteTextBoxDemo
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }
        private void autoCompleteData()
        {
            SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=Sample;Integrated Security=true;");
            SqlCommand com = new SqlCommand("Select State from tbl_State", con);
            con.Open();
            SqlDataReader rdr = com.ExecuteReader();
            //AutoCompleteStringCollection Contains a collection of strings to use for the auto-complete feature on certain Windows Forms controls.
            AutoCompleteStringCollection autoCompleteCollection = new AutoCompleteStringCollection();
            while (rdr.Read())
            {
                autoCompleteCollection.Add(rdr.GetString(0));
            }
            //Set AutoCompleteSource property of txt_StateName as CustomSource
            txt_StateName.AutoCompleteSource = AutoCompleteSource.CustomSource;
            //Set AutoCompleteMode property of txt_StateName as SuggestAppend. SuggestAppend Applies both Suggest and Append
            txt_StateName.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            txt_StateName.AutoCompleteCustomSource = autoCompleteCollection;
            con.Close();
        }
        //Form2_Load Event
        private void Form2_Load(object sender, EventArgs e)
        {
            autoCompleteData();
        }
    }
}
Preview:
Hope you like it. Thanks.
[Download Source Code via Google Drive]
Protected by Copyscape Plagiarism Checker - Do not copy content from this page.

Sunday 12 April 2015

How to Install Windows Phone 8 SDK (Step by Step Guide):


In this Post, We will see How to Install Windows Phone 8 SDK. Before Installing, Have a look at System Requirements for Installing Windows Phone 8 SDK.
You can download Windows Phone 8 SDK from Microsoft's website in two ways:
1) Windows Phone 8 SDK Offline Version (1.6 G.B.).
2) Windows Phone 8 SDK Web Version.

I am going to install it using Offline Installer. Before Installing, Go to Control Panel-> Programs and Features -> Click on Turn Windows features on or off. Install/Turn on Hyper-V.
Now Extract/Mount the .iso file of Windows Phone 8 SDK. and Double Click on WPexpress_full.exe and Install it.

After Successful Installation, Open Visual Studio -> Click on New Project -> Under Windows Phone Template, You will see Windows Phone Application projects.

Hope you like it. Thanks.
www.copyscape.com

Subscribe us on YouTube

Subscribe Now

Popular Posts

Contact us

Name

Email *

Message *

Like us on Facebook