How to block websites websites
Go to 'Tools'-'Internet options'
Click on 'content' tab
Click on 'Enable'
Now you are on Content Advisor box.
Click on 'General' tab
Then click on 'Create Password' button
Enter your password
Confirm password
Enter an easy question on hint box(to recover password)
Press 'OK'.
Now once again go to 'Tools'-'Internet options'-'Content' tab
Click on 'Settings'
Enter your password.
Enter the website addresses on 'Allow the website' field.
Then click on 'Always' to allow always,'Never' to deny.
Press 'OK' to save.
How to enable/disable unnecessary programs from start up?
How to Install new fonts on your computer
Select 'Settings'
Select 'Control Panel'
Double click on 'Fonts'.
Now you are on Fonts folder.
Paste the font file
Click the drive and folder which contain the fonts you wand to install.
Double click on the font.The font is now installed on your computer.
In order to select more than one font press and hold 'Ctrl' key and click on the fonts to add.
Shortcut Keys in .NET
Shortcut Keys
Key | What it Does? |
Ctrl + N | Opens the New Project Dialogue Box |
Ctrl + Shift + O | Opens the Open File Dialog Box |
Ctrl + Shift + A | Opens Add New Item window |
Ctrl + D | Opens Add Existing Item window |
Ctrl + S | Saves Current Form |
Ctrl + Shift + S | Saves everything from Application |
Alt + Q | Exits Visual Studio. NET |
Ctrl + Z | Undo |
Ctrl + Shift + Z | Redo |
Ctrl + X | Cuts your selection |
Ctrl + C | Copies your selection |
Ctrl + V | Pastes your selection |
Ctrl + A | Selects All |
Del | Deletes your selection |
Ctrl + F | Opens Find window |
Ctrl + H | Opens Find and Replace window |
Ctrl + Shift + H | Opens Replace in Files window |
Ctrl + Alt + Shift + F12 | Opens Find Symbol window |
F7 | Opens Code Designer window |
Shift + F7 | Gets you back to Design View |
Ctrl + R | Opens the Solution Explorer window |
Ctrl + Alt + S | Opens the Server Explorer window |
Ctrl + Shift + C | Opens the Class View window |
F4 | Opens the Properties window |
Ctrl + Shift + E | Opens the Resource view window |
Ctrl + Alt + X | Opens the Toolbar window |
Shift + Alt + Enter | Takes you to Full Screen View |
Alt+F8 | Opens Macro Explorer window |
F2 | Opens Object Browser window |
Ctrl + Alt + T | Opens Document Outline window |
Ctrl + Alt + K | Opens Task List window |
Ctrl + Alt + A | Opens Command window |
Ctrl + Alt + O | Opens Output window |
Ctrl + Alt + Y | Opens Find Symbol Results window |
Ctrl + Alt + F | Lists Items under the Favorites Menu in your Internet Explorer |
Ctrl + Shift + B | Builds your project |
F5 | Runs your Application |
Ctrl + F5 | Runs your Application without Debugging |
Ctrl + Alt + E | Opens the Exceptions Dialog Box |
F8 | Used while Debugging Applications |
Shift + F8 | Used While Debugging Applications |
Ctrl + B | Inserts a New Breakpoint |
Ctrl + Shift + F9 | Clears All Breakpoints |
Ctrl + Alt + P | Opens the Processes Dialog box |
Ctrl + T | Opens Customize Toolbox window |
Ctrl + Shift + P | Runs Temporary Macro |
Ctrl + Shift + R | Records Temporary Macro |
Alt + F11 | Opens Macros IDE |
Ctrl + F1 | Opens Dynamic Help window |
Ctrl +Alt + F1 | Opens Help window sorted by Contents |
Ctrl + Alt + F2 | Opens Help window sorted by Index |
Ctrl + Alt + F3 | Opens Help Search window |
Shift + Alt + F2 | Opens Index Results window |
Shift + Alt + F3 | Opens Search Results window |
HOW TO REMOVE THIS PROBLEM WINDOWS CANNOT OPEN THIS FILE:rundll32.exe
If u have Win-XP please copy rundll32.exe file
1.Windows XP CD ROM disk in the CD ROM drive.
2.Click Start, and then click Run.
3.Type expand d:\i386\rundll32.ex_ c:\windows\system32\rundll32.exe in the Open box,. d=cdrive
4.Restart
How to change ip in vista
2.Click "Network and Internet" and then "Network and Sharing Center."
3.Click "Manage network connections."
4.Choose which Internet connection you would like to change if you have more than one. Right click on it and select "Properties."
5.Click the "Networking" tab.
6.Choose either Internet Protocol Version 4 (TCP/IPv4) or Internet Protocol Version 6 (TCP/IPv6).
7.Click "Obtain an IP Address Automatically" to reset your IP address automatically, then click OK.
8.Click "Use the following IP Address" to enter your own IP settings.
9.Enter your IP address into the boxes marked "IP Address," "Subnet Mask" (or "Subnet prefix length for IP/TCPv6) and "Default gateway."
How to remove extra windows from boot loader
How to remove extra windows from boot loader
initially open the computer then Right click on My Computer icon and select Properties. From the properties window go to Advance -> Startup and Recovery -> Settings.
There u can see edit button below System startup default operating system then click it. then there opens a file named boot.ini in note pad it is in the following format
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
delete the last line (Bolded line) .please take a backup copy of Boot.ini
finally restart the computer
another method for remove first windows
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
New boot text
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
delete the last line (Bolded line) change partition in red color
please take a backup copy of Boot.ini
restart computer
HOW TO READ DATA FROM ARRAY
Logical / Bitwise Operators in VB.NET
Logical / Bitwise Operators
The logical operators compare Boolean expressions and return a Boolean result. In short, logical operators are expressions which return a true or false result over a conditional expression. The table below summarizes them:
Operator | Use |
Not | Negation |
And | Conjunction |
AndAlso | Conjunction |
Or | Disjunction |
OrElse | Disjunction |
Xor | Disjunction |
Comparison Operators in VB.NET
Comparison Operators
A comparison operator compares operands and returns a logical value based on whether the comparison is true or not. The table below summarizes them:
Operator | Use |
= | Equality |
<> | Inequality |
< | Less than |
> | Greater than |
>= | Greater than or equal to |
<= | Less than or equal to |
Concatenation Operators in VB.NET
Concatenation Operators
Concatenation operators join multiple strings into a single string. There are two concatenation operators, + and & as summarized below:
Operator | Use |
+ | String Concatenation |
& | String Concatenation |
Arithmetic Operators In VB.NET
Arithmetic Operators
Arithmetic operators are used to perform arithmetic operations that involve calculation of numeric values. The table below summarizes them:
Operator | Use |
^ | Exponentiation |
- | Negation (used to reverse the sign of the given value, exp -intValue) |
* | Multiplication |
/ | Division |
\ | Integer Division |
Mod | Modulus Arithmetic |
+ | Addition |
- | Subtraction |
Do Loop in VB.NET
Do Loop
The Do loop can be used to execute a fixed block of statements indefinite number of times. The Do loop keeps executing it's statements while or until the condition is true. Two keywords, while and until can be used with the do loop. The Do loop also supports an Exit Do statement which makes the loop to exit at any moment. The syntax of Do loop looks like this:
Do[{while | Until} condition]
[statements]
[Exit Do]
[statements]
Loop
Example on Do loop
Module Module1 |
While loop Iin VB.NET
While loop
While loop keeps executing until the condition against which it tests remain true. The syntax of while loop looks like this:
While condition
[statements]
End While
Example on While loop
Module Module1 |
For Loop in VB.NET
For
The For loop is the most popular loop. For loops enable us to execute a series of expressions multiple numbers of times. The For loop in VB .NET needs a loop index which counts the number of loop iterations as the loop executes. The syntax for the For loop looks like this:
For index=start to end[Step step]
[statements]
[Exit For]
[statements]
Next[index]
The index variable is set to start automatically when the loop starts. Each time in the loop, index is incremented by step and when index equals end, the loop ends.
Example on For loop
Module Module1 |
Select....Case Statement in VB.NET
Select....Case Statement
The Select Case statement executes one of several groups of statements depending on the value of an expression. If your code has the capability to handle different values of a particular variable then you can use a Select Case statement. You use Select Case to test an expression, determine which of the given cases it matches and execute the code in that matched case.
The syntax of the Select Case statement looks like this:
Select Case testexpression
[Case expressionlist-n
[statements-n]] . . .
[Case Else elsestatements]
End Select
Example
Imports System.Console |
If....Else statement in vb.net
Conditional Statements
If....Else statement
If conditional expression is one of the most useful control structures which allows us to execute a expression if a condition is true and execute a different expression if it is False. The syntax looks like this:
If condition Then
[statements]
Else If condition Then
[statements]
-
-
Else
[statements]
End If
Understanding the Syntax
If the condition is true, the statements following the Then keyword will be executed, else, the statements following the ElseIf will be checked and if true, will be executed, else, the statements in the else part will be executed.
Example
Imports System.Console |
Access Specifiers In VB.NET
Access Specifiers
Access specifiers let's us specify how a variable, method or a class can be used. The following are the most commonly used one's:
Public: Gives variable public access which means that there is no restriction on their accessibility
Private: Gives variable private access which means that they are accessible only within their declaration content
Protected: Protected access gives a variable accessibility within their own class or a class derived from that class
Friend: Gives variable friend access which means that they are accessible within the program that contains their declaration
Protected Friend: Gives a variable both protected and friend access
Static: Makes a variable static which means that the variable will hold the value even the procedure in which they are declared ends
Shared: Declares a variable that can be shared across many instances and which is not associated with a specific instance of a class or structure
ReadOnly: Makes a variable only to be read and cannot be written
Namespaces in VB.NET
Namespaces
A namespace is a collection of different classes. All VB applications are developed using classes from the .NET System namespace. The namespace with all the built-in VB functionality is the System namespace. All other namespaces are based on this System namespace.
Some Namespaces and their use:
System: Includes essential classes and base classes for commonly used data types, events, exceptions and so on
System.Collections: Includes classes and interfaces that define various collection of objects such as list, queues,
hash tables, arrays, etc
System.Data: Includes classes which lets us handle data from data sources
System.Data.OleDb: Includes classes that support the OLEDB .NET provider
System.Data.SqlClient: Includes classes that support the SQL Server .NET provider
System.Diagnostics: Includes classes that allow to debug our application and to step through our code
System.Drawing: Provides access to drawing methods
System.Globalization: Includes classes that specify culture-related information
System.IO: Includes classes for data access with Files
System.Net: Provides interface to protocols used on the internet
System.Reflection: Includes classes and interfaces that return information about types, methods and fields
System.Security: Includes classes to support the structure of common language runtime security system
System.Threading: Includes classes and interfaces to support multithreaded applications
System.Web: Includes classes and interfaces that support browser-server communication
System.Web.Services: Includes classes that let us build and use Web Services
System.Windows.Forms: Includes classes for creating Windows based forms
System.XML: Includes classes for XML support
The Architecture of Data Binding
1. Create Connection Object. The connection that the users create, forms the basis for all other activities. In doing so the user creates a connect string and also a connection object that provides connection to the database.
2. Create DataSet and DataAdapter. Then the user proceeds to set the Data Binding property of the text box. At this stage the Visual Studio creates a DataSet and a DataAdaptor. The “Select ... “ statement for creating the DataSet is also autogenerated based on the selections the user has made in the Data Source configuration wizard.
3. Call the fill method of the DataAdapter to fill the dataset. This also adds a line of code that fills the dataset using the data adapter and the connection object . At the end of it all the data from the selected data source is available for the control when the form loads.
Data providers for other objects in .NET Framework
Binding data to form controls allows the user access data from databases as well as data in other structures, such as arrays and collections which support IList interface. The data providers for other objects in .NET Frameworkare listed below:
1. DataColumn object. The users can simple-bind a control (such as a TextBox control's Text property) to a column within a data table.
2. DataTable object. The user can complex-bind a control to the information contained in a data table (such as binding the DataGrid control to a data table) using the default view of the DataTable.
3. DataView object. The users can simple- or complex-bind to the data within a data view. However this provides a fixed snapshot of the data.
4. DataSet object. The users can simple- or complex-bind to the data within a dataset using the default view5. DataView Manager Object. It functions like DataView, with a difference that this snapshot comes with relationships that exists between the tables as seen in a DataSet.
Differences Between ADO and ADO.NET
ADO and ADO.NET are different in several ways:
-
ADO works with connected data. This means that when you access data, such as viewing and updating data, it is real-time, with a connection being used all the time. This is barring, of course, you programming special routines to pull all your data into temporary tables.
ADO.NET uses data in a disconnected fashion. When you access data, ADO.NET makes a copy of the data using XML. ADO.NET only holds the connection open long enough to either pull down the data or to make any requested updates. This makes ADO.NET efficient to use for Web applications. It's also decent for desktop applications.
-
ADO has one main object that is used to reference data, called the Recordset object. This object basically gives you a single table view of your data, although you can join tables to create a new set of records. With ADO.NET, you have various objects that allow you to access data in various ways. The DataSet object will actually allow you to store the relational model of your database. This allows you to pull up customers and their orders, accessing/updating the data in each related table individually.
-
ADO allows you to create client-side cursors only, whereas ADO.NET gives you the choice of either using client-side or server-side cursors. In ADO.NET, classes actually handle the work of cursors. This allows the developer to decide which is best. For Internet development, this is crucial in creating efficient applications.
-
Whereas ADO allows you to persist records in XML format, ADO.NET allows you to manipulate your data using XML as the primary means. This is nice when you are working with other business applications and also helps when you are working with firewalls because data is passed as HTML and XML.
Data Controls Used in Windows Forms
Control Name&Purpose
Eight data controls are available for Windows forms
DataSet
This control is used in conjunction with the other data controls, storing the results that are returned by commands and the DataAdapters. Unlike the recordset from ADO and DAO, the DataSet actually brings back a hierarchical view of the data. Using properties and collections in the DataSet object, you can get all the way down to individual tables, rows, and columns.
OleDbDataAdapter
This control stores and manages the commands you want to use against an OleDb provider such as Jet, Oracle, or SQL Server. The commands for selecting, updating, inserting, and deleting records can be used. The Connection against which to use the commands is also tracked.
OleDbConnection
This control maintains connection information for an OleDb provider. This control is used with the OleDbDataAdapter.
OleDbCommand
Similar to the ADO command object, this control allows you to execute SQL statements or stored procedures to either run bulk operations or return data.
SqlDataAdapter
This control is the same as the OleDbDataAdapter except that it is for use only against SQL Server stores.
SqlConnection
This control is the same as the OleDbConnection except that it is for use only against SQL Server stores.
SqlCommand
This control is the same as the OleDbCommand except that it is for use only against SQL Server stores.
DataView
This control creates multiple views of the same table. This includes looking at data in various states such as deleted, changed, or sorted differently