Help with What to Use in this scenario

I don't know what to use - I'm new please be patient with me.

Page 1 of 1

11 Replies - 1027 Views - Last Post: 08 November 2009 - 06:23 PM Rate Topic: -----

#1 octane  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 20
  • Joined: 04-November 09

Help with What to Use in this scenario

Posted 04 November 2009 - 09:20 PM

Hi guys,
Here's the project...

Main computer has this Form with a button that should send a command to an "Agent" that is installed in another computer (both computers connected via LAN)

Main computer clicks the button, value is passed (txt1.text = "GoAhead") via the network, the "Agent" picks it up. confirms the command (if txtFromMain = "GoAhead" then .....) then do something.
-------------

I'm a newbie, and i only got this vb2008 for dummies book as reference. i can do simple things w/ vb2008 now, problem is, i don't know what to search for with regards to the project i have.

If you could post a code - Great, Appreciate the Help.
or please give me what to study and some tutorial links.

Thanks.

Is This A Good Question/Topic? 1
  • +

Replies To: Help with What to Use in this scenario

#2 Sethro117  Icon User is offline

  • Still the sexiest mofo.
  • member icon

Reputation: 236
  • View blog
  • Posts: 2,378
  • Joined: 14-January 09

Re: Help with What to Use in this scenario

Posted 04 November 2009 - 09:23 PM

Look into Sockets. Here is a tutorial that should be able to get you started. http://www.dreaminco...h...1&hl=socket
Was This Post Helpful? 0
  • +
  • -

#3 octane  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 20
  • Joined: 04-November 09

Re: Help with What to Use in this scenario

Posted 04 November 2009 - 09:29 PM

View PostSethro117, on 4 Nov, 2009 - 08:23 PM, said:

Look into Sockets. Here is a tutorial that should be able to get you started. http://www.dreaminco...h...1&hl=socket



WOW!! that was fast! Thanks Mr. Hall will look into it.
Was This Post Helpful? 0
  • +
  • -

#4 octane  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 20
  • Joined: 04-November 09

Re: Help with What to Use in this scenario

Posted 05 November 2009 - 02:17 AM

Ok, I got it to work.. thanks to Mr. Hall & the HangMan.. However i am trapped.

what i intend to do is pass a string to the other computer. the string is checked in computer2. if ok.. computer 2 will be locked. (not the windows lock thing)

i used the blockinput method, however, this can be bypassed by CTRL+ALT+DEL
next, i disabled taskManager... looks good, since my form was maximized, the user won't be able to access anything... until... i tried CTRL+ALT+DEL > Cancel the 'Windows Security' box and tried WIN + D which displays the desktop, now the user can freely select opened apps from the taskbar, they can also use ALT+TAB...etc,

how can i truly block any input, both mouse & keyboard?

This post has been edited by octane: 05 November 2009 - 02:26 AM

Was This Post Helpful? 0
  • +
  • -

#5 Searock  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 35
  • View blog
  • Posts: 259
  • Joined: 15-September 09

Re: Help with What to Use in this scenario

Posted 05 November 2009 - 02:30 AM

Disabling input from mouse and keyboard is really a bad idea. Instead you could disable Alt-Tab, Win + D, Ctrl + Esc combinations by writing a event

http://www.google.co...07896c868034d90
Was This Post Helpful? 0
  • +
  • -

#6 octane  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 20
  • Joined: 04-November 09

Re: Help with What to Use in this scenario

Posted 05 November 2009 - 02:35 AM

View PostSearock, on 5 Nov, 2009 - 01:30 AM, said:

Disabling input from mouse and keyboard is really a bad idea. Instead you could disable Alt-Tab, Win + D, Ctrl + Esc combinations by writing a event

http://www.google.co...07896c868034d90


Hi searock, Thanks.. but how about if they can still select open apps from the taskbar? (with mouse)
Was This Post Helpful? 0
  • +
  • -

#7 Searock  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 35
  • View blog
  • Posts: 259
  • Joined: 15-September 09

Re: Help with What to Use in this scenario

Posted 05 November 2009 - 11:14 AM

One thing you can do is Disable task-manager for some time and re enable it using registry settings.

What is registry?
http://en.wikipedia....indows_Registry

Accessing Registry From Vb.net
http://www.dreaminco...wtopic31219.htm


Registry Value for Disabling Task Manager
http://www.google.co...07896c868034d90

Registry value for disabling Run
http://www.google.co...07896c868034d90

Or

You can kill task manager at particular interval using a timer and using a process class [not recommended]

http://www.google.co...07896c868034d90

This post has been edited by Searock: 05 November 2009 - 02:57 PM

Was This Post Helpful? 0
  • +
  • -

#8 octane  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 20
  • Joined: 04-November 09

Re: Help with What to Use in this scenario

Posted 05 November 2009 - 05:13 PM

Thanks SeaRock!
i already did the "disable Taskmanager" however, i forgot to disable 'RUN' thanks for reminding me.

luv ur animated Sig.. too bad naruto ain't there :-D

will try to work things out, so far i think fooling Windows that the app is a screensaver will work (prompt user for password if any input was detected) - well.., i don't know if this is possible.




