:confused: I got to make a program that checks if the user is loggin on the network.
How do you do that?
if user is loggin in the true
else false.
If you know can you also make sample code for me to learn off of?
-Scave
Printable View
:confused: I got to make a program that checks if the user is loggin on the network.
How do you do that?
if user is loggin in the true
else false.
If you know can you also make sample code for me to learn off of?
-Scave
Wow..
that is alot of code..
All i was really looking for was like:
dim strName as string
strName = bob
userloggin(fake function) = strName
if userloggin = false then "error"
else "ok"
;)
I will try to decode your code to make it seem like that.
Thx
Here's a lovely little bit of code which I got off the internet:
However, I do have a program, which lists ALL users on the network in a treeview and allows you to send message to them.
I think it may be too large to post it on this site :( but I'll try.
Hack: The code, which you posted a link for, is weird. I can't get it to work. Very strange code :confused:
The form below is almost as weird, but works...to find out for 1 user just change the line:
ToVB Code:
Call GetUserInfo(Users(x), UserName, Logged)
VB Code:
Call GetUserInfo("Steveb", UserName, Logged)
Well, you have to change Steveb to the NT username you want to look for. errr, I'll try and post my NT messenger code, which also lists the PC's people are logged into. I wrote it for use with soem spy ware so our help desk department could see what was going happening on a users machine when they had problems. Here you go...
Here's the NT VNC application i was on about.
It's not finished yet, so I appologies if some of my code is not consistant. I just put it in there for speed....if you want the full version then send me a message and I will post it to you when it's finished...
I know it's not exactally what you were looking for, but I will post THAT code in a second. Just others may be interested in this :)
It didn't work how i think it should have worked...
Right now there is 4 ppl on the network.
And i changed the users(x) to one of the computer names
and the out put i got was:
user:admin,, Login status =
user:guest,, Login status =
user:training-3,, Login status =
and that is it... That is me! :(
I am also making a msger but if the to user is off the network it still sends it with out an error msg.
So I want to send it only if the to user is on the network.
But thx any ways...
Here's the code to check if a user is logged on.
All you do is ebter the server name and the NT username and click the button, simple eh? :)
One problem, if the user hasn't accessed the server for say 20 minutes, don't know the exact time, they are deemed to have logged off. :(
There is another API command around this as the one I have used gets PC names as well...
i have written a great messenger program, different to the VNC program which I posted above...I'll see if it's small enough to post here :)
Here it is:
You type the message in then click on the buttons on the graphic(bottom right) they have tooltips. Click on the button with the tooltip "Select Users" then right click in the blue part and add a user....
It stores the names, hides itself off screen and sends to multiple users and tell you if they received the message...
What do you think of it...?
Code maybe a bit crap, but I wrote it after knowing Vb for 3 months :(
Ok, thx! I think this will do it good :)
I have to get my boss to look at it.
When I am done.
thx:cool:
Which prog?
The single user logged in one, NT Messenger, or the VNC program?
I just made it up.
Hope it goes well...
Give us a shout if you need any help.
I know it's API code, but if you put another post, like this, in the GENERAL VB QUESTIONS forums then loads more people will look at it :)
Not many people read the API section, well compared to the general section anyways :(
ok, thx