Jump to content

New to VB '08


Recommended Posts

So I started messin with VB about a month ago but a made one program and kinda put it to the side

I need help with a simple word replacer for program I'm attempting to code

I was wondering if i should use the openfiledialog to actually open the text file or if i should just use streamread? :huh:

any help will be appreciated! :)

Link to comment
Share on other sites

I think I kinda worded it wrong sorry lol

yes the user begins the process and determines file.

but if i use openfiledialog and they open a file will it be inaccessible by the streamreader since its already open??

No, because, again, the OpenFileDialog control doesn't actually open the file.

Link to comment
Share on other sites

Eh... there's probably a better way at doing this but...

For i = 1 To Len(sString)
sTemp = Mid(sString, i, Len(sFind))
If sTemp = sFind Then
'add to list
End If
Next i

sString = Input String

sTemp = Temporary Variable

sFind = String You're Looking For

Link to comment
Share on other sites

if anything multithread your program maybe putting the file read/write/ into functions and use CreateThread()

..umm idk how that works in .NET but ..yea use threads/fibers

ummm... :huh:

english please? lol

I'm *very* new to programing and i have no clue what you mean??? <_<

Link to comment
Share on other sites

  • 3 weeks later...

Multi-Threading is a technique that programmers use to make their applications faster!

Imagine you have one function that executes code and does two things one after the other...

That code is running in 1 thread...

If you split it up into two threads, you can get the job done faster. You'll have two running threads simultaneously. However if the first thing has to be done before the second, then you wont be able to make it two threads since you need the output from the first block of code before you can run the second... Make Sense?

A search on google for "Threads" gives this as the second result...


I don't code in VB though so I wouldn't be able to help you with the code.. C++ ftw... ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...