|
-
Oct 17th, 2008, 02:53 AM
#1
Thread Starter
New Member
Code Of Conduct
Hi All
My company has asked that the IT department to help out in deploying the company's "Code Of Conduct Ethic" popup.
I have basicaly created a form with the company Code of Conduct Details.
the form consists of lots of text and 2 buttons, "yes" and "No".
If the user clicks on the "YES" button I need to be able to generate a output text file to a destination folder on the network, the text file needs to contain the user name and user display name.
If the user clicks on the "NO" button I need to be able to generate a output text file to a destination folder on the network, the text file needs to contain the user name and user display name and then log the user OFF.
I'm new to VB so any assistance would be much appreciated.
-
Oct 17th, 2008, 05:03 AM
#2
Member
Re: Code Of Conduct
Look into System.IO.Filestream for file read/write operations.
http://msdn.microsoft.com/en-us/libr...ilestream.aspx
If you're not constrained to text files, however, I would suggest looking into XML as an option. You could store all your users in the same file with user name/display name pairs sorted into accept and reject tags. I think it would offer a much cleaner solution.
http://www.vbforums.com/showthread.php?t=478692
-
Oct 21st, 2008, 04:07 AM
#3
Thread Starter
New Member
Re: Code Of Conduct
Thanks alot for your response, I've attached the current code, I'm still having difficulties trying to accomplish this task, below is the code that I have compiled, any assistance would be appreciated, so far my experiance with Visual Basic has been a positive one and I'm looking at further developing my skills
Public Class CodeOfConduct
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub btnLogOff_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogOff.Click
System.Diagnostics.Process.Start("shutdown", "-l -t 00")
'This will make the computer Log Off
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
End
'This will make the program to terminate(end the program)
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Protected Overrides Sub Finalize()
MyBase.Finalize()
End Sub
End Class
-
Oct 21st, 2008, 05:59 AM
#4
Re: Code Of Conduct
Log the user off from their PC? Or the application?
-
Oct 21st, 2008, 09:42 PM
#5
Thread Starter
New Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|