Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. UpGrade issue with Timer and toolStripMenuItem Help needed

UpGrade issue with Timer and toolStripMenuItem Help needed

Scheduled Pinned Locked Moved Visual Basic
helpquestioncsharp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sarat
    wrote on last edited by
    #1

    'UPGRADE_WARNING: TypeOf has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' **ElseIf TypeOf cnt Is System.Windows.Forms.Timer Then nType = 0** 'UPGRADE_WARNING: TypeOf has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' **ElseIf TypeOf cnt Is System.Windows.Forms.ToolStripMenuItem Then nType = 0** after Upgradation to VB.Net it complains like this Error 146 Expression of type 'System.Windows.Forms.Control' can never be of type 'System.Windows.Forms.Timer'. Error 147 Expression of type 'System.Windows.Forms.Control' can never be of type 'System.Windows.Forms.ToolStripMenuItem'. how can i resolve those issues please help needed

    C 1 Reply Last reply
    0
    • S sarat

      'UPGRADE_WARNING: TypeOf has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' **ElseIf TypeOf cnt Is System.Windows.Forms.Timer Then nType = 0** 'UPGRADE_WARNING: TypeOf has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' **ElseIf TypeOf cnt Is System.Windows.Forms.ToolStripMenuItem Then nType = 0** after Upgradation to VB.Net it complains like this Error 146 Expression of type 'System.Windows.Forms.Control' can never be of type 'System.Windows.Forms.Timer'. Error 147 Expression of type 'System.Windows.Forms.Control' can never be of type 'System.Windows.Forms.ToolStripMenuItem'. how can i resolve those issues please help needed

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      A timer is not a control. You need to rewrite your code.

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      S 1 Reply Last reply
      0
      • C Christian Graus

        A timer is not a control. You need to rewrite your code.

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        S Offline
        S Offline
        sarat
        wrote on last edited by
        #3

        how can i re write the same code for the timer and toolstripmenuitem please let me know

        C 1 Reply Last reply
        0
        • S sarat

          how can i re write the same code for the timer and toolstripmenuitem please let me know

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          The code that uses a timer will need to be completely rewritten to use a .NET timer class. There's no simple way that I can see, a timer and a toolstripitem simply do not have a common base class in .NET.

          Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups