Changes

Creating Public and Private Functions in VB6

590 bytes added, 19:27, 9 January 2008
The following lines were added (+) and removed (-):
== Public Function in a Module ==You may want to create a function that is available to all forms in your program.  You can put it in a module and make it public so that it may be used by any form.MODULE CODE:  Public Function GetSettingEx(HKEY As Long, sPath As String, sValue As String)    Dim KeyHand&    Dim datatype&    Call RegOpenKey(HKEY, sPath, KeyHand&)    GetSettingEx = RegQueryStringValue(KeyHand&, sValue)    Call RegCloseKey(KeyHand&)  End FunctionFORM CODE:  strRetval = MODULE_NAME.GetSettingEx(HKEY_CURRENT_USER, "Software\album", "DefaultStorybookPath")
Bureaucrat, administrator
16,192
edits