Solved

vb6 on windows 7

Posted on 2010-09-06
7
973 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
ID: 33611616
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
ID: 33611780
Sorry , but the links didnt help me. Any other idea ?
0
 
LVL 23

Accepted Solution

by:
ahammar earned 125 total points
ID: 33611956
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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 3

Assisted Solution

by:Genetic_Wolf
Genetic_Wolf earned 250 total points
ID: 33612825
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
ID: 33765022
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
ID: 33765038
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
ID: 34002939
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.

776 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