View PostSearock, on 5 Nov, 2009 - 10:14 AM, said:

One thing you can do is Disable task-manager for some time and re enable it using registry settings.

What is registry?
http://en.wikipedia....indows_Registry

Accessing Registry From Vb.net
http://www.dreaminco...wtopic31219.htm


Registry Value for Disabling Task Manager
http://www.google.co...07896c868034d90

Registry value for disabling Run
http://www.google.co...07896c868034d90

Or

You can kill task manager at particular interval using a timer and using a process class [not recommended]

http://www.google.co...07896c868034d90

Was This Post Helpful? 0
  • +
  • -

#9 Searock  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 35
  • View blog
  • Posts: 259
  • Joined: 15-September 09

Re: Help with What to Use in this scenario

Posted 05 November 2009 - 05:58 PM

View Postoctane, on 5 Nov, 2009 - 04:13 PM, said:

will try to work things out, so far i think fooling Windows that the app is a screensaver will work (prompt user for password if any input was detected) - well.., i don't know if this is possible.


Why do you need to fool windows, you simply can pop up a maximized black form to cover the whole screen and then ask for a password, but don't forget to disable Ctrl + Esc, Alt + Tab, Win + D keys
Was This Post Helpful? 1
  • +
  • -

#10 octane  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 20
  • Joined: 04-November 09

Re: Help with What to Use in this scenario

Posted 05 November 2009 - 07:55 PM

View PostSearock, on 5 Nov, 2009 - 04:58 PM, said:

View Postoctane, on 5 Nov, 2009 - 04:13 PM, said:

will try to work things out, so far i think fooling Windows that the app is a screensaver will work (prompt user for password if any input was detected) - well.., i don't know if this is possible.


Why do you need to fool windows, you simply can pop up a maximized black form to cover the whole screen and then ask for a password, but don't forget to disable Ctrl + Esc, Alt + Tab, Win + D keys



ok.. thanks.. now i'm banging my head..

i tried capturing Ctrl+esc to no avail...
 Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
		If e.KeyCode = Keys.controlkey And e.Modifiers = Keys.Escape Then
			e.Handled = True
			MsgBox("you use CTRL+ESC")
		End If
	End Sub


i got rid of alt+tab & Win+D with having the form ONTOP (dirty solution)
Was This Post Helpful? 0
  • +
  • -

#11 Searock  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 35
  • View blog
  • Posts: 259
  • Joined: 15-September 09

Re: Help with What to Use in this scenario

Posted 08 November 2009 - 12:02 AM

View Postoctane, on 5 Nov, 2009 - 06:55 PM, said:

i got rid of alt+tab & Win+D with having the form ONTOP (dirty solution)


Sorry for the late reply. :)

if you find my solution bad then lets go by your solution.

Public Partial Class MainForm
	Public Declare Function apiBlockInput Lib "user32" Alias "BlockInput" (ByVal fBlock As Integer) As Integer
End Class



To block the input use apiBlockInput(1).

To unblock the input use apiBlockInput(0)

first you have to create a registry key.

lets say we create a key HKEY_CURRENT_USER\mysoftwate\lock.

Now in that key create a REG_SZ value called Locked and set its data to false.

This might come in handy if a user restarts his computer, specially when his computer is locked and if he restarts his computer then he will gain access to the programs.

One thing you have to do is make your form invisible and add Me.ShowInTaskbar=false in your form load event so that
your application will be invisible in the Task manager Application tab.

In the form load event you have to check for the registry value locked, if it is true then block the system and if it is false then do nothing.
Was This Post Helpful? 0
  • +
  • -

#12 octane  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 20
  • Joined: 04-November 09

Re: Help with What to Use in this scenario

Posted 08 November 2009 - 06:23 PM

Hi There Searock,

I didn't mean that your solution is bad.. what i meant was, MY soultion was bad by just blocking the screen and not trapping or disabling the keys, hence, a dirty solution :D

thank you, for this post.. i'll try to work it out after do some errands first.

thanks! ;)


View PostSearock, on 7 Nov, 2009 - 11:02 PM, said:

View Postoctane, on 5 Nov, 2009 - 06:55 PM, said:

i got rid of alt+tab & Win+D with having the form ONTOP (dirty solution)


Sorry for the late reply. :)

if you find my solution bad then lets go by your solution.

Public Partial Class MainForm
	Public Declare Function apiBlockInput Lib "user32" Alias "BlockInput" (ByVal fBlock As Integer) As Integer
End Class



To block the input use apiBlockInput(1).

To unblock the input use apiBlockInput(0)

first you have to create a registry key.

lets say we create a key HKEY_CURRENT_USER\mysoftwate\lock.

Now in that key create a REG_SZ value called Locked and set its data to false.

This might come in handy if a user restarts his computer, specially when his computer is locked and if he restarts his computer then he will gain access to the programs.

One thing you have to do is make your form invisible and add Me.ShowInTaskbar=false in your form load event so that
your application will be invisible in the Task manager Application tab.

In the form load event you have to check for the registry value locked, if it is true then block the system and if it is false then do nothing.

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1