Strange behavior for listboxes and datagrids on Win98

R

Ron Fluegge

I have a winforms app that has a number of listboxes and a datagrid that
work just fine 99.99% of the time.

However, when it is run on Windows 98, the listboxes display as if they each
"collapsed" vertically (the width is fine but it displays as just a "line")
.... the first item in the collection is a "blank" to indicate that nothing
is selected. The "blank" displays fine on WinNT thru WinXP, but not on 98.

Also for some reason the vertical scroll bar on the datagrid also disappears
at the same time even though based on the number of items displayed, it
normally displays a vertical scroll bar on all of the other OSs.

The only thing that we can narrow it down to is that the specific user is
running Windows 98 with large fonts. Since we don't have a Win 98
development machine to test on, we are hoping that someone has encountered
this before and has a solution or suggestion.

Ron

RonFlueggedotswbelldotnet
 
R

Ron Fluegge

Update to earlier post.

There are 3 listboxes: one has a non-blank initial item displayed and two
have blank initial items. The have all collapsed to what looks like a
horizontal line where the listboxes are.

There are 3 domainUpDown controls next to the listboxes and they are all
just fine.

So it seems to affect all listboxes and the data grid only...

If this is a Windows 98 or 98SE "issue", is there a specific service pack
requirement for apps to run under either Win98 version even if Framework 1.1
installs?

Ron
 
Y

Ying-Shen Yu[MSFT]

Hi Ron,

Could you reproduce this issue on a Windows 2000/XP system by setting the
default font to larger font?

If yes, this issue maybe related to a known issue about the layou in
groupbox, could you seperate the Form into a small but complete project and
send it to me to let me do some more investigation on it?

Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 
R

Ron Fluegge

We have changed the font size and during our testing the list boxes
work/look just fine and the datagrid has a vertical scrollbar -- so we're
stumped.

Thanks for the offer of assistance.

Ron
 
R

Ron Fluegge

The client contact initially reported that their user was running Win98.

It now appears that they are running Windows 2000 Pro with SP4 applied, but
it is not clear what, if any, hotfixes or patches have been applied since
the SP4 install.

The client contact is running Windows 2000 Pro with SP4 and with all patches
applied and it appears to be working just fine ... seems obvious to us that
the "fix" is somewhat related to what's installed.

We have asked to client contact to verify the following:

(1) go to the Microsoft Windows Updater and determine what is "not
installed" in terms of critical updates, drivers, etc. on the user's machine

(2) verify that Framework 1.1 (not 1.0) is installed on the user's machine.

Is there anything else that anyone has encountered that could cause this
issue?

We have run it here on 800x600 large fonts thru 1280x1024 small fonts on
Windows NT 4 SP6a, Windows 2000 Pro SP4, Windows XP Pro SP1 and Windows
Server 2003 -- it works fine on all of them.

And it works, as indicated above, on the client contact's machine.

So any suggestions, advice, etc would be very much appreciated. We are in
Texas and the user is in Colorado so it's not possible to run over to the
user's machine to diagnose the problem. We trying to solve it by asking
"all the right questions", but I suspect that bringing their Win2000 Pro OS
"up-to-date" to all of the patches is the solution.

BUT their IT department is afraid that it will break existing apps so it is
not an "easy fix" as you might think -- can't convince them to just do the
patches/updates unless we can narrow it down to a specific issue.

Ron
 
Y

Ying-Shen Yu[MSFT]

Hi Ron,

I'd like to know more about the layout of your form?
especially, did you use anchor on the listbox?

Maybe you can try build a debug version of this program and run it on that
machine, since the size of list box was changed, maybe it would be helpful
to handle the SizeChanged event of the listbox and print out the size value
and the the stack trace at that time ( see StackTrace class ).

Let me know if there is anything I could help.

Good Luck!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 
R

Ron Fluegge

Again, thanks for the offer of assistance.

An earlier post contains a screenshot of the form. There is no anchor used
with the listbox. The form is 720x540 and initially displays in that size.
The problem occurs whether the form is maximized or left as initially
loaded.

The OS has now been confirmed to be Win2000 with SP4 and "critical" updates
installed. However, when other users at the same company have "all" of the
Win2000 patches installed, it works ... so it appears that there is a
"patch" or hotfix on Microsoft's Windows Update that makes the difference.
It's one user, but a very important user, who is having the problem. Our
client contact person has tested it on her machine and it works just fine
.... she also has Win2000 but has all Update patches installed -- and she's
running the same EXE from the same configuration and server.

We're hoping to get the user to get all patches and see if that solves the
problem. If not, I do what you suggest below.

Again, many thanks...

Ron
 
Y

Ying-Shen Yu[MSFT]

Hi Ron,

Have you made any progress on this issue?
If you are not using anchor on the listbox, it seems this is not a known
issue in windows forms. Does my suggestion give some more detail
information?
If you have any updates on this issue or there's anything I could help,
please feel free to let me know.

Good Luck!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 
R

Ron Fluegge

So far no updates, but I should hear back from the client this week and will
post whatever I find.

Again, thanks for the assistance...

Ron
 
E

Edward Mostrom

You seem to imply there is a known issue.

I am having a similar problem with datagrids. Neither scroll bar will
appear if I have bottom or right anchors on. If I turn both of these
off then the scroll bars work fine.

Thanks,

Ed
 
R

Ron Fluegge

Ed,

That's very interesting since I have our datagrids anchored as you describe.
However, the problem only appears under very unique circumstances that I
cannot explain or tie to specific OS versions.

