convert the VB.net code in to VB 6.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • priyanka1915
    New Member
    • Nov 2007
    • 32

    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
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Vb 6.0 code can be upgraded to Vb.net but the reverse is not possible.

    Comment

    • QVeen72
      Recognized Expert Top Contributor
      • Oct 2006
      • 1445

      #3
      Hi,

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

      Regards
      Veena

      Comment

      • jamesd0142
        Contributor
        • Sep 2007
        • 471

        #4
        Originally posted by debasisdas
        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?

        Comment

        • priyanka1915
          New Member
          • Nov 2007
          • 32

          #5
          M sending my code... i want to convert this code to VB6.0

          Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) 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.IsHig hResolution.ToS tring

          ' stop_Renamed_Cl ick.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.ToSt ring
          'lblElapsedTick s.Text = "Elapsed Time (Ticks): " & _
          ' sW.ElapsedTicks .ToString()
          ' lblElapsedMilli .Text = "Elapsed Time (Milliseconds): " _
          ' & sW.ElapsedMilli seconds

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

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

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

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

          End Sub

          Comment

          • QVeen72
            Recognized Expert Top Contributor
            • Oct 2006
            • 1445

            #6
            Originally posted by jamesd0142
            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

            Comment

            • QVeen72
              Recognized Expert Top Contributor
              • Oct 2006
              • 1445

              #7
              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.Captio n ="Start" then
              Command1.Captio n = "Stop"
              Timer1.Enabled =True
              Else
              Command1.Captio n = "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

              Comment

              Working...