Click here to Skip to main content
15,896,207 members
Home / Discussions / C#
   

C#

 
GeneralRe: Ado.Net using c# Pin
Jiten_Soni30-Mar-04 18:00
Jiten_Soni30-Mar-04 18:00 
GeneralRe: Ado.Net using c# Pin
Heath Stewart31-Mar-04 3:04
protectorHeath Stewart31-Mar-04 3:04 
Generalan SMTP problem Pin
Liang Yitao26-Mar-04 19:07
Liang Yitao26-Mar-04 19:07 
GeneralRe: an SMTP problem Pin
Heath Stewart26-Mar-04 20:03
protectorHeath Stewart26-Mar-04 20:03 
GeneralOlap and XML/a Pin
naresh_pandey1326-Mar-04 17:08
naresh_pandey1326-Mar-04 17:08 
GeneralRe: Olap and XML/a Pin
Heath Stewart26-Mar-04 18:01
protectorHeath Stewart26-Mar-04 18:01 
GeneralShow/Hide form using remoting Pin
johnstacey26-Mar-04 13:07
johnstacey26-Mar-04 13:07 
GeneralRe: Show/Hide form using remoting Pin
Heath Stewart26-Mar-04 18:00
protectorHeath Stewart26-Mar-04 18:00 
One easy way would be to declare an interface with the Show and Hide methods:
public interface IVisibleProvider
{
  void Show();
  void Hide();
}
Put this in an assembly shared by the client and server code. The client control can easily implement this - the Show and Hide methods already exist so just implement the interface without having to define the methods and you're done. The server can make calls on the client using this interface using the appropriate activation types (like a singleton or client-activated type) that allow the server to make calls back to the client (so use a TcpChannel as well since HTTP is a client-request, server-respond protocol by nature).

Another way is just to have the client handle the clicks or key presses and call a method on the server - passing some sort of client ID - and the server returns a value that signals if the client can be unlocked or not. If it can, unlock it, otherwise ignore the click or yell at the user. This would be much easier to implement and would allow you not only the ability to use either the TCP or HTTP channels, but also just to use a simple XML web service, much easier to implement and easier to make secure through the Web Service Enhancements (WSE) 1.0 SDK from Microsoft (includes WS-Security, WS-Identity, WS-Routing, and more and easily integrates with Web Service code) if you desired extra security (so users don't intercept messages and change them before they reach their destination).

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Show/Hide form using remoting Pin
johnstacey29-Mar-04 10:52
johnstacey29-Mar-04 10:52 
GeneralRe: Show/Hide form using remoting Pin
Heath Stewart29-Mar-04 17:09
protectorHeath Stewart29-Mar-04 17:09 
GeneralChange GUI language at runtime Pin
Eric Marchesin26-Mar-04 12:09
Eric Marchesin26-Mar-04 12:09 
GeneralRe: Change GUI language at runtime Pin
Heath Stewart26-Mar-04 17:51
protectorHeath Stewart26-Mar-04 17:51 
GeneralDATABASE change notifycation Pin
Rhonke26-Mar-04 10:51
Rhonke26-Mar-04 10:51 
GeneralRe: DATABASE change notifycation Pin
Heath Stewart26-Mar-04 11:21
protectorHeath Stewart26-Mar-04 11:21 
GeneralDotNet Remoting------------->Urgent Pin
munishk26-Mar-04 10:46
munishk26-Mar-04 10:46 
GeneralRe: DotNet Remoting------------->Urgent Pin
partyganger26-Mar-04 10:58
partyganger26-Mar-04 10:58 
GeneralRe: DotNet Remoting------------->Urgent Pin
Judah Gabriel Himango26-Mar-04 11:15
sponsorJudah Gabriel Himango26-Mar-04 11:15 
GeneralRe: DotNet Remoting------------->Urgent Pin
munishk28-Mar-04 13:54
munishk28-Mar-04 13:54 
GeneralRe: DotNet Remoting------------->Urgent Pin
Heath Stewart26-Mar-04 11:18
protectorHeath Stewart26-Mar-04 11:18 
Generalzipping files in C# Pin
elena1234526-Mar-04 10:13
elena1234526-Mar-04 10:13 
GeneralRe: zipping files in C# Pin
Judah Gabriel Himango26-Mar-04 10:20
sponsorJudah Gabriel Himango26-Mar-04 10:20 
GeneralBuild and revision number Pin
blackthunder00126-Mar-04 9:15
blackthunder00126-Mar-04 9:15 
GeneralRe: Build and revision number Pin
partyganger26-Mar-04 9:42
partyganger26-Mar-04 9:42 
GeneralCode-Completion Pin
Peter Nirschl26-Mar-04 8:08
Peter Nirschl26-Mar-04 8:08 
GeneralRe: Code-Completion Pin
Heath Stewart26-Mar-04 8:18
protectorHeath Stewart26-Mar-04 8:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.