We test on Windows NT 4 SP6a, Windows 2000 Pro, Windows XP Pro, and Windows
2003 Server -- all with the latest service pack. We test with various
resolutions from 800x600 to 1280x1024 on a variety of hardware of various
"ages" and manufacturers.

And all looks well.

When we tried installing it on a Windows 2k Pro machine without any service
packs, the problem appeared. The user was going to install all of the
service packs and updates to see if it solved the problem. I have not heard
back from the client but will check tomorrow.

For us the problems appeared both in listboxes (they became a horizontal
line) and in datagrids (the missing vertical scrollbar). The DomainUpDown
controls work just fine regardless on the same form.

I'll post if we come up with anything more definitive.

Ron
 
R

Ron Fluegge

After installing all service packs for Windows 2000 -- not Widows 98, the
only thing that resolved the issue with the listboxes and datagrid vertical
scrollbars was to change to "Small Fonts" ... the user was originally set to
Large Fonts.

The customer is NOT happy about this ... for various reasons he needed Large
Fonts.

Is there a work around or solution currently available or pending?

Ron
 
R

Ron Fluegge

Please see most recent posting on this subject -- changed Win98 to
Win2000Pro in the subject line since we now know what the client has.

Any assistance would be greatly appreciated.

Ron
 
R

Ron Fluegge

I failed to answer your specific questions.

First there is one listbox control and one domainupdown control in a
groupbox. There are 3 sets of these on the form. Within the groupbox, the
listbox is not anchored except for the default "top, left" setting -- I did
not set any others.

Second the datagrid is anchored on all "four" sides.

With Large Fonts and 800x600 resolution (high 24bit color), the app runs
fine under Windows 2003 Server ... list boxes are fine and the datagrid has
a vertical scrollbar -- so it must be, as you have suggested in earlier
postings, tied to Win2k/XP possibly.

Any assistance or references to possible webpages that discuss this would be
greatly appreciated.

Ron
 
Y

Ying-Shen Yu[MSFT]

Hi,

Ok, Let's try another way, I already have one screenshort for the problem,
could you give me another screenshort for the correct layout? So I can post
them to our internal discussion alias to see if any others could come up
with some ideas about it.

About the datagrid scrollbar, I think you may try checking the size of the
datagrid to make sure if it is fit to the window correctly, then call
dataGrid.PerformLayout method to force datagrid layout again.

Does it helpful to this issue?

Let me know if you have any updates on it.
Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 
R

Ron Fluegge

Sorry ... not enough coffee ... completely missed the "remove the word
online" part ...

Ron

Ron Fluegge said:
I tried sending you an email with a test application as you requested but it
kept bouncing back -- if your email address below needs to be altered to
avoid spam, it's not obvious to me what needs to be removed. If you want to
email a "good" address, I'll send you what I've got as a test case...

As requested, I have attached a screenshot of what it is supposed to look
like (it is a Word doc in a ZIP file). The app was running on XP Pro at
1280x1024 "Normal" font size

The problem is that I cannot duplicate the problem here so anything I do
other than duplicate a listbox inside a groupbox with a datagrid on the form
I cannot guarantee will be worth testing ... it might be okay always.

You had indicated in an earlier posting that this is a known problem ...
could you provide me references to the discussion of the problem?

The data grid fits in the window just fine even on 800x600 with large fonts
(Windows Server 2003) and on everyone else's machines -- except the one user
and then it looks like the earlier screen shot.

Thanks...

Ron

"Ying-Shen Yu[MSFT]" said:
Hi,

Ok, Let's try another way, I already have one screenshort for the problem,
could you give me another screenshort for the correct layout? So I can post
them to our internal discussion alias to see if any others could come up
with some ideas about it.

About the datagrid scrollbar, I think you may try checking the size of the
datagrid to make sure if it is fit to the window correctly, then call
dataGrid.PerformLayout method to force datagrid layout again.

Does it helpful to this issue?

Let me know if you have any updates on it.
Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 
Y

Ying-Shen Yu[MSFT]

Hi,

If the font size matters, I suspect this issue is related the
ListBox.IntegralHeight property, when this property is set to true, listbox
will only show size in integral height.
In this scenario, the font size is increased however the size is still set
to default height (17), so the listbox shirnked to empty.
To workaround you may try deriving the ListBox control and override the
OnLayout method, set the Height according to the ItemHeight.
<code>
class MyListBox : ListBox
{
protected override void OnLayout(LayoutEventArgs levent)
{
Height = ItemHeight + 5;
base.OnLayout (levent);
}
}
</code>
does it resolve your problem?

Let me know if you have any update on this issue.

Thanks!


Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 
R

Ron Fluegge

Very clever ... !!!

Thanks. I'll give it a try and let you know what happens.

Any thoughts about why the datagrid vertical scroll bar disappears also with
large fonts and comes back when selecting smaller fonts?

Again, many thanks ...

Ron
 
Y

Ying-Shen Yu[MSFT]

Hi Ron,

One thing I notice after zoom out the problematic screenshot,
looking at the right edge of the datagrid, it seems the width of the
datagrid exceeded the tabpage width. So did the height of the datagrid . To
my understanding, the scrollbar is not disappeared, it's invisible just
because the size of the datagrid is larger than the form.

Unfortunately, I can't think of the cause of this issue. But you may try
checking the datagrid size to verify it. If I'm correct, you may try this
way to see if it could help:
In Form_Load event , set datagrid.Anchor to None then, set the datagrid
size to approriate size then anchor them again.

Please feel free to let me know, if you have any updates on this issue.
Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top