how could i not loose focus from my current active form in vb2005

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • luvukrishna
    New Member
    • Sep 2008
    • 2

    how could i not loose focus from my current active form in vb2005

    hello sir,
    i am into a project were i don't want my client to access the system until he types the user name and password correctly...... ...for this i need to stop him to access other application even windows explorer... i have tried few things ....but they dint worked...>>secn d option i tried to kill the explorer process itself but im not getting that also....please help...my code

    Code:
    Imports proc = System.Diagnostics
    Public Class Form1
        Dim i As Integer
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
          
    'option 2 this is nt working for closing explorer.exe  
           Dim pList() As System.Diagnostics.Process = System.Diagnostics.Process.GetProcesses
            For Each proc As System.Diagnostics.Process In pList
                ' MsgBox(proc.ProcessName)
                process.Items.Add(proc.ProcessName)
                If (proc.ProcessName = "explorer") Then
                    proc.Kill()
                    proc.Close()
    
                    MsgBox("killed")
    
                End If
            Next
    'option 1 this is nt working for not accessing other application  
    
            proc.Process.GetProcessesByName()
            If (My.Computer.Keyboard.AltKeyDown) Then
            Me.Refresh()
    
    
        End Sub
    
    
    'this is fr logging in
        Private Sub Submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submit.Click
            If i >= 3 Then
                'shutdown system
                MsgBox("System Shutting Down")
                'and remove ur login from table
            End If
            If (Uname.Text = "" And Pass.Text = "") Then
                Conf.Visible = True
                Login.Enabled = False
                Login.SendToBack()
    
            Else
                i = i + 1
    
            End If
        End Sub
    End Class
    //this is the code i tried but both options are nt working s please help......thank ing you
    Last edited by luvukrishna; Sep 25 '08, 05:02 PM. Reason: copied code twice
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    #2
    Well, you could make your app full screen and TopMost, but that won't stop your user from bringing up a task manager.

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Originally posted by insertAlias
      Well, you could make your app full screen and TopMost, but that won't stop your user from bringing up a task manager.
      I think the user can still press ctrl+alt+delete and bring up task manager that way?


      Originally posted by luvukrishna
      hello sir,
      i am into a project were i don't want my client to access the system until he types the user name and password correctly...... ...for this i need to stop him to access other application even windows explorer... i have tried few things ....but they dint worked...>>secn d option i tried to kill the explorer process itself but im not getting that also....please help...my code
      I have no idea why your application needs to kill explorer.
      Why do you want the user from accessing other applications?
      I would be really unhappy if I were a first time user with no username/password and I couldn't get out of your application..

      If the user has to log in to use your application then you need to specify a flow to your application: first they log in, then the main app loads.

      One approach to doing this is to add a module to your application and create a method that will implement the flow that you require: display a log in dialog and if it is successful display the main form of the application...o therwise exit. This method will be the application entry point. You will have to uncheck the "Enable application framework" in order to use your module and set your method to the entry point of your application (right click on your application in the solution explorer and select "properties ").

      -Frinny

      Comment

      • luvukrishna
        New Member
        • Sep 2008
        • 2

        #4
        hi........
        thanx for ur replies but im into a project of cyber cafe were my client shuld not acess other applications untill he enters right user name and password which i verify from server database...
        if he is allowed then he could easily go to the browser.which i dont want. if u have got any ideas, please help..
        thanking you

        Comment

        Working...