dcsimg

Search:

Type: Posts; User: Magic Ink

Page 1 of 13 1 2 3 4

Search: Search took 0.09 seconds.

  1. Re: [RESOLVED] Path to Acrobat Reader from Registry?

    I don't see the FindExecutable API mentioned in the posts above, it may be worth a look at too.
  2. Replies
    10
    Views
    658

    Re: Run CMD and wait

    It looks like the old ShellandWait routine pointed to above by dill that most of us have a version of in our toolboxes. eg.


    Sub ShellAndWait(sAppPath$, Optional iWindowStyle As VbAppWinStyle =...
  3. Replies
    15
    Views
    1,799

    Re: Dragging an outlook email to my VB6 app

    Good.
  4. Re: [RESOLVED] Printer Page Setup Issue on Win 10

    http://support.microsoft.com/default...b;en-us;322710 whoops that's another dead link now! MSDN have been weeding again...
  5. Re: [RESOLVED] Printer Page Setup Issue on Win 10

    Sounds like you are using an API generated Page Setup Dialog of which I have no experience. I personally use the Microsoft VB Printer Dialog VbPrnDlg.dll ref....
  6. Re: Printer Page Setup Issue on Win 10

    Have done no testing but wonder if Regional settings 'Measurement system' settings makes a difference. Alternatives here on my Win 10 are Metric and US, I'm in the UK and the default setting is...
  7. Replies
    8
    Views
    1,641

    Re: VB6 - Multiline Textbox Printer

    The DrawText API may be of interest, it allows placement and measurement of text within specified margins and copes with TrueType fonts.

    Example of use which may give you some ideas;


    Private...
  8. Replies
    6
    Views
    706

    Re: Reading ODBC Reg Entries

    https://blogs.technet.microsoft.com/heyscriptingguy/2005/07/07/how-can-i-get-a-list-of-the-odbc-drivers-that-are-installed-on-a-computer/
    ...including the comments below it may be of interest.
  9. Replies
    16
    Views
    1,609

    Re: Accessing Thunderbird functions

    > It seems a form is required because the controls need to go some where.
    You may be able to avoid having the Form and the MAPI Controls by creating a Project reference to MSMAPI32.OCX and then...
  10. Re: MSCAL.OCX does not want to register even with run as administrator

    http://www.vbforums.com/showthread.php?657911-VB6-MSCAL-OCX-Replacement-quot-Kal-quot
  11. Replies
    58
    Views
    1,891

    Re: [RESOLVED] Asc(Mid vs StrPtr+GetMem1

    1. Baka - ref post #32, after all this it would be nice if you could publish your final version!

    2. I wonder a little how timings are being arrived at. Are we supposed to just consider the speed...
  12. Replies
    58
    Views
    1,891

    Re: Asc(Mid vs StrPtr+GetMem1

    >bb = SomeString

    Ref post #9
  13. Replies
    58
    Views
    1,891

    Re: Asc(Mid vs StrPtr+GetMem1

    Dex
    > Why the redim? it's a bit redundant.

    Yep! Thanks...
  14. Replies
    58
    Views
    1,891

    Re: Asc(Mid vs StrPtr+GetMem1

    For j = 1 To repeats
    Dim barray() As Byte
    ReDim barray(0 To Len(txt) * 2)
    barray = txt
    For i = 0 To 2 * (Len(txt) - 1) Step 2
    c = barray(i)
    ...
  15. Replies
    3
    Views
    297

    Re: Screen size on secondary monitor

    This can be handy just pop it into a module;



    Option Explicit

    Private Type RECT
    Left As Long
    Top As Long
    Right As Long
  16. Replies
    3
    Views
    540

    Re: Fast UNC check

    Not an FSO solution but ...
    http://www.vbforums.com/showthread.php?739915-check-if-drive-is-in-disconnected-state&p=4537505#post4537505
    may be of interest
  17. Re: ole drag drop and problem with unicode charachters or load image with unicode

    FileName$ = GetDosPath(data.files(1))
    ...perhaps
  18. Re: ole drag drop and problem with unicode charachters or load image with unicode

    Did you try squirting data.files(1) into George's GetDosPath Function yet?
    Just a suggestion I'm not testing here.
  19. Replies
    46
    Views
    4,678

    Re: Round Function

    So when the numbers get long (the significant figures in a Double approach 13) the going gets tough for even the best numeric methods. An alternative can be to use strings and hammer them into shape...
  20. Replies
    46
    Views
    4,678

    Re: Round Function

    >I'll welcome any anomalous numbers that anyone can come up with
    Sorry to oblige...



    Round5sUp Round17
    (1)0.85 rounded...
  21. Replies
    46
    Views
    4,678

    Re: Round Function

    >Round17 is far better
    And can be made to go a little faster if you cache the PowersOfTen in an array like we've done above; albeit it only makes much difference if nPlaces is changing often because...
  22. Replies
    46
    Views
    4,678

    Re: Round Function

    Using the random numbers produced in your post #38 I'm getting up to 50 results per 1000 in which the results returned by MyRound and Round17 differ, the latter is consistently correct. Here are some...
  23. Replies
    46
    Views
    4,678

    Re: Round Function

    I do wonder if you would be better off taking a much tried and tested Double rounding routine from VbSpeed and converting the returned value to the Type you require as in;


    Function RoundV(n As...
  24. Replies
    46
    Views
    4,678

    Re: Round Function

    VarType seems faster for all;

    Single
    0.222638049097483 (1)
    0.115567907197295 (2)

    Decimal
    0.220177691210716 (1)
    0.115145042349533 (2)
  25. Replies
    46
    Views
    4,678

    Re: Round Function

    Done already;
    0.222302572408274 (GetMem2)
    0.115390198391647 (VarType)

    10,000,000 iterations on x where x is a Variant = CDbl(1.2345). Using QueryPerformanceCounter etc.
  26. Replies
    46
    Views
    4,678

    Re: Round Function

    ... and why use GetMem, VarType seems quicker here.
  27. Replies
    46
    Views
    4,678

    Re: Round Function

    Looks good except for this quirk when the correct number of 1.235 is returned but ...

    ?GeorgeRound3(cdbl(1.2345),3)
    1.235
    ?TypeName(GeorgeRound3(cdbl(1.2345),3))
    Double...
  28. Replies
    46
    Views
    4,678

    Re: Round Function

    Ok George. Your last two posts mention dividing by a Double, I am dividing by a Decimal which appears to be required to get reliably good numbers returned, albeit they are Decimals, not Doubles....
  29. Replies
    46
    Views
    4,678

    Re: Round Function

    Sorry for my oversight on the type returned, but pleased you found it faster.

    This one is a little slower of course (unless we pass a Decimal);



    Static Function GeorgeRound2(ByVal x As...
  30. Replies
    46
    Views
    4,678

    Re: Round Function

    ...and just a tad quicker if you do;



    Static Function GeorgeRound2(ByVal x As Variant, Optional i As Variant = 0#) As Variant

    Dim n As Variant ', i As Variant
    Dim j As Integer
    ...
  31. Replies
    46
    Views
    4,678

    Re: Round Function

    Along the lines suggested by OptionBase1 in post #16. It seems like Double returns are improved and your old routine works for Currency too if the power of 10 is in a Decimal var.
    Hope the following...
  32. Replies
    46
    Views
    4,678

    Re: Round Function

    Just for reference http://www.xbeat.net/vbspeed/c_Round.htm includes some interesting code examples (albeit all for doubles) and a test routine to determine if a rounding routine is good with a broad...
  33. Replies
    15
    Views
    1,799

    Re: Dragging an outlook email to my VB6 app

    Using Automation of Outlook only try;

    In a new Form


    Option Explicit

    'from an idea at...
  34. Replies
    15
    Views
    1,799

    Re: Dragging an outlook email to my VB6 app

    I get the same thing (as is usual) if I double click on the vbp from inside the compressed zip folder. You must right click on the zip select Extract all and then double click the vbp from inside the...
  35. Replies
    15
    Views
    1,799

    Re: Dragging an outlook email to my VB6 app

    This may interest you...


    As noted in the code rems my original ref/ link for this code has gone 404, but the first bold post in this http://www.44342.com/Visual-Basic-f948-t18515-p1.htm is by...
  36. Re: Access main form's properties and controls from a sub form

    Chris - But you are hard coding the calling Form in Form2 and that is what the OP wanted to avoid. Thanks for testing my code.

    Win - Note in my demo the Form names are 'Form1', 'Form2' and...
  37. Re: Access main form's properties and controls from a sub form

    It appears you are having a little bit of trouble with copy and paste because my code in post #2 has been tested with modal Shows and now Modeless Shows and it works without error.
  38. Re: Access main form's properties and controls from a sub form

    >do you mean something like this

    No I mean what I posted in post #2, did you try it?

    In Windows parlance a window's Parent is distinct from it's Owner, we are talking about Owner here, take...
  39. Re: Access main form's properties and controls from a sub form

    If the modal Form can be opened by more than one Form and you want to know which Form it was Shown by you can do it by giving the modal Form an extra Property.

    Assumming Form1 and Form2 are the...
  40. Re: [RESOLVED] Change System Time without elevation

    Pleased to hear you are getting somewhere with it.
    Incidentally my Googling turned up this http://www.windowstimestamp.com/description which looks like a good reference material on things time.
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width