If all forms are closed and all non-background threads have exited cleanly (no resources left open etc.) Then closing down the main form should also close the application.
Do you have any hidden forms still open? Any threads running?
Application.Exit has pretty much the same result as end in VB6 - not all cleanup code gets called etc.
If you're using .Net then System.Net will give you a lot of features without having to delve into APIs.
The following article on codeproject may help (In C# though)
http://www.codeproject.com/csharp/FTP.asp
Although you can use 'Or' and 'AND' to do bitwise stuff the same keywords are used for boolean logic as well, if there is a situation where either bitwise or boolean could be applied there doesn't appear to be a way to force bitwise (try enums with the attribute for example)
Optional parameters are generally looked down on in .Net and they can have nasty side effects if used in public functions within a DLL.
Function overloading is generally the recomended way.
To add to VolteFace's list
VB has poor bitwise manipulation
VB doesn't automatically short circuit logic evaluation, you need to use the new keywords like orelse, andalso
C# also has operator overloading (if you need it that is)
using Application.DoEvents inside the loop will give windows a chance to repaint the form and also process the message loop so the user can move the form etc.
I just copy and pasted the code into a new vb project, changed the path to "C:\boot.ini" - I knew that file was there and it worked fine.
Only thing I can think of is that the file isn't there.
I'll consider that as 'just as bad' then ;)
I always avoided it in VB6 because of the way it abruptly ended a running app, seems like it does the same in .Net.
Perhaps I've missed it in your code but you don't appear to be telling class b to handle the event.
ps if you wrap you code in [ vb ] [ /vb ] but remove the spaces the forum will format up the code and make it easier to read.
.Net dlls don't need to be registered, registering components is just a COM thing.
In your Visual Studio VB project right click on references in the solution explorer and browse to the dll from there.
At the top of the form module put
Imports System.Net
Imports System.Text
and in the button click paste the following
Dim wc As New WebClient
Dim s As String
Dim b() As Byte
b = wc.DownloadData(TextBox1.Text)
s = Encoding.ASCII.GetString(b)
s should now be the raw text of whatever the url in textbox1 was.
ps you need to enter the protocol as part of the url
i.e.
http://www.b3ta.com
will fail
http://www.b3ta.com
should work
Are you using C++ from within the Visual Studio IDE? If so right click on the project and go to properties, under linker advanced there should be an entry for Import Library. Type WS2_32.Lib into the field.