Home > Ask the Microsoft .Net Development Experts > Visual Basic .NET Questions & Answers > Converting a VB Windows application to VB .NET Web application
Ask The Win Development Expert: Questions & Answers
EMAIL THIS

Converting a VB Windows application to VB .NET Web application

Daniel Cazzulino EXPERT RESPONSE FROM: Daniel Cazzulino

Pose a Question
Other Win Development Categories
Meet all Win Development Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 27 November 2004
1. I need some advice and/or resources on how to convert a VB windows application to VB.NET Web application. Is there any conversion tool to do this, or I need to recreate a new version in VB.NET?

2. Currently I also try to convert my VB Windows application to VB.NET by using the conversion tool in Visual Studio.NET 2003. After the conversion, still need a lot of manual change such as:
- load(frmTemp) --> Dim frmTemp As new frmTemp
- txtBox = "Hello" --> txtBox.Text = "Hello"

Is there any way or setup in the conversion tool to help me auto-convert this?


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
VB.NET
Access VB .NET Windows control on client side
Converting floating values to byte form
Read data from parallel port
Converting EXE-files to VB components
Generating classes like we did in VB6
Manipulating text through VB.NET
Converting Windows applications to VB .NET
How to add a key to a listview item in VB.NET
Accessing .NET components from VBScript
How I can assign an untyped dataset to a typed dataset?

Visual Basic .NET
Access VB .NET Windows control on client side
Drop down list server control creates error message
Converting floating values to byte form
Datagrid issue: 'onselection' is not populating
Read data from parallel port
What is the use of these constructors?
Give me an ODBC connect, with SQL authentication
Converting EXE-files to VB components
Generating classes like we did in VB6
Manipulating text through VB.NET

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


1) If you created your application with the proper separation of layers (i.e. a library for the business logic, another for UI stuff, another (optional?) for DB access), you can reuse as-is all except for the UI one. You will need to recreate all screens, unfortunately. There's no tool that I'm aware of.

2) Now the problem is clearer. It seems that what you're doing is upgrading from VB6. If you have a well defined naming convention for your controls, you could use a global search and replace to append the .Text property access in the second case. The first case can also be solved with a global search and replace using regular expressions. You actually have to not only create a new variable for the form, but you also have to call Show on it. Here's how to configure the Search & Replace dialog:

Find what: Load({[^)]*})
Replace with: Dim temp As New 1ntttemp.Show()
Use: Regular Expressions
If you have the following in the original source:
Load(frmTemp) 
After the replace you'll have:
Dim temp As New frmTemp
temp.Show()
Key points: the curly braces inside the expression ({[^)]*}) captures the value so you can refer to it from the replacement string using 1 (or 2, 3, etc for subsequent capture groups). The expression in this case captures any string that is not the closing parenthesis, after the initial opening parenthesis, which must be escaped using ). The n is used to output a new line, and t for a Tab.




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Windows Development - White Papers, News and Expert Advice
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts