Visual Basic Q&A

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘visible property’

BUG: Run-Time Error 380 “Invalid Property Value” with MaskEdBox

Symptoms
With Microsoft Visual Basic 4.0, when you set the Text property of a MaskEdit control at run-time, you receive the following error.

Run-time Error 380:
Invalid Property Value
Resolution
This error occurs under the following circumstances:
The Visible property of the Mask Edit control is set to False atdesign-time.
-and-A later version of MSMASK32.OCX is installed. The error occurs withMSMASK32.OCX version 5.00.3714, which ships with Microsoft Visual Basic5.0.

FIX: Adding Subitems To Hidden ListView Causes APP Error

Symptoms
A 32-bit Visual Basic application with a ListView control can generate anapplication error or incorrectly display the subitems if the subitems areadded to a ListView control that is hidden on a form.
Resolution
To eliminate this behavior, use one of the following methods:
If you want your ListView control in the form to be hidden when the formis shown, toggle the Visible property once before adding the subitems tothe ListView control. To toggle the Visible property, initially set theVisible property to True and then reset the Visible property to False.
-or-
At design time, set the ListView control Visible property to True. Then inthe first line of code in the form’s Load procedure, set the ListViewcontrol Visible property to False.