Resize problem (in IDE)

G

Galen Somerville

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
 
K

Ken Halter

Galen Somerville said:
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

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.....
 
G

Galen Somerville

Ken Halter said:
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.....
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
 
K

Kevin Yu [MSFT]

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."
 
K

Ken Halter

Galen Somerville said:
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

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.
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.

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)
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

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.
 
G

Galen Somerville

In line

Ken Halter said:
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.

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 !!!
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)


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.

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.

GalenS
 
G

Galen Somerville

Ken Halter said:
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/staythepath/AdditionalResources/UpgradingVB6/default.aspx
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top