-
Three problems
I'm making this application in VB.NET. I call it netDemon, it monitors a users Connection time and creates a log. I'm facing few problems rite now. I'm listing them with detail.
Firstly, I'm using Access as my database so that I can store the logs. The problem is that I cannot Insert a new tuple in my Database. I can update an existing tuple but fail to Insert. I'm using the following SQL query:
INSERT into users values ('" & myUser & "','" & myPass & "'," & myPriv & ",'desc');"
where myUser contains the value entered into the textfield and myPass is the password.
Secondly, my application is designed in such a way that it will disconnect any connection that is not made through it. The problem is that even though I'm not connected to the Internet the application keeps showing me a message that I'm connected to the Internet.
I'm using the Function 'InternetGetConnectedState'. According to what I read at 'AllAPI.net' this function returns ture when connected and false otherwise. Here's what I've written:
myCheck = du.InternetGetConnectedState(lpdWFlags, 0)
If (myCheck) Then
If (isConnected = False) Then
'MsgBox("You cannot connect to the Internet, except through netDemon")
MsgBox("You will now be disconnected")
du.InternetAutodialHangup(0)
End If
Else
'If he is not Connected, then do nothing :D
End If
'isConnected' is a Globlal variable of type boolean which is set to 'true' when the user logs onto my application.
Lastly, I want my application to load when Window's loads. How do I do this.
Using VB.NET @ WinXP Pro.
This is very, very urgent cause I have to submit this project by Thursday (02-01-2003). Please reply A.S.A.P ... :D
-
You should add refrence to your program in the registery.
add a string value to with a desired name in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
and the value data should point to your program path, for example :
"C:\program files\yourproject\project.exe"
You can do this in your setup project.
-
Insert statemet
I think the error in your first problem is the word 'desc' - I had problems with 'reserved' words in Insert statments. try domething else and see if it works
-
What I wanted to know was ... how do I program it. I mean whenever my application is installed by someone, it should start up in the system tray on system boot. I'm sorry if I'm being naive, but I'm not able to do it. Please help !
-
Well, I did a bit of explorations and I found it. But the path to my exe file .... how do I know where it is installed. What if its installed in some other directory. How do I find that ?