Free Blog CounterEnglish German Translation
Google

Friday, July 18, 2008

Visual Studio Shortcuts

Hi
Will be making a new blog which will have all the knowledge i have about stocks and stock market.
Its always good 2 share ur knowledge 2 the world as sharing will never deplete u of ur knowledge but may be increase u r knowledge or better correct u if ur wrong. There are many stock market experts out there who know more about the stock market then i ever could but all of them keep their knowledge to themselves come on man share it. Make someone else happy 2 man. Neways this blog will strictly be technial that is about ASP.NET, C# etc. If u have ne doubt feel free to post ur queries here in the comments section. Will be glad to help. Also will be trying to put my queries here so that u all can answer them as i donot know everything n everyone needs help dude.

Lets start with some shortcuts in Visual Studio believe me they make u r life much easier.
Ctrl+Shift+B Build Solution
ctrl+F5 Start without debugging
F5 Start with debugging
ctrl (R+R) Word wrap
Ctrl-Shift-S Saves all documents and projects
F7 Switches from the design view to the code view in the editor
Shift-F7 Switches from the code view to the design view in the editor
Ctrl-End Moves the cursor to the end of the document
Ctrl-Home Moves the cursor to the start of the document
Ctrl-G Displays the Go to Line dialog. If the debugger is running, the dialog also lets you specify addresses or function names to go to
Ctrl-] Moves the cursor to the matching brace in the document. If the cursor is on an opening brace, this will move to the corresponding closing brace and vice versa
Ctrl-K, Ctrl-N Moves to the next bookmark in the document
Ctrl-K, Ctrl-P Moves to the previous bookmark
Ctrl-K, Ctrl-I Displays Quick Info, based on the current language
Ctrl-Down Arrow Scrolls text down one line but does not move the cursor. This is useful for scrolling more text into view without losing your place. Available only in text editors
Ctrl-Up Arrow Scrolls text up one line but does not move the cursor. Available only in text editors
Ctrl-Right Arrow Moves the cursor one word to the right
Ctrl-Left Arrow Moves the cursor one word to the left
Tab Indents the currently selected line or lines by one tab stop. If there is no selection, this inserts a tab stop
Shift-Tab Moves current line or selected lines one tab stop to the left
Backspace or
Shift-Backspace Deletes one character to the left of the cursor
Ctrl-K, Ctrl-C Marks the current line or selected lines of code as a comment, using the correct comment syntax for the programming language
Ctrl-K, Ctrl-U Removes the comment syntax from the current line or currently selected lines of code

Hope u liked the shortcuts we will have more discussion on technical things later.

Thursday, July 17, 2008

Timer Project

Hi Guys

This is a project to get used to Time in C#.

Open a Windows Form in C#.


using System;

using System.Drawing;

using System.Collections;

using System.ComponentModel;

using System.Windows.Forms;

using System.Data;
namespace TimerDemo

{

///

/// Summary description for Form1.

///

public class TimerDemo : System.Windows.Forms.Form

{

private System.Windows.Forms.Timer Clock;

private System.Windows.Forms.Label lbTime;

private System.Windows.Forms.Button btnStart;

protected string TimeInString;

protected int count;

private System.Windows.Forms.TextBox txtcheck;

private System.ComponentModel.IContainer components;
public TimerDemo()

{

// // Required for Windows Form Designer support

//

InitializeComponent();
// // TODO: Add any constructor code after InitializeComponent

}
public string GetTime()

{

int sec=0;

count +=sec;

return count.ToString();

}
///

/// Clean up any resources being used.

///

protected override void Dispose( bool disposing )

{

if( disposing )

{

if (components != null)

{

components.Dispose();

}

}

base.Dispose( disposing );

}
#region Windows Form Designer generated code

///

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

///

private void InitializeComponent()

{

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

System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(TimerDemo));

this.lbTime = new System.Windows.Forms.Label();

this.Clock = new System.Windows.Forms.Timer(this.components);

this.btnStart = new System.Windows.Forms.Button();

this.txtcheck = new System.Windows.Forms.TextBox();

this.SuspendLayout();

// // lbTime //

this.lbTime.Location = new System.Drawing.Point(40, 64);

this.lbTime.Name = "lbTime";

this.lbTime.TabIndex = 0;

// // Clock //

this.Clock.Tick += new System.EventHandler(this.Timer_Tick);

// // btnStart //

this.btnStart.Location = new System.Drawing.Point(40, 104);

this.btnStart.Name = "btnStart";

this.btnStart.Size = new System.Drawing.Size(64, 24);

this.btnStart.TabIndex = 1;

this.btnStart.Text = "Start";

this.btnStart.Click += new System.EventHandler(this.btnStart_Click);

// // txtcheck //

this.txtcheck.Location = new System.Drawing.Point(48, 152);

this.txtcheck.Name = "txtcheck";

this.txtcheck.Size = new System.Drawing.Size(64, 20);

this.txtcheck.TabIndex = 2; this.txtcheck.Text = "";

// // TimerDemo //

this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);

this.ClientSize = new System.Drawing.Size(292, 266);

this.Controls.Add(this.txtcheck);

this.Controls.Add(this.btnStart);

this.Controls.Add(this.lbTime);

this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));

