?
Solved

VB6 App loading as partial title bar only

Posted on 2006-04-13
17
Medium Priority
?
264 Views
Last Modified: 2008-03-10
I have an old VB6 application that is to be replaced in the coming year.  About a year ago we had one machine that suddenly failed to entirely open the app.  All that would open was a non-sizable window containing the title bar section of the of the app and the upper edge of the menu (about 1 inch by .25 inch).  The control box only has the minimize and close buttons activated.  After days of searching, uninstalling and reinstalling we gave up due to lack of time.  The machine was eventually replaced and the installed app worked fine.

Well, the same thing has popped up on another machine.  This machine can't be replaced.  Does anyone have a clue?

Help!!!
0
Comment
Question by:lmerrell
15 Comments
 
LVL 7

Author Comment

by:lmerrell
ID: 16446275
Operating system is XP with all updates.  Is there some DLL or registry setting that controls window size?
0
 
LVL 8

Expert Comment

by:Leo Eikelman
ID: 16446312
well something must of been changed if it works all the time and suddenly doesn't work.  Was there recent patches/updates applied to the computer just before this problem appeared?

Leo
0
 
LVL 7

Author Comment

by:lmerrell
ID: 16446373
No updates that haven't been applied to my machine and it works fine on mine.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 8

Expert Comment

by:Leo Eikelman
ID: 16446399
I'm not sure how an application can suddenly stop working without ANY changes to the machine it is running on.

we're going to need more information.

Leo
0
 
LVL 7

Author Comment

by:lmerrell
ID: 16446912
Additional info.

Only the main form has the limited size.  You can still manuever through the menu and open any of the apps other forms at normal size.  The splash form also appears as normal size.  
0
 
LVL 8

Expert Comment

by:Leo Eikelman
ID: 16446961
so if you compare the properties of the main form to the other forms is there a difference?

Is the main form accessing some file that no longer exists?

Leo
0
 
LVL 7

Author Comment

by:lmerrell
ID: 16447102
No, the properties are the same.  And no, no missing file.  
0
 
LVL 7

Author Comment

by:lmerrell
ID: 16447122
The Form_Load event of the main form does have this in it:

Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
  Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
  Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 7365)
  Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 5600)

Could this be causing some problem on certain machines?
0
 
LVL 7

Author Comment

by:lmerrell
ID: 16447371
Bingo!  Found it.  The following registry settings were all wacko:

HKEY_CURRENT_USER\Software\VB and VBA Program Settings\GROUP CENTRAL

I was able to correct them so my short term problem is resolved.  But, I'll still award the points to anyone who can tell me what would alter these registry settings.
0
 
LVL 7

Author Comment

by:lmerrell
ID: 16447443
The settings were being saved (SaveSetting) on form unload as such:

If Me.WindowState <> vbMinimized Then
    SaveSetting App.Title, "Settings", "MainLeft", Me.Left
    SaveSetting App.Title, "Settings", "MainTop", Me.Top
    SaveSetting App.Title, "Settings", "MainWidth", Me.Width
    SaveSetting App.Title, "Settings", "MainHeight", Me.Height
  End If

But, the form can't be resized so the settings should never have been set to a minimized size.  Wierd.
0
 
LVL 8

Expert Comment

by:Leo Eikelman
ID: 16447711
Is there somewhere in the problem where it sets the size of the window by the value from the registry?

Because it could be receiving null or 0 values when it initially tries to do this.

Leo

0
 
LVL 13

Expert Comment

by:Mark_FreeSoftware
ID: 16447845

can you show the code that loads these settings?


also it is possible that the writing to the registry was interrupted
0
 
LVL 8

Expert Comment

by:Leo Eikelman
ID: 16447912
I assume if you are saving these settings then you are using a GetSetting function and not checking if the values are 0 before setting them to your window.

Leo
0
 

Expert Comment

by:aguppy
ID: 16449032
hi lmerrell

I had a similiar situation not long ago. The problem was i was trying to automatically put the form in the top left hand corner, for a while it done the same as what yours is doing, I traced it down to the fact that one of my variables was sitting at -1 instead of 0 when setting the position of the form via an API call

Maybe your is similiar in that one of the positioning variables has become -1. Has someone changed the desktop from xp to classic or something similiar, as there is a x, y difference between the two.

regards
0
 

Accepted Solution

by:
GranMod earned 0 total points
ID: 16732682
PAQed with points refunded (500)

GranMod
Community Support Moderator
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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 lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month15 days, 16 hours left to enroll

850 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