first create second form on your first form after then you can call public variables of your form1 using Form1.yourPublicVar . i mean on buttonclick event write code like this
mySecondForm Form2 = new mySecondForm();
Form2.yourPublicVar = what you want;
I am trying to develop a C# library that will be used by other class libraries in our orginization. I am have great difficulties in getting our other class libraries to be able to call methods of this library. We can create an instance of the public classes in my library but are unable to call any of the public methods or properties (even static ones) of that instance. Can anyone make a suggestion as to what I am missing here?
If you're trying to find BOTH machine using the same address, you can't do it using normal methods because the normal rules for IP networking are being violated. You actually have to start digging into the network routing equipment to find where the other machine is.
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
I have a simple project called QuestionBank. When the clientside connects to the serverside. An exception will be throwed which message shows "Could not find the requested service". I don't know what happen because according to msdn, my project doesn't have any mistakes. OK, let me show the detail:
// This is a server config file.
--- RemotingClient.config ---
// This is a client config file.
--- source code: Server ----
static void Main(string args)
// This is a console app that referenced the
// remoting module "QuestionBankService.dll".
RemotingConfiguration.ApplicationName = "QuestionBankService";
Console.WriteLine("Server running...Press enter to exit.");
--- source code: Client ---
public class RemotingClient
service = new QuestionBankService();
Is it simple? Then tell me how to resolve this problem.Thank you very much.
How can I create a login window which will not be closable as well as which will not loose focus, so that the system couldn’t be accessed without signing in.just like cyber cafe softwares I am using c# .net
I'm developing an application that generates a purchase order in our business system based upon selling statistics for a supplier.
The problem is that I need to make the program more dynamic, I need to integrate an easy way for users to change the calculation methods without having to open my source.
I was thinking that they could write 3 script files: method1.cs, method2.cs and method3.cs that overrides 3 empty methods in my program but as far as I can see VSA doesn't support overriding methods in script. (or at least I couldn't)
Is there any other smart and easy way to build this? I just want the user to be able to replace 3 methods in my application without having to recompile.
Dennis, this sounds a bit dangerous to me. Are the calculations being changed during development or are they going to be dynamic during the operational life of the program?
If the former, just put up with recompiling. If the latter then I suggest redesigning your app to provide more control over the calculations via a form for that purpose. Allow that form some latitude with the parameters and functions available to the users but don't let them have carte blanche with your code.
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
(Translation: I'll show you the way, but not write the code for you.)
The calculations should be dynamic. I was thinking that maybe there was a way to call a method in a script file from my program instead of the opposite. I don't wan't to expose my classes to the users.
The only way I found was by using the PaxScript.NET (www.paxscript.net) since they provide the method Invoke which calls a method in a script file with parameters and sends me back the result.
I built a simple .net remoting program, including a server and a client.
The server has a server-activated object called "JobServerImpl", and a public event "JobEvent".
I add two event handlers at the client side, with codes like this:
this.jobServer = GetJobServer();
jobServer.JobEvent += new JobEventHandler( this.MyJobEventHandler );
catch( SecurityException e )
MessageBox.Show( e.Message );
The server started successfully, but when the client was loaded, a messagebox show with info "type of System.DelegateSerializationHodler and the derived types( ofSystem.DelegateSerializationHoder, for example) are not allowed to be deserialized at this security level".
i am trying to make a chat program, when a client send a message it will first send the message to the server then server will send to target machine , i have found examples but all of them sending message just between server and client is there anybody who has source code ore article about messaging between clients through the server?
shoul i send target ip with the message which i send to server ? i mean i will send message+targetip to server in a socket and server will open the socket and get the target ip address after then server will create new socket and send to target machine i am so confused
thanks to everyone who send message and not
thanks for your reply Divyang Mithaiwala ,
i know nothing about socket programming so i am confused but i am searching i will try your said is there any article about socket programming you advise me? i hope i can manage
have a nice day
Last Visit: 31-Dec-99 19:00 Last Update: 28-Nov-22 15:38