|
Shortcuts to useful VS.NET's commands
|
Total Hit (2636) |
Visual Studio .NET has a number of useful features that are often underused by developers, because they are hidden under several menus and not easily accessible. Here is a list of keyboard shortcuts to some of these commands:
Ctrl + - : moves the caret to its previous position.
Ctrl + Shift +
....Read More |
Rating
|
|
|
|
Hex - Convert from decimal to hexadecimal
|
Total Hit (3887) |
«Code LangId=2»' convert from decimal to hexadecimal
' if you pass the Digits argument, the result is truncated to that number of
' digits
'
' you should always specify Digits if passing negative values
Function Hex(ByVal value As Long, Optional ByVal digits As Short = -1) As String
' c
....Read More |
Rating
|
|
|
Understanding VS.NET public and private assemblies
|
Total Hit (2847) |
As you might have noticed, the Add Reference dialog in Visual Studio displays all the assemblies in the GAC, which brings up the following question: is there a way to have this list display assemblies that aren't in the GAC? The answer is yes, and the technique couldn't be easier.
Use the REGEDIT
....Read More |
Rating
|
|
|
|
Calculated columns that refer to relationships
|
Total Hit (2917) |
The DataSet is a container of multiple DataTables, and it allows to create parent-child relationships between two tables, as shown below:
«Code LangId=2»
' create a relationship between the Categories and the Products tables,
' against the CatID column
ds.Relations.Add(New DataRelation("CatPr
....Read More |
Rating
|
|
|
Object Oriented features in VB.net (Part-1)
|
Total Hit (5976) |
In this article we will discuss about Object Oriented Features available in VB.net
Let’s first understand the basic terminology used in Object Oriented Programming.
«big»Classes, Objects, Members and Abstraction«/big»
An object in programming is a construct that represents something from th
....Read More |
Rating
|
|
|
EasterDate - Evaluating the Easter date for a given year
|
Total Hit (2716) |
«Code LangId=2»' Evaluate the Easter date for a given year
' Example: MessageBox.Show(EasterDate(2003).ToLongDateString())
Function EasterDate(ByVal year As Integer) As DateTime
Dim g, c, h, i, j, l, month, day As Integer
g = year Mod 19
c = year \ 100
h = ((c - (c \ 4) -
....Read More |
Rating
|
|
|
|
DisplayExceptionInfo - Displaying error information
|
Total Hit (2798) |
«Code LangId=2»
' A reusable routine that displays error information
' Note: requires Imports System.Reflection
Sub DisplayExceptionInfo(ByVal e As Exception)
' Display the error message.
Console.WriteLine(e.Message)
Dim st As New StackTrace(e, True)
Dim i As Integer
....Read More |
Rating
|
|
|
Create Transparent Forms in VB.NET
|
Total Hit (2004) |
Generally, the classes form the «b»System.Drawing«/b» namespace are used to draw objects and print text directly on a form or control. However you can have some interesting visual effects by modifying just a few properties of a form.
There are two new properties now which will allow you to create
....Read More |
Rating
|
|
|
|
|
InputBox - A .NET replacement for this VB6 function
|
Total Hit (3469) |
«Code LangId=2»' Create an InputBox like the one of VB6. You can define the dialog's title,
' question and default value.
' Example: MessageBox.Show(InputDialog.InputBox("Type your name:", "Test",
' "Marco"))
Public Class InputDialog
Inherits System.Windows.Forms.Form
#Region " Windo
....Read More |
Rating
|
|
|
Retrieving the hi/low byte/word of a value, and other operations
|
Total Hit (4252) |
As explained in the tip about the ARGBColor structure (look at the end of this tip for the link), we can define a structure and have its fields that point to the same memory address, but that read a different number of bytes. This makes easier to define a structure that allows us to set a value to a
....Read More |
Rating
|
|
|
Packet Capture and Analayzer
|
Total Hit (2314) |
The first idea of writing a packet sniffer program came from a reply to my comments on one of the projects named "NetSend ( Sending popup messenger messages between computers )" by Marc Clifton. Marc asked me "What about receiving message". To say the truth, I didn't know how I could do that. I knew
....Read More |
Rating
|
|
|
How Do I...Create Resources?
|
Total Hit (661) |
Creating resources can help you develop robust, culture-aware programs without having to recompile your application because the resources have changed. The steps for creating and subsequently using resources are covered in this topic.
|
Rating
|
|
|
How Do I...Create DataSet mappings from an XSD schema?
|
Total Hit (961) |
This sample illustrates how to create DataSet mappings from a supplied XML Schema Definition language (XSD) schema. Generally, schemas are metadata, or data about data, but XSD schemas also cover the relationships between data types. From a schema, you can create a relational structure of tables and
....Read More |
Rating
|
|
|
XPath Tester
|
Total Hit (561) |
Using this page you can test your XPath Queries
|
Rating
|
|
|
ADO.NET: Retrieve Data using OLE DB
|
Total Hit (553) |
This sample illustrates how to read data from an OLE DB provider using the OleDbDataReader class. This class provides a way of reading a forward-only stream of data records from a data source. If you want to work with SQLServer 7.0 or higher, you should refer to the topic Retrieve Data from SQLServe
....Read More |
Rating
|
|
|
|
|
|
VB.NET & C# comparison cheat sheets
|
Total Hit (4180) |
Because developing with the .NET framework gives you the freedom to use multiple languages it can be a bit of a hassle to choose between them. VB.NET and C# are probably the most wide spread languages and a question that gets asked regularly on the ASP.NET forums is which one to choose. My answer: l
....Read More |
Rating
|
|
|
Executing Custom Code During Installation
|
Total Hit (1526) |
An application can consist of not only traditional program files, message queues, event logs, and performance counters on the deployment destination but also custom code that must be executed on the deployment destination. You can configure your application to execute the custom code when your appli
....Read More |
Rating
|
|
|
How to run your .net application using admin privilege under Vista?
|
Total Hit (959) |
Assume you're writing some application that really - I mean really really - needs administrative privileges (does it? you must be kidding). So, you want it to run evelated as an administrator. How to tackle this requirement in a Windows Vista and UAC world where even an administrator is locked down
....Read More |
Rating
|
|
|
User Tips: Converting URLs into Hyperlinks
|
Total Hit (2022) |
I just finished reading Designing Active Server Pages and was inspired by the regular expressions section. I would like to contribute some code... two functions which are fresh out of the oven!
These functions are to cater for web content stored in a database where URLs & email address are part
....Read More |
Rating
|
|
|
|
How Do I...Instrument a small application with tracing?
|
Total Hit (902) |
Trace instrumentation enables developers and administrators to monitor applications running in real-life settings (as opposed to running in a debugger). Sometimes using a debugger can hide bugs and obscure some performance and threading problems. Tracing is a very important monitoring and debugging
....Read More |
Rating
|
|
|
How Do I...Create an assembly with a strong name?
|
Total Hit (976) |
Assemblies can be assigned a cryptographic signature, called a strong name, which provides name uniqueness for the assembly and prevents someone from taking over the name of your assembly (name spoofing). If you are deploying an assembly that will be shared among many applications on the same machin
....Read More |
Rating
|
|