Results 1 to 5 of 5

Thread: Code Of Conduct

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2008
    Posts
    3

    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.

  2. #2
    Member
    Join Date
    Sep 2008
    Location
    Denver, Colorado, USA
    Posts
    39

    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

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2008
    Posts
    3

    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

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Code Of Conduct

    Log the user off from their PC? Or the application?

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2008
    Posts
    3

    Re: Code Of Conduct

    Log of the workstation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width