Type: Posts; User: bushmobile
Search took 0.01 seconds.
August 10th, 2007, 04:27 PM
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.e. compare it to
August 9th, 2007, 04:06 PM
Mentioning this ties everything together very nicely.
When you unload a named form (ie not instantiated with Set F = New Form1) a reference still exists to the object and as such the memory is not...
April 29th, 2007, 12:54 PM
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...
April 8th, 2007, 06:54 AM
wrap command line arguments with spaces in them in quotes, e.g.:
Shell "program.exe ""C:\Test Folder\File.ext"""
April 7th, 2007, 06:35 AM
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...
April 6th, 2007, 04:40 PM
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
March 25th, 2007, 09:33 AM
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
March 16th, 2007, 10:55 AM
The code i posted should (and does) work - is the error definitely occuring on that line? What version of VB are you using?
Regarding using Trim - using implicit coercion as I did ("Text" & 1) is...
March 15th, 2007, 05:02 PM
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.
March 14th, 2007, 05:03 PM
Are you doing this in VB6 or VBA?
March 14th, 2007, 04:56 PM
@George1111: did you see post #3? it does what you want (the same as gremmy's code) in three lines...
March 13th, 2007, 02:26 PM
For I = 1 to 20
Me.Controls("Text" & I).Text = rstRecordset.Fields(I)
March 9th, 2007, 09:04 AM
set the ComboBox's style to 2 - DropDown List
March 8th, 2007, 03:00 AM
I used a string in my example.
he was quoting me, and i demonstrated it in my post, also check out ChaosTheEternal's post
@ChaosTheEternal: nice link! :thumb:
March 7th, 2007, 11:30 AM
True, but you can dynamically load and call procedures within DLLs.
Use LoadLibrary to load the dll, GetProcAddress to get the address of the function, and, at it's most simple use CallWindowProc...
March 6th, 2007, 12:31 PM
strange, I get a value :ehh:
March 6th, 2007, 10:59 AM
something like this perhaps:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, ByVal lpWindowName As String) As Long
March 6th, 2007, 09:12 AM
February 21st, 2007, 12:49 PM
umm, am I missing something?
Private Sub Form_Load()
Text1.MaxLength = 255
Text1.Text = vbNullString
Private Sub Text1_Change()
Label1.Caption = "Characters Remaining: "...
February 20th, 2007, 01:25 PM
AllAPI.net is now http://allapi.mentalis.org/
see this thread @ VBF for more info
February 19th, 2007, 04:42 AM
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, _
February 12th, 2007, 02:30 PM
you need to wrap the opening and closing of the form in a Public function within it.
e.g. in Form1, I have:
Private lRet As Long
Public Function ShowForm() As Long
February 12th, 2007, 03:52 AM
and here's another hacked version, using API Timers (which does return 1, 2 or 3)
edit: but I would whole heartedly recommend making your own custom form.
February 5th, 2007, 04:15 PM
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...
February 5th, 2007, 12:00 PM
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:...
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.