Solved

vb6 on windows 7

Posted on 2010-09-06
7
984 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Assume you have an outside contractor who comes in seasonally or once a week to do some work in your office, but you only want to give him access to the programs and files he needs and keep all other documents and programs private. Can you do this o…
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
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.
Suggested Courses
Course of the Month5 days, 19 hours left to enroll

626 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