Search:

Type: Posts; User: reinholdmesner

Page 1 of 2 1 2

Search: Search took 0.03 seconds.

  1. Replies
    7
    Views
    666

    Re: Select Case problem.

    I see people doing this all the time. The correct syntax is...

    Select Case Check1.Value
    Case 0
    'Code goes here
    Case 1
    'Code goes here
    Case Else
    'Code goes here
    End...
  2. Replies
    5
    Views
    2,431

    Re: XML issue (MSXML2.DOMDocument40).

    Try...
    objXMLDoc.preserveWhiteSpace = False
    ...before you load the file.
  3. Re: Fast and safe encryption/decription

    Hi DePhille, I have written a VB implementation of AES that can encrypt 100 of your log files (with 50 lines each) in under 5 seconds - is that fast enough?
  4. Replies
    10
    Views
    990

    Re: The Apostrophe

    There must be another problem, give us some more background and more code and we may be able to help.
  5. Thread: Shell

    by reinholdmesner
    Replies
    6
    Views
    768

    Re: Shell

    Here's what I use:

    Option Explicit

    Private Const PROCESS_QUERY_INFORMATION As Long = &H400
    Private Const STILL_ACTIVE As Long = 259

    Private Declare Function OpenProcess Lib...
  6. Replies
    19
    Views
    981

    Re: Programmer's component name

    So if I send you an exe compiled in VB6, with just a button on the form, you could tell me the name that I used in the IDE?

    It sounds impossible to me, I think maybe it only works on the machine...
  7. Re: [RESOLVED] len() Funtion not working

    This might be considered 'over-engineering', but you could keep the calculation entirely numerical (no strings involved), which executes faster...

    i = 123456
    Debug.Print CLng(Log(i) / Log(10)) +...
  8. Re: [RESOLVED] Overflow: 'Cint': Simple Cint Question?

    Beware of IsNumeric():
    IsNumeric("0d0") 'Returns True...because the 'e' and 'd' characters cause it to parse the string as standard form.
  9. Replies
    18
    Views
    1,382

    Re: PDF Component Recommendation

    The PDF format is 'open' - ie. Adobe have published and documented the format to third-party developers and to the public.

    But, even so, it's an extremely complex file format and creating a...
  10. Replies
    3
    Views
    487

    Re: Date format

    If you want the format: 05JUN08, then you should use the following code...

    ls8.Caption = UCase(Format(Date, "DDMMMYY"))...because it doesn't make any difference whether you specify the letters...
  11. Replies
    3
    Views
    614

    Re: HELP!!! Arc Tan seems wrong???

    This has nothing to do with .NET - math.Atn() is still VB6, as julep stated.

    Secondly, multiplying by pi/180 isn't correct - you should divide by pi/180.

    The equivalent in code:

    Public...
  12. Re: Check keypress without usings API's

    Zipped project attached
  13. Replies
    5
    Views
    561

    Re: SendMessage Question

    Well, it shouldn't really be declared as any of these. Using "... As Any" means you don't need duplicate declarations with aliases because you can specify exactly what you're passing (pointer or...
  14. Re: Check keypress without usings API's

    If you want your DLL function to receive a key code and return whether it's pressed or not -- surely that's exactly what GetAsyncKeyState() does already? Why do you need to wrap it in another DLL?
    ...
  15. Replies
    14
    Views
    1,126

    Re: [RESOLVED] Execute dim strings??

    I have no idea WHY you'd want to do this, but the following does what you're looking for (I think!).


    Call ScriptControl1.AddCode(x13 & x19 & x7 & x2 & x15 & x24 & x27 & """" & x28 & """")
  16. Re: Visual Basic - String Manipulation - Beginner

    Personally I prefer nested InStr() calls, it looks messy but this code should be a lot faster to execute than looping through the string or using string arrays.

    Dim strTest As String
    strTest...
  17. Re: Comparisons... Exteremly confused...

    I think the problem is much simpler - it's probably due to carriage-return/line-break character(s) at the end of the file. If you're creating this file in VB using a Print statement, then you're...
  18. Re: Fast way to find largest value in a large array?

    MASM has macros like if-else-statements and loops and easy access to the Win32API, so I find it's not all that dissimilar to higher-level languages like C and VB.

    Am I right in thinking that you...
  19. Re: Fast way to find largest value in a large array?

    Merri - I thought ThunderVB had died an early death - is this a 'stable' release?
  20. Re: call another exe from vb application

    When you use FindWindow(), you're probably ignoring the window's class name, like this:
    lngHandle = FindWindow("", "My Window Caption")But you can search for a window based on the class name alone:...
  21. Replies
    18
    Views
    10,663

    Re: VB6 - FTP in VB

    If you'd rather use Shell(), then you can use the following wrapper that waits until the called application quits until VB code resumes.
    Option Explicit

    Private Const PROCESS_QUERY_INFORMATION As...
  22. Re: does the INSTR( have a way to you tell you the location of the second delimiter

    This works...
    strSource = "first,last,address,city,state"

    strFirst = Left$(strSource, InStr(1, strSource, ",") - 1)
    strLast = Mid$(strSource, InStr(1, strSource, ",") + 1,...
  23. Replies
    5
    Views
    561

    Re: SendMessage Question

    There is a scenario where these shorthand type characters are necessary. The declaration for SendMessage() allows the fourth parameter to be 'anything'. In reality, this will always be a 32-bit...
  24. Re: Making sure that internet explorer die

    I don't! But the majority of web users still do, so we have to resort to the following web development paradigm:

    ...I was joking by the way ;) Any help for the OP?
  25. Re: Making sure that internet explorer die

    I think the word 'quick' in the OP's last line was supposed to be 'quit'.

    It looks like the quit method of IE's object model doesn't close the instance of the application until any/all dialogs are...
  26. Re: ListView: How to check if there is an item selected?

    Ellis Dee's method will work, there's no need to loop through the ListItems.
    If ListView1.SelectedItem Is Nothing Then
    'nothing is selected
    Else
    'an item is selected
    End If
  27. Re: Problem with msxml2.DomDocument Loadxml

    Well, you've basically answered your own question. The ampersand (&) character isn't valid on its own in XML, it should be replaced with &
  28. Replies
    9
    Views
    869

    Re: Sleep Question

    ^ Agreed, SendKeys() should be avoided where possible.

    But anyways... I think that a DoEvents() after every SendKeys() might work for you.
  29. Replies
    7
    Views
    748

    Re: Creating my own extension

    If you don't want to go throught the 'custom' encyption route, there is another simple solution. You could wrap your text files in a password-protected zip file. This can be done programatically...
  30. Replies
    4
    Views
    486

    Re: find string before a space

    Just for a bit of variety, you could also do this...

    Dim myStr As String

    myStr = "KEDEF RTY"
    MsgBox Split(myStr, " ")(0)
  31. Replies
    2
    Views
    936

    Re: Option Base 1 and StrConv()

    When you need a one-based array, you can use RtlMoveMemory (aka CopyMemory) to convert zero-based to one-based as follows:
    Private Declare Sub RtlMoveMemory Lib "kernel32.dll" (anyDestination As...
  32. Replies
    8
    Views
    1,576

    Re: Callback Function (C Conversion)

    If the function doesn't use the __stdcall calling convention then it can't be used with VB (as far as I know). The fact that you've got this far tells me that you're probably ok here.

    Try the same...
  33. Replies
    8
    Views
    1,576

    Re: Callback Function (C Conversion)

    pParam in irqTest() should be ByVal pParam As Long.

    If you need to retrieve the data that it points to, you could use RtlMoveMemory().

    ^ actually, ignore that, pParam will be passed in with...
  34. Replies
    4
    Views
    824

    Re: Java in VB6

    Off-topic a bit, but I don't think that a JAR is an extension of ZIP, it's just a normal ZIP file that contains Java stuff.
  35. Re: .: How to analyze & use declarations :.

    My advice is to use MSDN (just type the function name in the search box). It can be difficult for beginners to understand the technical stuff and translate some C terminology into VB, but at the end...
  36. Replies
    4
    Views
    746

    Re: Textbox and Call function

    Try this...
    TextBox1.Text = TextBox1.Text & vbCrLf & "Gemmer " & sFilnavnFuld & " ... "
    Call VBA.DoEvents
    Call createDXF(oDoc.Parent, dxfAddIn, sFilnavnFuld, Left(sFilnavnFuld, iMappe))

    The...
  37. Re: .: How to analyze & use declarations :.

    Here's an example of 'Alias' usage:

    This is all you need to declare the function:
    Declare Function GetDesktopWindow Lib "user32.dll" () As Long


    But you can name the declaration differently...
  38. Replies
    15
    Views
    1,050

    Re: how to convert c code to vb code

    So anyways...

    This is what I'd do:
    Private Type NMCOMD
    modtype As Byte 'byte
    modver As Byte 'byte
    statusitems As Byte 'byte
    stat As Byte 'byte
    groupaddr ...
  39. Replies
    90
    Views
    19,663

    Re: Mouseover highlights label text - how?

    Yeah, you can guarantee correct highlight/normal states if you 'capture' the mouse on the MouseMove event (see SetCapture() on MSDN for more info).
  40. Replies
    9
    Views
    721

    Re: space path location

    If InStr(1, Dir1.Path, " ") > 0 Then
    MsgBox "no empty space is allowed in the path location, please rename the folder.", vbExclamation, "Error"
    End If
Results 1 to 40 of 59
Page 1 of 2 1 2



Click Here to Expand Forum to Full Width