Search Results - VBForums

Search:

Type: Posts; User: Bonnie West

Page 1 of 13 1 2 3 4

Search: Search took 0.07 seconds.

  1. Re: Not sure how to handle this filename.

    For quick testing purposes, I usually display text using Unicode message boxes (e.g. MessageBoxW or WshShell.Popup).



    How are you invoking the Open dialog box? Are you sure you're using the...
  2. Re: Not sure how to handle this filename.

    Have you already tried using the Unicode versions of the relevant Windows APIs? (e.g. MoveFileW & GetOpenFileNameW)



    EDIT

    You could also manipulate such filenames using either the File...
  3. Re: [RESOLVED] Create a shortcut to a program for the Autostart folder

    The value stated in the ShowCommand's documentation for starting a window in a minimized state is indeed erroneous. The correct value is declared in both the IShellLink::SetShowCmd method and the...
  4. Replies
    15
    Views
    355

    Re: [Visual Basic 6] Form

    I'm sorry, but your question is quite confusing. How about posting screenshots or illustrations of what you're trying to achieve so that we can better understand your goal? The Insert Image button in...
  5. Replies
    11
    Views
    326

    Re: A basic question about strings

    The solutions in posts #2 & #4 both produce identical results to yours yet they have less lines of code. ;)



    That's because the underlying APIs uses C-style strings where the Null character...
  6. Replies
    11
    Views
    326

    Re: A basic question about strings

    Well, my example didn't need any trimming, but if Daniel thinks it's going to be necessary, then he can add it himself.
  7. Replies
    11
    Views
    326

    Re: A basic question about strings

    A straightforward, albeit slow solution is via Regular Expressions:



    Option Explicit

    Private Sub Main()
    Dim mySite As String

    mySite = "BR0250 BR0014 TL1245 FR0298 BG2568...
  8. Replies
    1
    Views
    149

    Re: VBScripting Idea Need help starting

    See:


    Trigger.StartBoundary property
    Daily Trigger Example (Scripting)
    Task Scheduler
  9. Replies
    15
    Views
    355

    Re: [Visual Basic 6] Form

    You have a point there. :thumb:

    I tend to use constant names instead of the friendly names listed in the Properties Window because I prefer the constant names and I also assume that the reader...
  10. Replies
    15
    Views
    355

    Re: [Visual Basic 6] Form

    Private Sub Form_Load()
    Caption = "StartUpPosition = " & Switch( _
    StartUpPosition = vbStartUpManual, "Manual", _
    StartUpPosition = vbStartUpOwner, "CenterOwner",...
  11. Replies
    15
    Views
    355

    Re: [Visual Basic 6] Form

    They mean the same thing (they have the same value of 1). One is a constant name (vbStartUpOwner) while the other is just used for display purposes.



    The documentation of the StartUpPosition...
  12. Replies
    15
    Views
    355

    Re: [Visual Basic 6] Form

    If the 2nd Form is owned by the 1st Form, you can have it automatically center itself on the 1st Form by setting its StartUpPosition property to vbStartUpOwner.
  13. Re: Postmessage API to send text and to textbox in other application.

    http://www.vbforums.com/image.php?u=147151&type=sigpic&dateline=1374042884
  14. Re: Write Unicode text to a file via API correctly

    The obsolete OpenFile function isn't Unicode-aware! :eek: MSDN recommends the CreateFile function instead:



    Private Declare Function CloseHandle Lib "kernel32.dll" (ByVal hObject As Long) As...
  15. Re: Simple way to copy text from telnet and cmd window

    The Exec method of the WshShell object is probably better suited to what you're doing.
  16. Re: Having Trouble Getting VBS Script to Fully Run. HELP

    Option Explicit

    'Declare name and age variables
    Dim strName, strAge, strAgeIn10Yrs

    With WScript.StdOut
    'Prompt User For Name and Age
    .WriteLine "Please enter your full name..."
    ...
  17. Replies
    12
    Views
    1,627

    Re: Vb6 and icons

    I haven't yet bothered verifying Microsoft's claim, but I have no reason to doubt their recommendation.



    I'm probably wrong, but I suspect a contributing factor to the alleged performance of...
  18. Re: 2 questions about adding a label by using code

    A control can be sited on any tab of the SSTab control by first changing its active tab to the desired tab and then setting the SSTab control as the control's new container:



    Public Function...
  19. Replies
    12
    Views
    1,627

    Re: Vb6 and icons

    Sounds like you're using the PaintPicture method to display a GIF resource. You may want to try the Render method instead. As this screenshot of the attached demo project below shows, it can render...
  20. Replies
    4
    Views
    217

    Re: Detect when a pic has been loaded?

    Doesn't disabling the "Next" button just before loading the picture and re-enabling it afterwards work?
  21. Replies
    3
    Views
    182

    Re: Height calculation

    If the Form containing the TextBox uses exactly the same font as the TextBox, you could estimate the required height via the Form's TextHeight method.
  22. Re: Open File via Windows Explorer

    Rather than searching for (possibly bad) code examples, why not learn how to properly associate a file type with your program? Microsoft has published an official guide here: Implementing a Custom...
  23. Replies
    10
    Views
    262

    Re: Control BackColor

    The CommonDialog control, like some other intrinsic controls, doesn't have a BackColor property. In order to skip controls which doesn't have that property, you can simply ignore the errors being...
  24. Re: VB6 Enum Declare with VB6 Keyword

    If you really don't want to use prefixes for your UserControl's public Enums, you could declare those Enums in a type library so that they will be guaranteed to have lower priority than VB's...
  25. Re: Open File via Windows Explorer

    What exactly do you mean by "open a file from windows explorer"? Do you mean something like this?


    Shell "explorer.exe ""<pathname of your file>""", vbNormalFocus
  26. Re: scroll event not firing in listbox when using mouse wheel

    You may want to check out Karl E. Peterson's Reacting to the Mousewheel article. He has a code sample there that contains a drop-in ready CHookMouseWheel.cls class module.
  27. Replies
    9
    Views
    272

    Re: How to space all textbox lines

    It looks like you want to append a space character after each word, is that right? If so, you only need to modify MikiSoft's example a bit in order to achieve what you want:



    Private Sub...
  28. Re: VB6: Why am I forced to code this way?

    [/QUOTE]

    That compile error isn't really weird once you get to read the documentation for that error message:
  29. Re: Label Forcolor - Color Only Numbers

    Joacim Andersson has created a HyperLabel usercontrol that can do that and more.



    http://www.vbforums.com/attachment.php?attachmentid=44115&stc=1&d=1136458867
  30. Replies
    10
    Views
    380

    Re: Resize Control On Form

    The traditional solution (which doesn't introduce visual glitches such as flickering) is to subclass the Form and handle the WM_GETMINMAXINFO message. There are already plenty of examples around for...
  31. Replies
    10
    Views
    380

    Re: Resize Control On Form

    Option Explicit

    Private m_Gap As Single

    Private Sub Form_Load()
    m_Gap = ScaleWidth - (Command1.Left + Command1.Width)
    End Sub

    Private Sub Form_Resize()
    Command1.Left = ScaleWidth...
  32. Re: How to use setprocessdpiawarenes in VB6

    Try this (untested!) code:



    Option Explicit

    Private Enum PROCESS_DPI_AWARENESS
    Process_DPI_Unaware = 0
    Process_System_DPI_Aware = 1
    Process_Per_Monitor_DPI_Aware = 2
  33. Re: How to pass a c# window(form) handle to a VB6 project or form?

    Actually, ...



    Note that Parent Windows and Owner Windows do not mean the same thing!

    In order for your VB6 Form to be modal to your C# Form, you'll need to change the owner window of the...
  34. Re: How to detect if a file is in Use

    Your FileExists function is relying on a very old and no longer recommended API! A better API for this would be the GetFileAttributes function:
  35. Replies
    38
    Views
    3,668

    Re: Rename , Open, read Unicode files

    Here's another (likely more efficient) solution that you may want to consider:



    Private Const INVALID_HANDLE_VALUE As Long = (-1&)
    Private Const MAX_PATH As Long = 260

    Private...
  36. Re: How to detect if a file is in Use

    Raymond Chen's blog article How do I find out which process has a file open? discusses and demonstrates how to use the Restart Manager API to enumerate the processes that have the specified file...
  37. Re: How to read a unicode text file line by line.

    Thanks for that! :thumb: Now we know which approach is best in a given scenario. :bigyello:
  38. Re: Scanning files - Special folder paths

    Here's a more efficient and non-leaky* implementation of your SpecialFolderPath function:



    Private Enum SHGFP_TYPE
    SHGFP_TYPE_CURRENT
    SHGFP_TYPE_DEFAULT
    End Enum
    #If False Then
    ...
  39. Re: How to read a unicode text file line by line.

    I don't think there's any Shell Object that can read and write to text files.
  40. Re: How to read a unicode text file line by line.

    Notepad can be used to create text files encoded in either UTF-8, UTF-16 LE (Unicode) or UTF-16 BE (Unicode big endian). You can generate Unicode text by using Google Translate.



    It looks like...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width