Search Results - VBForums

Search:

Type: Posts; User: Bonnie West

Page 1 of 13 1 2 3 4

Search: Search took 0.14 seconds.

  1. Re: [RESOLVED] bControlIsContainer function

    Late binding occurs when an object is being referenced via an Object type variable. You can easily tell that you're working late-bound when you don't get the IntelliSense list when you hit the member...
  2. Re: bControlIsContainer function

    I'd like to explain why my variation was written that way:


    The With block helps minimize expensive late-bound property accesses by doing it only once.
    Unlike OERN, On Error GoTo won't waste...
  3. Re: How to loop through all INDIVIDUAL controls on a form especially with control arr

    The following non-recursive routines are based on the code in Post #4. Rather than disabling all controls in the specified Form, the code below only disables child controls of the specified container...
  4. Re: bControlIsContainer function

    Here's a variation of Navion's function that appears to reliably detect UserControls that are containers:



    Public Function IsContainer(ByRef Ctrl As Control) As Boolean
    Dim sName As String...
  5. Re: How to loop through all INDIVIDUAL controls on a form especially with control arr

    In the tests I've just conducted, it seems to work well even with deeply nested assorted containers with mixed Enabled properties. Because that code is not restricted to any specific container,...
  6. Re: How to loop through all INDIVIDUAL controls on a form especially with control arr

    As already pointed out by Elroy, when a control container such as a Frame control is disabled, all of its child controls are disabled as well (their Enabled property becomes False). VB6, however,...
  7. Re: [RESOLVED] How-to read unicode characters from windows clipboard

    For those who are wondering about the WM_SELECTALL constant, its official name is actually EM_SETSEL. According to its documentation, if one wants to select all text in the control, one should pass 0...
  8. Re: strdup multiple strings not just a chr

    Yeah, that's definitely a very interesting trick! :thumb:
  9. Re: How to loop through all INDIVIDUAL controls on a form especially with control arr

    A few slight modifications to Elroy's function in Post #6 seems to be all that's needed to make it even more bulletproof:



    Option Explicit 'Add a CommandButton & OptionButton to a blank Form....
  10. Re: How to loop through all INDIVIDUAL controls on a form especially with control arr

    Here are a pair of subroutines that disables all controls (both arrays & non-arrays) in the specified Form and then reverts them to their original Enabled state afterwards:



    Option Explicit 'In...
  11. Re: strdup multiple strings not just a chr

    ? """"; Replace(Space$(500&), " ", "Hi"); """"
  12. Re: MsScript - jscript code, run-time error 1014 - invalid character

    I suspect this is how it got there:


    When the JScript code was pasted in the VB.TextBox's Text property editor, VB6 silently replaced the closing curly brace on the last line with a SOH...
  13. Replies
    4
    Views
    192

    Re: Centering Form on Parent Monitor

    Here are a couple of alternative multi-monitor aware routines: CenterOnScreen & CenterOnWorkArea



    Option Explicit 'In a blank Form

    Private Const HALF As Single = 0.5!...
  14. Replies
    26
    Views
    469

    Re: 100% processor usage

    Col. Gibbon, can you please give us some background info about your application? Can you please describe what the code snippet you've shown is actually doing? The reason I'm asking is because,...
  15. Replies
    26
    Views
    469

    Re: 100% processor usage

    Try inserting a WaitMessage API call just before DoEvents:



    Private Declare Function WaitMessage Lib "user32.dll" () As Long

    Private Sub Main()
    Dim frmMain As frm_main 'Prevent...
  16. Replies
    8
    Views
    281

    Re: API FlashWindowEx with Control

    OK, it turns out Balloon Tooltips can be placed anywhere on the screen, so pointing them to any window (whether from the same process or from another) should present no issues.



    139395
  17. Replies
    8
    Views
    281

    Re: API FlashWindowEx with Control

    Indeed, MSDN can sometimes be not explicit enough. The remarks in FlashWindowEx's documentation, however, did imply that the window in question is a top-level window.



    I'm not aware of any...
  18. Replies
    8
    Views
    281

    Re: API FlashWindowEx with Control

    No, it accepts top-level windows only, not child windows.



    Yes, you can specify the hWnd of any top-level window from any process (as long as it is at the same integrity level as your process,...
  19. Re: [RESOLVED] How-to read unicode characters from windows clipboard

    Yeah, thanks for the reminder! :thumb:
  20. Re: Help Text for Properties of a Custom Control

    The Procedure Attributes dialog box can be found on the Tools menu. It can also be reached via the Object Browser window by right-clicking the member you're interested in and selecting Properties......
  21. Replies
    10
    Views
    358

    Re: short code improvement challenge

    Contrary to popular belief, it turns out the VBScript Regular Expressions Object isn't always slow:



    http://www.vbforums.com/attachment.php?attachmentid=139339&d=1468280352

    ...
  22. Re: Listview non-focus selected backcolor

    Here's a subclassing-based solution that prevents the ListView from changing the highlight color of the selected item(s) when it loses focus by consuming the WM_KILLFOCUS message. It also takes care...
  23. Re: Faster CopyMemory for 32 bits?

    Check out GetMem4:



    Declare Function GetMem4 Lib "msvbvm60.dll" (ByRef Src As Any, ByRef Dst As Long) As Long

    Debug.Assert GetMem4(Src, Dest) = 0&
  24. Re: [RESOLVED] How-to read unicode characters from windows clipboard

    Yeah. :)



    Delegating those methods to the corresponding methods of the intrinsic Clipboard object would be like cheating. :p I prefer to learn how to implement those methods the hard way. ;)
  25. Re: [RESOLVED] How-to read unicode characters from windows clipboard

    Here's yet another Unicode-aware Clipboard module that's modeled after the intrinsic Clipboard object. It exposes additional system Clipboard functionality, including the ability to monitor Clipboard...
  26. Re: API based random number generator for VB6

    The correct name of the flag passed to CryptAcquireContext is actually CRYPT_VERIFYCONTEXT, not VERIFY_CONTEXT. ;)
  27. Replies
    10
    Views
    358

    Re: short code improvement challenge

    See if the following RegEx solution is quick enough for you:



    With CreateObject("VBScript.RegExp")
    .Global = True
    .Pattern = "[\x00-\xFF]+"

    sTerm = Split(.Replace(strWholeDoc,...
  28. Re: UTF to ANSI converter (for VB6 standard TextBox)

    The characters which turned to question marks appears to be Unicode characters. The intrinsic VB6 TextBox control can't display those. You will have to use a Unicode-aware control such as the Forms...
  29. Re: Trigger Listbox Click Event in Out of Process LIstbox

    There is no constant value for a control's ID. The control ID is dynamically assigned (by the programmer) during the creation of the child window and I suspect (but haven't verified) that it may even...
  30. Re: Trigger Listbox Click Event in Out of Process LIstbox

    Manually sending the LBN_SELCHANGE notification code after having sent the LB_SETCURSEL message appears to work:



    Option Explicit

    Private WithEvents LB As VB.ListBox

    Private Sub...
  31. Replies
    5
    Views
    272

    Re: Form VbModal

    Here's one possible solution using a Timer control:



    Option Explicit 'Copy & paste in a blank Form

    Private WithEvents Timer1 As VB.Timer

    Private Sub Form_Click()
    If Forms.Count = 1...
  32. Replies
    8
    Views
    426

    Re: Virtual Printer??

    See List of virtual printer software.
  33. Re: Passing an array from VBScript to COM enabled VB.NET Library...

    Yes, that's true. The Array function "Returns a Variant containing an array."


    I don't know if VB.Net has a Variant data type, but if it does, then the inp parameter should probably be changed...
  34. Replies
    2
    Views
    228

    Re: form picture stretch?

    You could adapt one of the methods here:
  35. Replies
    5
    Views
    343

    Re: Using ShellExecute in VB 6.0

    Your original declaration appears to be intended for 16-bit versions of VB (VB4 and earlier). If you're using VB6 (which is 32-bit), it is therefore not surprising that it didn't work.


    BTW,...
  36. Re: [RESOLVED] how to did action when the application crashed or force closed

    You might also want to consider the SetUnhandledExceptionFilter API function.
  37. Re: Components (OCX files) in VBP versus FRM file.

    When you add an ActiveX control to the Toolbox and then save the current project, a reference to that .OCX file gets added to the current project's .VBP file.
    When you add an ActiveX control from...
  38. Replies
    8
    Views
    329

    Re: Expand image with animation

    This example preserves the aspect ratio of the specified image as it is enlarged:



    Option Explicit 'Copy & paste in a blank Form

    Private Const HALF As Single = 0.5!

    Private...
  39. Replies
    5
    Views
    343

    Re: Using ShellExecute in VB 6.0

    Then you should read the documentation of that API.



    As jpbro already pointed out, the value of the hWnd variable most likely could not be converted to an Integer (it is probably greater than...
  40. Replies
    2
    Views
    198

    Re: How to optimize the following code

    Private Function ReturnVal() As Integer
    Dim i As Single

    For i = 1! To 6!
    VersionNum = GetRegValue(hKey, Choose(i, Path1, Path2, Path3, Path4, Path5, Path6), "Version",...
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.