Search:

Type: Posts; User: Mr.Mac

Page 1 of 8 1 2 3 4

Search: Search took 0.20 seconds.

  1. Replies
    3
    Views
    723

    Re: [RESOLVED] XOR Encryption

    Good work! I was going to suggest an entirely different way
    (which works)

    Mac


    Option Explicit

    Private Sub cryptFile(myFile As String)
    Open "z.dat" For Binary As #1
  2. Replies
    3
    Views
    723

    Re: XOR Encryption

    What file?

    You need to show your code that actually writes a file, including the OPEN and CLOSE

    Mac
  3. Replies
    11
    Views
    3,539

    Re: max and min math function help

    Any reason to insist on math.max?

    Try using an array of text1 and do something like this

    Private Sub Command1_Click()
    Dim i As Integer, Max As Single, v As Single
    Max = 0
    For i = 0 To...
  4. Replies
    12
    Views
    799

    Re: Been Awhile...In Need of Help Once More!

    Uh, what is "ListView1"?

    Mac
  5. Replies
    12
    Views
    799

    Re: Been Awhile...In Need of Help Once More!

    Uh, like this?

    Option Explicit

    Private Sub Command1_Click()
    Dim L As String
    Open "z.txt" For Input As #1
    Do While Not EOF(1)
    Line Input #1, L
    List1.AddItem L
  6. Replies
    19
    Views
    832

    Re: skip a line

    Your code:

    If time(i) = "00.00" Then
    'miss the line below the end if
    End If
    If time(i) > time(i + 1) Then
    temporary = time(i)
    ...
  7. Re: Using list of Random numbers to open file one at a time

    But not appreciated enough to be acknowledged.

    :(

    Mac
  8. Re: Using list of Random numbers to open file one at a time

    ============ Form1
    Option Explicit
    Private Sub Form_Load()
    Randomize
    Dim i As Integer
    For i = 1 To 3
    Dim r As String
    r = Str$(Int(Rnd * 10000))
    List1.AddItem r
    Next i
  9. Replies
    9
    Views
    999

    Re: BACKUP HELP in VB6!!!!

    I would build a BAT file that did the backup. Forget VB.

    If you prefer to have a BACKUP button, then have it do
    SHELL "(here is the path to your BAT file)"

    Mac
  10. Replies
    11
    Views
    819

    Re: Working with databases

    Run this and see if it is what you mean.

    Note that if your message is "Who is the president" then any misspelling will give no match. "Who is president" (missing "the") will not match.

    For...
  11. Replies
    11
    Views
    819

    Re: Working with databases

    We could "get anywhere" if you would quit using the term "database". Just say you will create a file which contains messages and replies and you want to know how to find a reply, given a message....
  12. Replies
    11
    Views
    819

    Re: Working with databases

    learn how to work with databases

    "database" is a very vague term.

    It can mean a commercial product such as MS Access or Oracle or Sybase. Some of these cost thousands of dollars and support...
  13. Replies
    62
    Views
    3,875

    Re: Need Subroutine Help

    Well, I don't know what you expect to do with the passed variable, intSize. I would forget about that. But anyway, now you need to write this:

    Public Function strReverse(Num As Integer) As Integer...
  14. Replies
    62
    Views
    3,875

    Re: Need Subroutine Help

    Oops, sorry. My problem was not lack of knowledge of the definition of sort types, but lack of care in reading your code.

    You supplied SortX as shown in the demo below. But as you had two...
  15. Replies
    62
    Views
    3,875

    Re: Need Subroutine Help

    Isn't that the "selection sort" you presented?

    I remember the bubble sort as being something like this

    1) Record that no item was swapped
    2) Make a pass at array swapping any two adjacent...
  16. Thread: vb6 scan

    by Mr.Mac
    Replies
    2
    Views
    603

    Re: vb6 scan

    No problem if you know the definition of all possible virus code and the likely programs they infect. Notice that commercial products require periodic download of more stuff.

    So "possible", yep.
    ...
  17. Replies
    62
    Views
    3,875

    Re: Need Subroutine Help

    Gosh, it's hard to communicate.

    I DID NOT INTEND TO IMPLY THAT THE OP SHOULD CODE GOSUB-TYPE SUBROUTINES. I PRESUMED HE WOULD USE THE SUB.

    I wanted to show how subroutines (no matter how...
  18. Replies
    62
    Views
    3,875

    Re: Need Subroutine Help

    Sorry you think so.

    I intended it as a hint for someone who is confused on the problem, not on VB. It shows three good hints for SUB's. Naturally, I would not provide VB code to do that....
  19. Replies
    62
    Views
    3,875

    Re: Need Subroutine Help

    Well, here is a QBasic answer for a hint.

    Mac



    CLS
    DIM n(19) AS INTEGER
    DATA 334, 384, 105, 222, 61, 2, 175, 228, 114
    DATA 235, 241, 213, 206, 3, 321, 152, 214, 137, 224
  20. Replies
    5
    Views
    7,633

    Re: Adding Items to Top of ListBox?

    Well, only the OP knows for sure.

    I would bet that the OP didn't literaly mean 5,4,3, etc. but was using that as an example.

    The OP merely wants to make a LIFO-type display. Whatever is added...
  21. Replies
    5
    Views
    7,633

    Re: Adding Items to Top of ListBox?

    ROFL!

    I presume you were joking. Your first was the obvious correct answer.
  22. Replies
    8
    Views
    1,275

    Re: Using Arrow Keys to Control A Line

    Thanks! Will add this to my post
    http://www.vbforums.com/attachment.php?attachmentid=61663&stc=1&d=1200424431

    Hope it works.

    Mac

    :)
  23. Replies
    8
    Views
    1,275

    Re: Using Arrow Keys to Control A Line

    Regulars: An off-topic question.

    Is there a way to save ZIP files here, rather than being forced to the technique I used? If so, how?

    Mac
  24. Replies
    8
    Views
    1,275

    Re: Using Arrow Keys to Control A Line

    Maybe you missed the implications of my study. Did you run it? Maybe it appeared not to run because I neglected to recommend a time for the timer event. I got useful info using 50. Or maybe you...
  25. Replies
    3
    Views
    605

    Re: Help With Copy please

    Public Sub BackupMembersFile()
    FileCopy "Members.dat", "MembersCopy.dat"
    End Sub
  26. Replies
    8
    Views
    1,275

    Re: Using Arrow Keys to Control A Line

    Here is a study which may be of interest
    Mac


    Option Explicit
    Dim UDLR As String * 1
    Dim intX As Integer, intY As Integer ' Where snake head is
    Const zTop = 10, zBot = 300, zLeft = 10,...
  27. Replies
    28
    Views
    2,786

    Re: error 6 overflow

    Uh, that's probably it. I have VB5.

    Mac
  28. Replies
    28
    Views
    2,786

    Re: error 6 overflow

    Don't understand. This works fine, even the result is weird.


    Private Sub Command3_Click()
    Dim i As Long
    For i = 1 To 32770
    List1.AddItem "test"
    Next i
    MsgBox List1.ListCount
    Unload Me
  29. Replies
    14
    Views
    1,220

    Re: Need Endless Loop Help -RESOLVED-

    You're welcome! I presume you got rid of the DO/LOOP and instead let VB and the user do the looping for you, as demonstrated.

    Mac
  30. Thread: Possible??

    by Mr.Mac
    Replies
    9
    Views
    1,008

    Re: Possible??

    If you were a super-guru, you might have a slight chance of getting something like that working eventually. But given you have no clue, I recommend you look into commercial applications that do that....
  31. Re: How can I tell if I'm running via an EXE

    Thanks for the hint. That works.

    Mac
  32. Re: How can I tell if I'm running via an EXE

    I only need those values when running via EXE. In debug mode, I set them via other means to values of interest only to the developer (me)

    The code you supplied worked like a champ! Thanks a lot! I...
  33. [RESOLVED] How can I tell if I'm running via an EXE

    I would like my application to run slightly differently if I am running interactively as opposed to compiled.

    I couldn't find this in the FAQ.

    I am temporarily calling my EXE with a COMMAND$...
  34. Replies
    26
    Views
    2,232

    Re: Automatically Tab

    Well, we are drifting far from the original thread topic.

    Let me just say that it is unusual to attempt to import data into a VB program like you are doing. Why don't you just mark this thread...
  35. Replies
    26
    Views
    2,232

    Re: Automatically Tab

    Make all your text boxes "multiline true" then after

    For i = 0 To 4
    Work1 = Work1 + Text1(i).Text
    Next iInsert
    Do
    i = InStr(Work1, Chr$(13) + Chr$(10))
    If i > 0 Then Work1 =...
  36. Replies
    26
    Views
    2,232

    Re: Automatically Tab

    Well, you change the specs, making this a boring project.

    I am going with these final specs:

    There are 4 fields to hold 4 characters each

    There is a final field to hold any remaining.

    If...
  37. Replies
    26
    Views
    2,232

    Re: Automatically Tab

    I had to put the disable for unknown reasons, but I can enable it again when the next field gets control. And ignoring spacebar's are easy. If the user enters "ab cd ef" it will be the same as...
  38. Replies
    26
    Views
    2,232

    Re: Automatically Tab

    With all due respect, Code Doc, your submssion sucks.

    Reason: It simply doesn't work.

    Do this:

    1) Open NOTEPAD and place this therein: "aaabbbbbcccccccccc"

    2) Highlight it and do ctrl-C...
  39. Replies
    26
    Views
    2,232

    Re: Automatically Tab

    Have you tried my version? I give it again with 3,5,10 layout. Please load and try it. It works perfectly if you get "33355555tttttttttt" into the clipboard and post it in textbox1.

    The only...
  40. Replies
    26
    Views
    2,232

    Re: Automatically Tab

    When I tried your code, three characters went into box 1 and then it seemed to take infinite charracters in box 2. It never swapped to box 3. Further, the cursor was one character to the left in box...
Results 1 to 40 of 315
Page 1 of 8 1 2 3 4



Click Here to Expand Forum to Full Width