this.Name = "TimerDemo";

this.Text = "Timer Demo";

this.ResumeLayout(false);
}

#endregion
///

/// The main entry point for the application.

///

[STAThread] static void Main()

{

Application.Run(new TimerDemo());

}
private void Timer_Tick(object sender, System.EventArgs e)

{

if(sender==Clock)

{

//lbTime.Text=GetTime();

int t=Convert.ToInt32(lbTime.Text);

int s=(t+1);

lbTime.Text=s.ToString();

if(lbTime.Text == txtcheck.Text)

{

Clock.Stop();

MessageBox.Show("The Timer Has Stooped","Timer Stopped",System.Windows.Forms.MessageBoxButtons.OK);

}

}
}
private void btnStart_Click(object sender, System.EventArgs e)

{

Clock=new Timer();

Clock.Interval=1000;

Clock.Start();

Clock.Tick+=new EventHandler(Timer_Tick);
this.Controls.Add(lbTime);

lbTime.BackColor=Color.Black;

lbTime.ForeColor=Color.Red;

lbTime.Font=new Font("Times New Roman",15);

lbTime.Text=GetTime();

}

}

}




Disclaimer:Visitors who use this website and rely on any information do so at their own risk.
We are not responsible for the contents or reliability of any other websites to which we provide a link and do not necessarily endorse the views expressed within them.
While we have made efforts to ensure the accuracy of our content (consisting of
articles and information), neither this website nor the author shall be held responsible for
any losses/ incidents suffered by people accessing, using or is supplied with the content.

Wednesday, July 16, 2008

Hi Guys my first tutorial on ASP.NET. I have thought many students ASP.NET but never written ne tutorials on the web. But hope this helps as i teach thsi tutorial from the very basic level as i do with my students. So lets start with the basic of we development. Please leave comments as taht helps to give u'll a better quality tutorial also tell me what else needs to be added here.
If u r web developer then u have definitely heard about Client Side and Server Side scripting. Well when the term server side comes it usually meand some server side technology used liek ASP.NET, php, jsp etc. Here we discuss about ASP.NET.ASP.NET as stated above is a servers ide technology. It does the server side coding of the website. Similarly there is a client side scripting.This involves javascript which is heavily used now-a-days. Client side as teh name suggest deals with the client side. The client side may involve things like validations for a from like a email form or ne website registration form which then is send to the server. Suppose that the email text is kept blank and still the form is send to the server. Theserver will throw an error whch will obviously waste bandwidth n more importantly time. Hence the client side scripting does such validations. Javascript now though is used for many othe fancy things like mouse trail etc.
The server side usually deals with all the database activities and all the activities that are secure. Whereas client side does not deal with ne secure thing as it is on teh client side n is not safe. Now-a-days Ajax is used which does a lot oftiem saving but we will not discuss that as that is advanced javascript.As we are using .NET framework there are certain things u should know about this .NET.What is .NET? .NET is nothing but a framework developed by Microsoft. All the code written in .NET is not directly compiled into machine code but into Intermediate Language. This is then converted to machine language by the .NET framework. Hence .NET framework needs to be installed in the machine where u r going to run the .NET code. ASP.NET uses IIS server to host the website.
We will be posting more tutorials check out the blog.

Disclaimer:Visitors who use this website and rely on any information do so at their own risk. We are not responsible for the contents or reliability of any other websites to which we provide a link and do not necessarily endorse the views expressed within them. While we have made efforts to ensure the accuracy of our content (consisting of articles and information), neither this website nor the author shall be held responsible for any losses/ incidents suffered by people accessing, using or is supplied with the content.

Saturday, July 12, 2008

Motivational Thoughts

I guys
I know the title of the blog n the name of the url do not match but hey the url of the title was already taken.
But dont worry will be putting in a whole lotta content about ASP.NET C# etc.

Neways for starting lets start wth something motivational. Reading motivational thoughts encourages me it will surely encourage n motivate u 2.

I learned that if you want to make it bad enough, no matter how bad it is, you can make it.
Gale Sayers

Where there's a will there's a way.
English Proverb

Determination gives you the resolve to keep going in spite of the roadblocks that lay before you.
Denis Waitley

The surest way not to fail is to determine to succeed.
Richard B. Sheridan

If you really want something, you can figure out how to make it happen.
Cher

A determined person will do more with a pen and paper, than a lazy person will accomplish with a personal computer.
Catherine Pulsifer

The difference between the impossible and the possible lies in a person's determination.
Tommy Lasorda

If you doubt you can accomplish something, then you can't accomplish it. You have to have confidence in your ability, and then be tough enough to follow through.
Rosalyn Carter

What this power is I cannot say; all I know is that it exists and it becomes available only when a man is in that state of mind in which he knows exactly what he wants and is fully determined not to quit until he finds it.
Alexander Graham Bell