469,090 Members | 1,326 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,090 developers. It's quick & easy.

convert the VB.net code in to VB 6.0

I want to convert the VB.net code in to VB 6.0

Please help me
Nov 13 '07 #1
6 2747
debasisdas
8,127 Expert 4TB
Vb 6.0 code can be upgraded to Vb.net but the reverse is not possible.
Nov 13 '07 #2
QVeen72
1,445 Expert 1GB
Hi,

If you have smaller chunks of Vb.net codes, then try converting it your self..
or post here..

Regards
Veena
Nov 13 '07 #3
jamesd0142
469 256MB
Vb 6.0 code can be upgraded to Vb.net but the reverse is not possible.
so are you saying there is an automated process for this?

or is this a manual job?
Nov 13 '07 #4
M sending my code... i want to convert this code to VB6.0

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim sW As Stopwatch = New Stopwatch

'Used to start or stop the loop.
Dim stopLoop As Integer = 0
Dim sec As Integer = Nothing

'Reset the loop variable.
stopLoop = 0

'Start the stopWatch.
sW.Start()

'Check if the timer is using the high resolution timer or the
'datetime class.
lblHighRes.Text = "High Resolution Mode: " & _
Stopwatch.IsHighResolution.ToString

' stop_Renamed_Click.Focus()

'Just some simple little loop used to get the stopWatch to
'elapse time just as a basic example of using the stopWatch
'class.
Do

My.Application.DoEvents()

'Show the various elapsedTime numbers.
lblElapsed.Text = sW.Elapsed.ToString
'lblElapsedTicks.Text = "Elapsed Time (Ticks): " & _
' sW.ElapsedTicks.ToString()
' lblElapsedMilli.Text = "Elapsed Time (Milliseconds): " _
' & sW.ElapsedMilliseconds

'Calculate to get the current seconds.
sec = sW.ElapsedMilliseconds \ 1000

'Get the elapsed time in seconds.
lblElapsedSec.Text = "Elapsed Time (Seconds): " & _
sec.ToString

'Check whether the stopWatch is running or not.
lblRunning.Text = "StopWatch Running: " & _
sW.IsRunning.ToString

'Continue to loop until the stop button is pushed.
Loop Until stopLoop = 1

End Sub
Nov 13 '07 #5
QVeen72
1,445 Expert 1GB
so are you saying there is an automated process for this?

or is this a manual job?
Hi James,

Yes there is..
Open a VB6 Project in VB.net IDE, the project will be converted to vb.net automatically..
as Debasis said, there is no Reverse Procedure..

Regards
Veena
Nov 13 '07 #6
QVeen72
1,445 Expert 1GB
Hi Priyanka,

Start a New Project, add a Timer Control, Command Button, and Labes to your form. and Re-name them accordingly..
Use same Command Button to Start and Stop.
Keep Form-Level variables to Increment Seconds/Milli seconds..
Initially make Command's Caption = "Start", Timer's Enabled = False,
Set Timer's Interval.
In Command Click write this code:

If Command1.Caption ="Start" then
Command1.Caption = "Stop"
Timer1.Enabled =True
Else
Command1.Caption = "Start"
Timer1.Enabled =False
End If

Write the Increment of Variables in Timer1_Timer Event..
also Change the Caption of all the Labels Accordingly..

The above is Just an Algorithm..

Regards
Veena
Nov 13 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Thubaiti | last post: by
6 posts views Thread by patang | last post: by
reply views Thread by patang | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.