CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: bushmobile

Page 1 of 6 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    23
    Views
    3,012

    Re: Not actually a problem...

    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
    Dim...
  2. Replies
    23
    Views
    3,012

    Re: Not actually a problem...

    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...
  3. Replies
    13
    Views
    2,395

    Re: How to declare Mkdir in vb?

    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...
  4. Replies
    2
    Views
    886

    Re: problem with the spacing in the path

    wrap command line arguments with spaces in them in quotes, e.g.:
    Shell "program.exe ""C:\Test Folder\File.ext"""
  5. Replies
    3
    Views
    1,368

    Re: VBA with Excel:Declaring string variable

    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...
  6. Replies
    5
    Views
    784

    Re: interaction between forms

    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...
  7. Thread: API help

    by bushmobile
    Replies
    5
    Views
    1,217

    Re: API help

    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
  8. Replies
    13
    Views
    1,173

    Re: Loading Text Boxes on a Form

    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...
  9. Replies
    15
    Views
    8,402

    Re: Combo box (Forms 2.0 Object Library)

    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.
  10. Replies
    15
    Views
    8,402

    Re: Combo box (Forms 2.0 Object Library)

    Are you doing this in VB6 or VBA?
  11. Replies
    13
    Views
    1,173

    Re: Loading Text Boxes on a Form

    @George1111: did you see post #3? it does what you want (the same as gremmy's code) in three lines...
  12. Replies
    13
    Views
    1,173

    Re: Loading Text Boxes on a Form

    For I = 1 to 20
    Me.Controls("Text" & I).Text = rstRecordset.Fields(I)
    Next I
  13. Re: Stopping user being able to type into ComboBox

    set the ComboBox's style to 2 - DropDown List
  14. Replies
    8
    Views
    1,099

    Re: VB 6 API Programming

    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:
  15. Replies
    8
    Views
    1,099

    Re: VB 6 API Programming

    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...
  16. Replies
    12
    Views
    1,743

    Re: Identifying PID of

    strange, I get a value :ehh:
  17. Replies
    12
    Views
    1,743

    Re: Identifying PID of

    something like this perhaps:
    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
    ByVal lpClassName As String, ByVal lpWindowName As String) As Long

    Private Declare...
  18. Replies
    12
    Views
    1,743

    Re: Identifying PID of

    GetWindowThreadProcessId
  19. Replies
    15
    Views
    1,997

    Re: Displaying characters remaining

    umm, am I missing something?

    Private Sub Form_Load()
    Text1.MaxLength = 255
    Text1.Text = vbNullString
    End Sub

    Private Sub Text1_Change()
    Label1.Caption = "Characters Remaining: "...
  20. Replies
    10
    Views
    1,184

    Re: Form Behind Another...

    AllAPI.net is now http://allapi.mentalis.org/

    see this thread @ VBF for more info
  21. Replies
    10
    Views
    1,184

    Re: Form Behind Another...

    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, _
    ...
  22. Re: How to know which button pressed when a form closes

    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
    Me.Show vbModal
    ...
  23. Replies
    5
    Views
    1,055

    Re: msgbox question

    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.
  24. Re: Copymem API Error - wierd one ????

    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...
  25. Re: Tooltips for each ListBox Item in visual basic 6

    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:...
Results 1 to 25 of 145
Page 1 of 6 1 2 3 4





Click Here to Expand Forum to Full Width

Featured