the Set col = Nothing does release the memory, but when we use the reference again (passing it to ObjPtr) it gets re-instantiated - hence the memory address is different.
I would recommend using the MakeSureDirectoryPathExists API. It doesn't throw errors if the folder exists and will create any subdirectories that need creating too:
Private Declare Function...
Dim isn't a Type, it tells to VB to dimension a variable as a particular type, e.g. for a string:
Dim MyVariable As Stringsince you've been omitting a Type in your declarations VB has been declaring...
if you want to click a button you can just do:
' on Form1
Private Sub Command1_Click()
Form2.Command1.Value = True
End Subhowever, I would recommend doing something like:
' On Form1
Private...
based on this code, click down on the attached form and drag the mouse over the button to generate VB code that'll find the hWnd - you can then just add your up/down bit
Even if redistribution isn't an issue, you shouldn't use the Forms 2.0 object library - it's unstable in the VB6 environment with a tendency for "out of memory" errors - MS advise against its use.
something like this perhaps:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, ByVal lpWindowName As String) As Long
SetWindowPos allows you to set relative z-order position also:
Private Declare Function SetWindowPos Lib "user32" ( _
ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, _
...
well, each character of a string is two bytes, not one - so the string has to be half the size of the byte array. You also need to pass the memory location of the String's byte array, rather than the...
if you're attempting to use the ToolTipText to show the full text of items wider than the dropdown, then I would recommend using CB_SETDROPPEDWIDTH to change the width of the dropdown instead:...