Search Results - VBForums

Search:

Type: Posts; User: Bonnie West

Page 1 of 13 1 2 3 4

Search: Search took 0.06 seconds.

  1. Replies
    13
    Views
    232

    Re: [RESOLVED] Average speed formula ?

    I thought the self-documenting names of the parameters already made it pretty obvious in what order the time arguments should be passed. I guess that wasn't enough. :rolleyes:


    The TimeDiff()...
  2. Replies
    13
    Views
    232

    Re: [RESOLVED] Average speed formula ?

    Here's another solution:



    Public Function TimeDiff(ByRef EarlierTime As String, ByRef LaterTime As String) As String
    Dim Hours As Long, Minutes As Long, Seconds As Long, Milliseconds As...
  3. Replies
    13
    Views
    232

    Re: [RESOLVED] Average speed formula ?

    Alternative implementation of TimeToSeconds():



    Public Function TimeToSeconds(ByRef Time As Variant) As Long
    TimeToSeconds = DateDiff("s", #12:00:00 AM#, CDate(Time))
    End Function
  4. Replies
    14
    Views
    276

    Re: Stopwatch with miliseconds

    Here's an alternative approach that uses the timeGetTime API function:



    Option Explicit 'Copy & paste in a blank Form and then hit F5

    Private Declare Function timeGetTime Lib "winmm.dll" ()...
  5. Replies
    1
    Views
    61

    Re: Error 91 accessing DLL

    What is the actual ProgID (Programmatic Identifier) of the ActiveX object that you're trying to instantiate? Judging from the error you're getting, it most likely does not begin with the filename of...
  6. Replies
    4
    Views
    147

    Re: DLL procedure call from VB6

    Actually, they are not quite the same thing, as explained below.



    That does seem to be the case, as implied here:



    EDIT Disregard that; didn't see The trick's post before I posted mine.
  7. Replies
    13
    Views
    232

    Re: Average speed formula ?

    This formula expresses the average speed in meters per second:


    35600 / ((01 * 60 * 60) + (12 * 60) + 26) = 8.191440404970087436723423838012 m/s
  8. Replies
    3
    Views
    88

    Re: Permission Denied error

    Also see VB Statement Against Vista.



    EDIT

    Yet another viable alternative is the SendKeys method of the WshShell object which works pretty much the same way as VB's SendKeys statement.
  9. Replies
    3
    Views
    7,350

    Re: [VB6] Shell & Wait

    Have you already tried the two other functions? Did they also failed to monitor the shelled program's termination?



    I don't have access to a Windows 98 system so I can't confirm this, but in...
  10. Replies
    8
    Views
    241

    Re: Reset array to 0-Zero - Fast way ?

    I haven't tested this, but I suspect APIs like ZeroMemory or RtlZeroMemory are probably slightly faster than redimensioning an array.



    Private Declare Sub ZeroMemory Lib "kernel32.dll" Alias...
  11. Replies
    12
    Views
    263

    Re: TreeView question

    Change the TreeView's MousePointer property from ccDefault to ccArrow.



    This simple hack seems to work:


    Open the .FRM file using Notepad or your favorite text editor.
    Move the...
  12. Replies
    12
    Views
    263

    Re: TreeView question

    http://www.vbforums.com/image.php?u=147151&type=sigpic&dateline=1374042884
  13. Replies
    6
    Views
    168

    Re: create EXE via code.....

    Alternatively, the vbAdvance IDE add-in has a Build Button that immediately compiles the active project without presenting any dialogs as long as the path to the EXE has already been recorded in the...
  14. Re: VB6 under Win8.1: Request to show a drag and drop from the explorer onto a comman

    That's to be expected if your VB6 IDE is running elevated (as it should be). It is a consequence of the User Interface Privilege Isolation (UIPI) feature introduced since Windows Vista. Here's a nice...
  15. Replies
    12
    Views
    263

    Re: TreeView question

    For v5.0 of the TreeView control (which doesn't expose that property), you'll have to set the TVS_TRACKSELECT style manually:



    Option Explicit

    Private Declare Function GetWindowLongW Lib...
  16. Replies
    12
    Views
    263

    Re: TreeView question

    Private Sub TreeView1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    Set TreeView1.DropHighlight = TreeView1.HitTest(x, y)
    End Sub
  17. Replies
    17
    Views
    370

    Re: How to Shell a program with switches?

    As I've recently found out here, that no longer appears to be true as of Windows Vista & 7.





    From that same post:
  18. Replies
    3
    Views
    174

    Re: Visual basic 5.0 shell delay

    Here's yet another Shell & Wait example.
  19. Replies
    7
    Views
    280

    Re: AutoRun - Program with admin rights

    Actually, it is possible for an application to be automatically launched elevated at startup or log on. This can be accomplished via the Task Scheduler service. Of course, the process registering the...
  20. Re: Unexpected Infinite loop. Needs some insight.

    vbBinaryCompare is being passed to the wrong parameter of the the Replace function. The code is actually passing 0 (the value of vbBinaryCompare) to the Count argument, hence the reason the Replace...
  21. Re: [VB6] Can SomeOne Please help Me Fix This Code

    Actually, Shell is not a reserved word (it isn't highlighted by the IDE). It is the name of an intrinsic function. That name, however, can be reused for other purposes (such as a variable name or...
  22. Re: [VB6] Can SomeOne Please help Me Fix This Code

    Try this:


    Private Sub DRP15_Click()
    CreateObject("Shell.Application").ShellExecute "DATA\DRP_15.8_Full\DriverPackSolution.exe", , , "runas"
    End Sub

    See the Shell object's ShellExecute...
  23. Replies
    11
    Views
    266

    Re: Hi, I'm new and want to ask a question

    Did you remember to modify the compiled exe so that it is marked as a console application? Can you describe the exact steps you took and what happens when you try to open the exe via a command prompt?
  24. Replies
    11
    Views
    266

    Re: Hi, I'm new and want to ask a question

    Actually, VB6 executables (and other PE files for that matter) can execute in DOS mode. They will display the message "This program cannot be run in DOS mode." or something similar and then quit...
  25. Re: How to read a unicode text file line by line.

    Both of the ADO Stream object and the FileSystemObject always reads lines sequentially from the first through the last. The Stream object's ReadText documentation indirectly provided proof of this...
  26. Replies
    11
    Views
    266

    Re: Hi, I'm new and want to ask a question

    Even though VB6 doesn't have built-in support for building console applications, it is still possible to create one using it fairly easily. These 3 examples demonstrates how:


    Karl E. Peterson's...
  27. Replies
    6
    Views
    197

    Re: Vb6 Error in IDE in Windows 8 64bit

    Don't worry, the SysReAllocStringLen API function is leak-proof. :) I prefer to use that function over Space$ and String$ when allocating string buffers because it doesn't waste time filling the...
  28. Replies
    11
    Views
    281

    Re: [VB6] Time Diff

    Do you mean something like this?



    Option Explicit

    Private Sub Main()
    Debug.Print """"; Format$(#1:30:20 AM#, "\[Hh, Nn, Ss]"); """"
    Debug.Print """"; Format$(#12:00:20 PM#, "\[Hh,...
  29. Replies
    6
    Views
    197

    Re: Vb6 Error in IDE in Windows 8 64bit

    Alternative implementation:



    Private Declare Function LCMapStringW Lib "kernel32.dll" (ByVal Locale As Long, ByVal dwMapFlags As Long, ByVal lpSrcStr As Long, ByVal cchSrc As Long, Optional...
  30. Replies
    3
    Views
    193

    Re: UShort in VB6

    Use the LOWORD macro:



    Private Function LoWord(ByVal dwValue As Long) As Integer
    If dwValue And &H8000& Then
    LoWord = dwValue Or &HFFFF0000
    Else
    LoWord = dwValue And...
  31. Re: How to: Load and show form without activating it?

    Here's another variation that combines moving and showing the Form in 1 API call:



    Option Explicit 'Add a CommandButton and then an array of TextBoxes to Form1

    Private Const GWL_HWNDPARENT...
  32. Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Or, for a more lightweight option, you could just render the PNG image directly on the Form using either GDI+, WIA v2.0 or other methods. ;)
  33. Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    My interpretation of Frido's somewhat unclear question was that he was asking whether the AIC has built-in methods that can give a Form an arbitrary shape or not. At that time, the AIC didn't yet...
  34. Replies
    6
    Views
    191

    Re: [RESOLVED] File Writing

    As stated in the documentation of those APIs, CreateFile's lpSecurityAttributes and ReadFile's/WriteFile's lpOverlapped parameters are all optional. If you have no need for those parameters, you can...
  35. Re: [RESOLVED] need help:treeview selecting nodes

    Alternate method:



    If Not Node Is Node.Root Then
    If Not Node.FirstSibling Is Node.Root.Child Then
    MsgBox "Child Node", vbInformation
    Else
    MsgBox "Parent Node",...
  36. Replies
    6
    Views
    191

    Re: File Writing

    Call the underlying APIs yourself: CreateFile, WriteFile and CloseHandle.
  37. Replies
    5
    Views
    353

    Re: Unicode Full Controls (UFC)

    The majority of AV scanners on VirusTotal don't think so. ;) I suspect that even if that OCX's source code is recompiled on another machine, it will still trigger false positives because of certain...
  38. Re: Report : VB6 IDE and compiler on Win 10 TP

    Yet another way of setting the /LARGEADDRESSAWARE flag is by exploiting the undocumented [VBCompiler] option for .VBP files:



    Type=Exe
    Form=Form1.frm...
  39. Replies
    30
    Views
    593

    Re: Regular Expression: How to match this?

    Well, I don't really have any trick; I just use the topic treeview at the left side of each page to explore MSDN.



    There's nothing wrong with that article. In fact, I also got started from it....
  40. Replies
    11
    Views
    797

    Re: [RESOLVED] RichTextBox1 = Undo/Redo

    See the EM_CANUNDO & EM_CANREDO messages. You might also want to check out the EM_GETUNDONAME & EM_GETREDONAME messages.



    Private Const WM_USER As Long = &H400
    Private Const EM_CANUNDO ...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width