Common Tasks in Visual Basic and Visual C#
Visual Studio .NET 2003
This topic is designed to help you quickly find the answers to your most frequent questions about programming in Visual Basic .NET. The following areas are represented in the list below:
Note Some features listed in this topic are not available in the Standard Editions of Visual Basic and Visual C# .NET. For more information, see Visual Basic Standard Edition Features or Visual C# Standard Edition Features.
Projects
How do I ...
- Upgrade my Visual Basic 6.0 project to Visual Basic .NET?
- Upgrade from J++ to C#?
- Create a new project?
- Reference a .NET or COM component?
- Reference an XML Web service?
- Add new files to my project?
- Adding existing files to my project?
- Add resources to my application?
- Make a copy of a project?
Windows Forms and Windows Applications
How do I ...
- Create a Windows application?
- Add a Windows Form to my application?
- Create a form that inherits from another Windows Form?
- Add controls to a Windows Form?
- Add controls at run time?
- Create a dynamic layout for my Windows Form?
- Choose the form to display when my application starts?
- Handle events on a Windows Form?
- Handle multiple events with the same procedure?
- Display message box prompts?
- Display modal dialog boxes?
- Add menus and menu items to my application?
- Create an MDI application?
- Draw lines and shapes?
- Create a Windows application in another language?
- Provide Help for my application?
Web Forms Pages and Web Applications
How do I ...
- Create a Web application?
- Add a Web Forms page to my application?
- Add controls to a Web Forms page?
- Add HTML controls to a Web Forms page?
- Handle events on a Web Forms page?
- Use styles to customize the appearance of my server controls?
- Reference controls on a Web Forms Page?
- Make sure that users fill in the required fields on my Web Forms page?
- Save Web Forms page values between round trips to the server?
- Create user controls and custom controls?
- View my Web Forms pages in a browser?
- Create a Web Forms page that will work with different browsers?
- Localize a form for different languages?
- Select an encoding for my Web pages?
- Secure my Web application?
- Protect against script exploits in my Web application?
- Display safe error messages?
- Use encoding to open and save files?
- Access SQL server as a local user?
- Access SQL server using Windows integrated security?
XML Web Services
How do I ...
- Create an XML Web service?
- Access an XML Web service so I can use it in my application?
- Add methods to my XML Web service?
- Publish my XML Web service so that others can find it?
- Secure my XML Web service?
- Handle and raise exceptions in XML Web services?
Component Creation
How do I ...
- Create a reusable library of classes?
- Create a Windows Forms user control in my project?
- Create a Windows Forms custom control in my project?
- Create a Web Forms user control in my project?
- Create a Web Forms custom control in my project?
- Use COM+ services for my class?
Windows Services
How do I ...
- Create a Windows service?
- Monitor the activities of an existing Windows service?
- Install a Windows service?
- Start a Windows service?
Data
How do I ...
- Decide which data access strategy to use?
- Create a connection to a database?
- Retrieve data from a database?
- Add new data to the data I have retrieved?
- Write changed data back to my database?
- Filter rows in my retrieved data?
- Update a database with the results of my work?
- Execute a command against a database?
- Check for and handle concurrency errors in my data?
- Bind to data in a Windows Form?
- Bind to data in Web Forms page?
XML
How do I ...
Server Components
How do I ...
- Monitor changes to my file system?
- Monitor and control a Windows process?
- Use a timer?
- Read from and write to event logs?
- Create my own performance counters?
- Read from and write to performance counters?
- Create my own message queues?
- Read entries from a message queue?
- Send messages to a queue?
Debugging and Tracing
How do I ...
- Debug a Windows application?
- Debug a Web application?
- Debug an XML Web service?
- Debug a Windows service?
- Debug a class library or user control?
- Set breakpoints?
- Monitor the values of variables?
- Add tracing functionality to my application?
- Read from and write to event logs?
Deployment
How do I ...
- Work with multiple versions of the .NET Framework?
- Specify the runtime version for my application?
- Create a setup program for my application?
- Add a custom installer?
- Create a CAB file?
- Deploy my application over the Web?
- Make a property value configurable after deployment?
Language (Visual Basic)
How do I ...
- Declare a variable?
- Write an If condition?
- Write a For loop?
- Write a Case condition?
- Write a While loop?
- Enumerate a collection or array?
- Convert the type of a variable?
- Define and use an array?
- Define a class?
- Define a property?
- Define a method?
- Define an event?
- Pass an argument?
- Inherit from a class?
- Define a collection?
- Define and implement an interface?
- Define a user-defined type?
- Define a code module?
- Handle events?
- Handle exceptions?
- Perform string operations?
- Perform numeric calculations?
- Use custom attributes?
- Call a Win32 API?
- Read and write to files?
- Create a thread?
- Interact with COM components?
- Put comments in my code?
- Retrieve an embedded resource at run time?
See Also
Keywords and Members by Task | Decision Chart | Walkthroughs in Visual Basic and Visual C# | What's New in Visual Basic and Visual C# | Visual Basic and Visual C# | Visual Basic Code Example Topics