Solved

Is there simple way to ask from vb.net "Is this computer logged on to the Windows domain" and received Yes or No answer

Posted on 2004-09-21
2
185 Views
Last Modified: 2010-04-23
My application needs to know if it is currently on our windows 2000 network domain. I would like to have the initial page contain code that asks this question and returns either Yes or No. (If yes then I will connect to MS SQL server for data, if no then use a local database).

Any help would be greatly appreciated.

Thanks MT
0
Comment
Question by:MajikTara
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
123654789987 earned 125 total points
ID: 12119922
On the Page_Load of u'r main page u can have a call to a dialog form like this

Private Sub MainScreen_Load(ByVal sender As System.Object, _
        ByVal e As System.EventArgs) Handles MyBase.Load
frmLogin.ShowDialog()

End Sub

In this Login form u have have Yes, No buttons. On Click of these buttons u can set a value in a module level variable that determines if u'r computer is logged or not

 Private Sub btNo_Click( _
        ByVal sender As System.Object, _
        ByVal e As System.EventArgs) Handles btNo.Click
NetworkConnected = "No"
Me.close()
End Sub

 Private Sub btYes_Click( _
        ByVal sender As System.Object, _
        ByVal e As System.EventArgs) Handles btYes.Click
NetworkConnected = "Yes"
Me.Close()
End Sub

Module Test
 Public Property NetworkConnected() As String
        Get
            Return networkConnection
        End Get
        Set(ByVal Value As String)
            networkConnection= Value
        End Set
    End Property
End Module


0
 

Author Comment

by:MajikTara
ID: 12124421
123654789987, I have read your response and see that I was not very clear in asking the question. What I was wanting was something like WNetGetUser api code where it looked only to determine if user is on our network. You get the points because you did answer my question as written.

Thanks for the help,
MT
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question