Resize problem (in IDE)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Galen Somerville

    Resize problem (in IDE)

    My original program was targetted to Win98 when 800 x 600 was popular.

    Now converted to VB2005 pro and minimum will be 1024 x 768.

    I know about the autoresizing at run time but I want the form designer to be
    at 1024 x768. Naturally, after conversion from VB6, it is at 800 x 600
    (actually 800 x 554 or thereabouts).

    Other than manually (and laboriously) moving all the controls, is there a
    better way to do it?

    GalenS


  • Ken Halter

    #2
    Re: Resize problem (in IDE)

    "Galen Somerville" <galen@communit y.nospam> wrote in message
    news:%23kgv1slM GHA.2040@TK2MSF TNGP14.phx.gbl. ..[color=blue]
    > My original program was targetted to Win98 when 800 x 600 was popular.
    >
    > Now converted to VB2005 pro and minimum will be 1024 x 768.
    >
    > I know about the autoresizing at run time but I want the form designer to
    > be at 1024 x768. Naturally, after conversion from VB6, it is at 800 x 600
    > (actually 800 x 554 or thereabouts).
    >
    > Other than manually (and laboriously) moving all the controls, is there a
    > better way to do it?
    >
    > GalenS[/color]

    If no one else chimes in, about the only thing I can do is share a "wizard"
    that I wrote to convert form and control sizes from Large Fonts (which used
    to be our default - ick!) to Small Fonts... it does this by parsing the frm
    files and multiplying all heights/widths * 1.25 (small fonts are 15 twips
    per pixel while large fonts are 12 twips... 15/12 = 1.25). Thing is, it's
    written with and used for VB6 forms only so, I imagine, you can run it, use
    the '05 wizard to convert it to dotNet using a new name for the project...
    when done, it'll be sitting there waiting for you to copy/paste all controls
    from the "temp" project to your real project. The control names remain
    unchanged so.....


    --
    Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
    Please keep all discussions in the groups..


    Comment

    • Galen Somerville

      #3
      Re: Resize problem (in IDE)


      "Ken Halter" <Ken_Halter@Use _Sparingly_Hotm ail.com> wrote in message
      news:%23KZkHxmM GHA.2628@TK2MSF TNGP15.phx.gbl. ..[color=blue]
      > "Galen Somerville" <galen@communit y.nospam> wrote in message
      > news:%23kgv1slM GHA.2040@TK2MSF TNGP14.phx.gbl. ..[color=green]
      >> My original program was targetted to Win98 when 800 x 600 was popular.
      >>
      >> Now converted to VB2005 pro and minimum will be 1024 x 768.
      >>
      >> I know about the autoresizing at run time but I want the form designer to
      >> be at 1024 x768. Naturally, after conversion from VB6, it is at 800 x 600
      >> (actually 800 x 554 or thereabouts).
      >>
      >> Other than manually (and laboriously) moving all the controls, is there a
      >> better way to do it?
      >>
      >> GalenS[/color]
      >
      > If no one else chimes in, about the only thing I can do is share a
      > "wizard" that I wrote to convert form and control sizes from Large Fonts
      > (which used to be our default - ick!) to Small Fonts... it does this by
      > parsing the frm files and multiplying all heights/widths * 1.25 (small
      > fonts are 15 twips per pixel while large fonts are 12 twips... 15/12 =
      > 1.25). Thing is, it's written with and used for VB6 forms only so, I
      > imagine, you can run it, use the '05 wizard to convert it to dotNet using
      > a new name for the project... when done, it'll be sitting there waiting
      > for you to copy/paste all controls from the "temp" project to your real
      > project. The control names remain unchanged so.....
      >
      >
      > --
      > Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
      > Please keep all discussions in the groups..
      >[/color]
      Naw, it's too late for that. already went through 100's of errors and
      warnings during the conversion. And I can only test a little of the program
      startup as it works with a USB proprietary device. The beta version of the
      USB interface has problems which hopefully will be solved this week.

      I was thinking of writing a VB6 program to go through the .vb files and
      changing by 1.28 but then I would have to study the makeup of the .vb files.

      And in VB6, if I make one mistake, it causes no end of problems. If you have
      read my other posts you would know that an unhandled VB6 exception brings up
      the VB2005 debugger and I end up back at the desktop.

      GalenS


      Comment

      • Kevin Yu [MSFT]

        #4
        Re: Resize problem (in IDE)

        Hi GalenS,

        Currently, I have no better idea to achieve this. The only thing I can do
        is to go through all the .vb files and make the size larger.

        Kevin Yu
        =======
        "This posting is provided "AS IS" with no warranties, and confers no
        rights."

        Comment

        • Ken Halter

          #5
          Re: Resize problem (in IDE)

          "Galen Somerville" <galen@communit y.nospam> wrote in message
          news:OWXbJKoMGH A.720@TK2MSFTNG P14.phx.gbl...[color=blue][color=green]
          >>[/color]
          > Naw, it's too late for that. already went through 100's of errors and
          > warnings during the conversion. And I can only test a little of the
          > program[/color]

          But... but.... this would be the UI only. Just grab the old VB6 form, open
          it in VB6, rip out all of the code, leaving the controls in place, run the
          utility, convert this "UI Only" form to dotNet, open it and your current
          project in separate instances of VS, copy all controls from the converted
          form to the clipboard, select the new project, select all controls on the
          form, hit the delete key, hit Ctrl-V to paste.... that should be it.
          [color=blue]
          > startup as it works with a USB proprietary device. The beta version of the
          > USB interface has problems which hopefully will be solved this week.
          >
          > I was thinking of writing a VB6 program to go through the .vb files and
          > changing by 1.28 but then I would have to study the makeup of the .vb
          > files.[/color]

          Well... if interested in my "quicky" wizard, here ya' go...

          There's not much to it and it won't alter the original unless you want it
          to. Note that there's no font scaling because I couldn't find a decent way
          of finding exact font sizes (scaled TT fonts show jagged edges if not sized
          to one of their "natural" sizes)
          [color=blue]
          > And in VB6, if I make one mistake, it causes no end of problems. If you
          > have read my other posts you would know that an unhandled VB6 exception
          > brings up the VB2005 debugger and I end up back at the desktop.
          >
          > GalenS[/color]

          An unhandled exception that goes from VB6 to dotNet?... of course, any
          unhandled exceptions in VB6 will kill the app. It's always been that way.
          fwiw, dotNet in general "causes no end of problems" here. The simplest of
          samples fail to run. I gave up completely for now. Waiting until I have a
          chance to wipe my drive and start from scratch (how's that for "user
          experience" eh? <g>)... fwiw, I selected the option to notify MS of my usage
          data, etc (can't recall the name of the option)... if they're checking my
          logs, they'll see that every time I try anything at all, there's a crash and
          burn involved so.... For now, I'll stick with my "Rock Solid and Blazing
          Fast" VB6. Plus, the only thing better than VB6 help is VB5 help. The newer
          MSDNs are nearly impossible to use (very slow/very
          bloated/crash-hang-o-matic) and when/if you find what you're looking for,
          the "help" is usually useless.

          --
          Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
          Please keep all discussions in the groups..


          Comment

          • Galen Somerville

            #6
            Re: Resize problem (in IDE)

            In line

            "Ken Halter" <Ken_Halter@Use _Sparingly_Hotm ail.com> wrote in message
            news:uPe7%23VxM GHA.2624@TK2MSF TNGP12.phx.gbl. ..[color=blue]
            > "Galen Somerville" <galen@communit y.nospam> wrote in message
            > news:OWXbJKoMGH A.720@TK2MSFTNG P14.phx.gbl...[color=green][color=darkred]
            >>>[/color]
            >> Naw, it's too late for that. already went through 100's of errors and
            >> warnings during the conversion. And I can only test a little of the
            >> program[/color]
            >
            > But... but.... this would be the UI only. Just grab the old VB6 form, open
            > it in VB6, rip out all of the code, leaving the controls in place, run the
            > utility, convert this "UI Only" form to dotNet, open it and your current
            > project in separate instances of VS, copy all controls from the converted
            > form to the clipboard, select the new project, select all controls on the
            > form, hit the delete key, hit Ctrl-V to paste.... that should be it.[/color]

            Almost finished with a VB6 program to parse the designer.vb files and look
            for .Location, .Size and .Font lines.
            Then looks for both "(" and ")" and makes the changes based on 1.28 (1.25
            for fonts).
            So quick and easy in VB6 !!!
            [color=blue][color=green]
            >> startup as it works with a USB proprietary device. The beta version of
            >> the USB interface has problems which hopefully will be solved this week.
            >>
            >> I was thinking of writing a VB6 program to go through the .vb files and
            >> changing by 1.28 but then I would have to study the makeup of the .vb
            >> files.[/color]
            >
            > Well... if interested in my "quicky" wizard, here ya' go...
            > http://www.vbsight.com/zips/Resize_Form_File.zip
            > There's not much to it and it won't alter the original unless you want it
            > to. Note that there's no font scaling because I couldn't find a decent way
            > of finding exact font sizes (scaled TT fonts show jagged edges if not
            > sized to one of their "natural" sizes)
            >[color=green]
            >> And in VB6, if I make one mistake, it causes no end of problems. If you
            >> have read my other posts you would know that an unhandled VB6 exception
            >> brings up the VB2005 debugger and I end up back at the desktop.
            >>
            >> GalenS[/color]
            >
            > An unhandled exception that goes from VB6 to dotNet?... of course, any
            > unhandled exceptions in VB6 will kill the app. It's always been that way.
            > fwiw, dotNet in general "causes no end of problems" here. The simplest of
            > samples fail to run. I gave up completely for now. Waiting until I have a
            > chance to wipe my drive and start from scratch (how's that for "user
            > experience" eh? <g>)... fwiw, I selected the option to notify MS of my
            > usage data, etc (can't recall the name of the option)... if they're
            > checking my logs, they'll see that every time I try anything at all,
            > there's a crash and burn involved so.... For now, I'll stick with my "Rock
            > Solid and Blazing Fast" VB6. Plus, the only thing better than VB6 help is
            > VB5 help. The newer MSDNs are nearly impossible to use (very slow/very
            > bloated/crash-hang-o-matic) and when/if you find what you're looking for,
            > the "help" is usually useless.[/color]

            Unhandled exception was bad wording. I'm in the VB6 IDE. I have "on error
            goto" with an error handler to display the error info.
            There's an error, POW, I'm in VB2005 error handler.

            In my converted VB2005 program my guess is that it's going to crash and burn
            repeatedly (after I get USB interface fixed). I would say 60% of the program
            is processing Graphics.

            Luckily this is on a completely different hard drive from my VB6 development
            environment. I just copied one VB6 program to it for conversion experience.

            [color=blue]
            > --
            > Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
            > Please keep all discussions in the groups..
            >[/color]
            GalenS


            Comment

            • Ken Halter

              #7
              Re: Resize problem (in IDE)

              "Galen Somerville" <galen@communit y.nospam> wrote in message
              news:OQbAJHyMGH A.1424@TK2MSFTN GP12.phx.gbl...[color=blue]
              >
              > Luckily this is on a completely different hard drive from my VB6
              > development environment. I just copied one VB6 program to it for
              > conversion experience.
              >[/color]

              In case you don't already have it.....

              Free Book - Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic
              ..NET


              --
              Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
              Please keep all discussions in the groups..


              Comment

              • Galen Somerville

                #8
                Re: Resize problem (in IDE)


                "Ken Halter" <Ken_Halter@Use _Sparingly_Hotm ail.com> wrote in message
                news:OJSvpPBNGH A.516@TK2MSFTNG P15.phx.gbl...[color=blue]
                > "Galen Somerville" <galen@communit y.nospam> wrote in message
                > news:OQbAJHyMGH A.1424@TK2MSFTN GP12.phx.gbl...[color=green]
                >>
                >> Luckily this is on a completely different hard drive from my VB6
                >> development environment. I just copied one VB6 program to it for
                >> conversion experience.
                >>[/color]
                >
                > In case you don't already have it.....
                >
                > Free Book - Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic
                > .NET
                > http://msdn.microsoft.com/vbrun/stay...6/default.aspx
                >
                > --
                > Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
                > Please keep all discussions in the groups..[/color]
                Thanks. I must have hit their server at the right time. Came in solid and
                almost filled my 3MB bandwidth.

                Incidentally I finished and ran my Resize converter on the .Designer.vb
                files. In VB2005 all of the forms were properly converted to 1024 x 768
                size. No pain no strain.

                I wonder if anyone else would need this capability. By just changing the two
                factors, 1.28 & 1.25, you could convert up or down between any two screen
                resolutions.

                GalenS


                Comment

                Working...