Search Results - VBForums

Search:

Type: Posts; User: Bonnie West

Page 1 of 13 1 2 3 4

Search: Search took 0.05 seconds.

  1. Replies
    2
    Views
    104

    Re: C++ DLL to VB6

    Try this:



    Option Explicit 'In a standard (.BAS) module

    Public Enum USB_Relay_Device_Type
    USB_RELAY_DEVICE_ONE_CHANNEL = 1
    USB_RELAY_DEVICE_TWO_CHANNEL = 2
    ...
  2. Re: Classic VB - Why can't I use WithEvents on arrays of objects?

    Here's another variation that combines the interface class and custom class into one:
    <style type="text/css">div.vb6c{margin:15px auto;width:85%; background:white;border:1px dashed gray;padding:...
  3. Replies
    10
    Views
    285

    Re: Replace function anomaly

    Here's a more efficient and compact version of your fGetDrives() function:



    Private Declare Function GetLogicalDriveStringsW Lib "kernel32.dll" (Optional ByVal nBufferLength As Long, Optional...
  4. Replies
    10
    Views
    285

    Re: Replace function anomaly

    Replace(s, vbNullChar, " ") should work as expected. Maybe something else is going on in your code. Can you show more of your code?
  5. Re: How to schedule a process to run at a certain time

    Here's an example of programmatically registering a task (using the Task Scheduler Scripting Objects) that will launch the specified executable file daily (or in your case, nightly):


    ...
  6. Re: Printing the hex address of C structures

    Use the hidden VarPtr function to obtain the address of any variable:


    MsgBox "pcm(" & Row & ", " & Col & ") = &H" & Hex$(VarPtr(pcm(Row, Col))), vbInformation
  7. Replies
    16
    Views
    391

    Re: On Error Resume Next

    According to the On Error Statement:
  8. Re: [VB6] - Multithreading in VB6 part 2 - the creation of Native DLL.

    Fantastic trick! :afrog:



    BTW, don't know if you already came across this, but I thought you might be interested in seeing this guy's similar guide to constructing standard DLLs using VB6.
  9. Re: code receiving compile error: Method or data member not found

    If it's OK with you, can you please upload your project here? Click the Go Advanced button and then the Manage Attachments button.
  10. Re: Need help getting a pointer to UDT

    In the original TagsLibraryDefs.pas Delphi unit, the TDSFAudioAttributes record was declared as:



    type
    PDSFAudioAttributes = ^TDSFAudioAttributes;
    TDSFAudioAttributes = record
    ...
  11. Replies
    4
    Views
    192

    Re: Check format date

    Yet another way:


    ? StrComp("NOV 2014", Format$(CDate("NOV 2014"), "mmm yyyy"), vbTextCompare) = 0
    True
  12. Re: Need help getting a pointer to UDT

    As mentioned already, the TAudioAttributes' PlayTime member is not a pointer to a Unicode string or to any other data and therefore shouldn't be passed to the LPWSTRtoBSTR function. In the original...
  13. Re: [VB6] Subclassing With Common Controls Library

    Hope you don't mind several more comments... :bigyello:



    The SubclassWindow function should probably return True only if the SetWindowSubclass API actually succeeded (returned TRUE).


    ...
  14. Re: Need help getting a pointer to UDT

    (I knew you'd find another bug. :D Sorry, I didn't have enough time to fix all the Declares. :o)



    The problem with your current code is that you are passing a pointer to the return value of...
  15. Re: Problem with Rtl functions in Ntdll.dll

    Nice catch!
  16. Replies
    14
    Views
    380

    Re: Read Text From .txt

    The following example assumes your Label controls are part of a control array with indexes from 0 to 10:



    Private Sub Command1_Click()
    Dim i As Integer, FN As Integer, sLine As String

    ...
  17. Re: Problem with Rtl functions in Ntdll.dll

    Option Explicit

    Private Const STATUS_SUCCESS As Long = &H0

    Private Type ANSI_STRING
    Length As Integer
    MaximumLength As Integer
    Buffer As Long
    End Type
  18. Replies
    17
    Views
    342

    Re: True = False?

    Why not Dim a Boolean variable that is set to True when the fieldtype is Memo and False otherwise? That way, you won't have to rely on the TextBox's Visible property.
  19. Thread: Array

    by Bonnie West
    Replies
    22
    Views
    562

    Re: Array

    Remove the highlighted part:


    With text22(0)


    BTW, next time, please post your questions in the main VB6 forum; the VB6 CodeBank is for sharing code only. Thank you.
  20. Replies
    17
    Views
    342

    Re: True = False?

    It would really help if you could attach a test project that exhibits that weird behavior. You might even discover the cause in the process of doing so. ;)
  21. Re: Fsys.DeleteFolder SOMETIMES does not work!

    Same as yours.



    In The annoying hidden current directory lock blog post, the author mentioned one possible culprit:




    In case you encounter this issue again, a utility such as Unlocker...
  22. Re: Help needed to convert Delphi Wrapper

    Here you go. I believe I've managed to correct most of the erroneously Declare'd functions and UDTs, but if you find another bug, please report it back here.
  23. Replies
    4
    Views
    157

    Re: Question about Multipage

    That's what the programmer's manual is for. ;) See the topic Using the TabStrip Control.
  24. Re: Save picture last saved to INI file

    Here's how you would use two of the official APIs for reading and writing to INI files:



    Option Explicit

    Private Declare Function GetPrivateProfileStringW Lib "kernel32.dll" (ByVal lpAppName...
  25. Re: Is it possible to use AdBlock with WebBrowser control?

    Yes.



    While adding unwanted sites to the IE Restricted sites zone is a good idea, it does not completely prevent unwanted sites from being accessed/browsed. The IE zones security feature is not...
  26. Re: Fsys.DeleteFolder SOMETIMES does not work!

    I was able to delete a folder using the FSO while Explorer had it open so I don't think that's the problem.

    What error number/description are you getting? In Vista and above, Windows Explorer will...
  27. Re: What is the best way to Pause/Resume/Stop the current program?

    Using a Timer control (or, if you prefer, the SetTimer API) is indeed the technique that is recommended the most by the VB6 manual. Here's an example:

    Assuming your current code looks roughly like...
  28. Re: Fsys.DeleteFolder SOMETIMES does not work!

    If the error you get is Permission denied (Error 70), make sure no processes (that includes yours) are using the target folder as their current working directory.
  29. Re: Is it possible to use AdBlock with WebBrowser control?

    You might want to try using a custom hosts file instead, such as this.
  30. Replies
    5
    Views
    281

    Re: 2 or more sounds simultaneously

    The attached project demonstrates a different solution using the Media Control Interface (MCI) APIs.
  31. Re: Need timer independent of any parent forms

    The intrinsic Timer control is a wrapper for the SetTimer and KillTimer API functions. Here's a simple example of using those APIs:



    Option Explicit 'In a standard (*.BAS) module

    Private...
  32. Replies
    3
    Views
    149

    Re: Need Help : Textbox date format

    Yeah, use the right control for the job. You might also want to consider the DateTimePicker control.


    https://i-msdn.sec.s-msft.com/dynimg/IC61014.gif
  33. Replies
    11
    Views
    398

    Re: [RESOLVED] About RenderPNG function

    According to Creating Persistent Graphics with AutoRedraw:





    From that same topic:
  34. Re: How to find the correct ProgID to use with CreateObject Function?

    Uh, did you remember to "Set a reference to TypeLib Information (TLBINF32.DLL)"? The missing object types are declared there. ;)



    The semicolons tells the Print method to print multiple...
  35. Re: How to find the correct ProgID to use with CreateObject Function?

    The former is known as Early Binding while the latter is known as Late Binding. It is generally better to early bind object references.



    Version 1.0 of the Microsoft VBScript Regular...
  36. Replies
    3
    Views
    422

    Re: href buttons

    Sorry, but I don't understand. What exactly is the type of button that you are talking about? If possible, can you please attach a screenshot of it? Also, why are you trying to click it anyway? What...
  37. Replies
    3
    Views
    422

    Re: href buttons

    HTML-created buttons are windowless (they have no hWnd). The SendMessage API thus won't work on them.



    Try the example here (which I found by searching the forum).
  38. Re: Using mouse scroll wheel with VB scrollbar

    The Declare aliases aren't necessary as long as the loaded ComCtl32.dll is version 6 or higher (achieved by specifying it in the app manifest). However, since it appears that many VB6 developers...
  39. Re: Using Replace function in a mshflexgrid

    Dim r&, TextToReplace$, sTextMatrix$

    TextToReplace = " price adjusted for sales commission (.911)"

    With GridMisc
    For r = 1& To .Rows - 1&
    sTextMatrix = .TextMatrix(r, 2&)

    ...
  40. Re: Display custom control over form borders

    The ListBox component of a ComboBox isn't actually "embedded" in the ComboBox itself, unlike with the TextBox portion. It isn't a child of the ComboBox, nor of the parent Form. Rather, it is a child...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.