Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1469

Lots of Functions to Deal with Controls

$
0
0
Finding the widest, right-aligning, changing their size to fit the contents of their caption or text, making comboboxes as wide as their widest list entry, etc.

bControls.zip

This has some dependencies. Other than the CallStack and ErrorHandler stuff, if you find something in there that has a dependency that's not included then let me know and I'll upload it.

This is the only one I saw immediately but there may be others.

Code:

Public Function MaxValue(ParamArray Values() As Variant) As Variant
Dim m_CallStacker As New cCallStacker
Dim n As Long
Dim nMax As Long

' Returns the Greatest Value.

m_CallStacker.Add NAME & ".MaxValue(Public Function)"

For n = LBound(Values) To UBound(Values)

  If Values(n) > nMax Then nMax = Values(n)

Next n

MaxValue = nMax

End Function

Attached Files

Viewing all articles
Browse latest Browse all 1469

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>