Solved

vb6 on windows 7

Posted on 2010-09-06
7
969 Views
Last Modified: 2012-05-10
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
Comment
Question by:info2009
7 Comments
 
LVL 65

Expert Comment

by:rockiroads
Comment Utility
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
 

Author Comment

by:info2009
Comment Utility
Sorry , but the links didnt help me. Any other idea ?
0
 
LVL 23

Accepted Solution

by:
ahammar earned 125 total points
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 3

Assisted Solution

by:Genetic_Wolf
Genetic_Wolf earned 250 total points
Comment Utility
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
 
LVL 10

Assisted Solution

by:c0ldfyr3
c0ldfyr3 earned 125 total points
Comment Utility
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
 
LVL 3

Assisted Solution

by:Genetic_Wolf
Genetic_Wolf earned 250 total points
Comment Utility
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
 
LVL 3

Expert Comment

by:Genetic_Wolf
Comment Utility
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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: Lee
Windows 7 Ultimate and Enterprise (and 2008 R2) introduced a new feature you may not be aware of - Boot from VHD.   Boot from VHD (or what Microsoft refers to asNative Boot allows you to install Windows to a VHD (Virtual Hard Disk) file that is t…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now