Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 994
  • Last Modified:

vb6 on windows 7

I have a program in vb6. I give the width of the form dinamically in form load , for example:
f.Width =600
When i try this in XP, everything is fine. When i try this in windows 7, the form is opened, but it is blank, there is no control on it. If i minimize the form, and then maximize it again every thing is ok. The controls are shown in the form. Any idea about this?
Thank You
0
info2009
Asked:
info2009
4 Solutions
 
rockiroadsCommented:
Maybe some runtime issues? though I would of thought an error would popup. MS here give a link to the extended controls (any activex or ocx you might be using) http://msdn.microsoft.com/en-us/vbasic/ms788708.aspx which is this http://support.microsoft.com/kb/957924/ the vista version. might work for win7 or be a similar page.

if your not using any of these controls, have you tried compiling your app in win7?
0
 
info2009Author Commented:
Sorry , but the links didnt help me. Any other idea ?
0
 
ahammarCommented:
Here is a dirty way that might work.  It should happen so fast you can't see it happen.  Minimize the form then restore it again when your form opens...or at some point in your code..ie...

Me.WindowState = vbMinimized
Me.WindowState = vbNormal

or if it's outside the form code, then this:

Form1.WindowState = vbMinimized
Form1.WindowState = vbNormal

where Form1 is the name of your form..

Just a thought if you want to try it...

:-)
Albert

0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Genetic_WolfCommented:
first you must ensure your component is one LISTED in the SUPPORTED section for Win7,
standart one ARE... other... like CALENDAR, AREN'T
the FULL List is here:
http://msdn.microsoft.com/en-us/vbasic/ms788708.aspx
look in the section called:
Supported and Shipping in Windows Vista, Windows Server 2008, and ... (Win7)
(Win7 was omitted on purpose in the statement)

and also in section called: Unsupported Runtime Files

Some file AREN'T Listed AT ALL.  (like some AdoX component) I already mentioned them a few, they send me back an email telling me they will update the list.



second, ensure you got Vb6 SP6 installed before compiling.
Service Pack 6 for Visual Basic 6.0
3/25/2004
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9EF9BF70-DFE1-42A1-A4C8-39718C7E381D&displayLang=en

You ALSO need all POST sp6 component update.  here SOME of them:

communs Control
27/04/2005
http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=25437d98-51d0-41c1-bb14-64662f5f62fe


Cummulative Security Update for Visual Basic 6.0 Service Pack 6
09/12/2008
http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=e27eebcb-095d-43ec-a19e-4a46e591715c

Cummulative Security Update for Visual Basic 6.0 Service Pack 6
04/05/2009
http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=cb824e35-0403-45c4-9e41-459f0eb89e36


plz install in correct order (date)


Also, PLZ NOTE that Win7 is handling FONT differently.  Some FONT CAN'T BE used in Vb6 on Win7 for some reason (Aero theme and Font Anti-Aliasing).  Verdana for exemple is known to cause some problem in some component

For this reason try to use a standart font like MS Sans Serif.  to rule out this issue.

it would help us to see some code and wich component you'Re using in order to fix the issue.
0
 
c0ldfyr3Commented:
Try this first:

Right click your VB Shortcut and click the compatibility tab and check the 'Disable Desktop Composition' checkbox, you could also try different versions of windows compatobility settings such as for Windows XP etc...
0
 
Genetic_WolfCommented:
To continue on my proposition, I thought about something else...

MENU cause a bug on Win7 wich make sometime item to go DOWN and sometime out of form view.
if you have a menu on that form, try disabling menu to see if that solve the problem

go in menu and at your root menu, Uncheck the VISIBLE box
0
 
Genetic_WolfCommented:
The menu problem is something introduced by Microsoft by one of the latest patch not related to Vb6.
The only fix I found is to create your own menu without using the IDE Menu from the Vb6 Interface.

it's a pain to program though, but there is several exemple on the net on how to do so.
good luck
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now