By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,699 Members | 1,243 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,699 IT Pros & Developers. It's quick & easy.

Resize problem (in IDE)

P: n/a
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
Feb 15 '06 #1
Share this Question
Share on Google+
7 Replies


P: n/a
"Galen Somerville" <ga***@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
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.....
--
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..
Feb 15 '06 #2

P: n/a

"Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
"Galen Somerville" <ga***@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
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.....
--
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..

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
Feb 15 '06 #3

P: n/a
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."

Feb 16 '06 #4

P: n/a
"Galen Somerville" <ga***@community.nospam> wrote in message
news:OW*************@TK2MSFTNGP14.phx.gbl...
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.

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

P: n/a
In line

"Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message
news:uP****************@TK2MSFTNGP12.phx.gbl...
"Galen Somerville" <ga***@community.nospam> wrote in message
news:OW*************@TK2MSFTNGP14.phx.gbl...
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.


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


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.

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

GalenS
Feb 16 '06 #6

P: n/a
"Galen Somerville" <ga***@community.nospam> wrote in message
news:OQ**************@TK2MSFTNGP12.phx.gbl...

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.


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..
Feb 17 '06 #7

P: n/a

"Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message
news:OJ*************@TK2MSFTNGP15.phx.gbl...
"Galen Somerville" <ga***@community.nospam> wrote in message
news:OQ**************@TK2MSFTNGP12.phx.gbl...

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.


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

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
Feb 18 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.