|
What u need is using asynchronous invokes:
the problem u have is because of the GUI background multitasking:
the solution:
if(Button1.InvokeRequired == true)
{
Button1.Invoke(method1);
}
private void method1()
{
Thread Call to Method2
}
private void Method2()
{
// Here You need to show the form;P
}
Hesham
|
|
|
|
|
Hey Hey hey,
I Got The Simplest Code
one winfrm1's button click event i write this
1. winfrm2.showdialogue();
2. filllist();
From very first line the C# moves its all control to the winfrm2 and whenever we exit from that showdialogue from the controlls back to the filllist(); and data refreshed
Regards
Pankaj Joshi
|
|
|
|
|
Hello
I want to know that how to communicate between two same dot net application running on two different systems. This application is not a client - server application.
And also tell me, how would i know that application is running on another system or not ???
Thanks
Devesh Mishra
|
|
|
|
|
Hi Devesh,
One of the easiest way is to use a common file between the applications.
The other way would be to use the config file and have some keys specific to each process.
To know if ur application is running, u can search for ur application name in the Processes list of the machine where u have to search at.
Regards,
Murali
|
|
|
|
|
Hi Murali
Thanks for ur reply.
Would you tell me please, how to use config file between the applications and keys specific to each proces.
Thanks
Devesh Mishra
|
|
|
|
|
While developing ur application, in the app.config file, create a key (say 'instancenumber').
Then at runtime, set the key to a value (say '1','2',etc.) based on the instance of the application running.
This will enable you to associate information specific to each instance.
Regards,
Murali
|
|
|
|
|
Hello,
Why don’t you want to use .Net Remoting. I think that this solution will be easy. Or you can use Global Shared Memory, but if you choose this solution, you’ll work with P/Invoke (DllImport).
|
|
|
|
|
you need to use a kind of connection to send or get protocols or packages.
i give u some tips to learn about that:
Search for the classes of the library System.NetWork
|
|
|
|
|
Hi all,
I have created a windows installer for my application using VS2005 setup and deployment project. Everything is OK. Whenever there is a change in my project that is associated with installer project, I need to remove my service/ application first then it allows to install.
My question is how can i provide an option to install my application if any new version is available without uninstalling it. Currently, i am doing by manually copying the exe to the insalle path.
Thanks in advance.
Praveen Raghuvanshi
Software Engineer,
Wins Infotek Pvt. LTd.
India.
|
|
|
|
|
Hello,
I have created a DLL for COM using VB 6.0. the fucntion has a reference variable which returns some value back.
I am accessing this fuction in C# when i am passing the ref variable it is giving me an error.
Please help.
Thanks in Advance.
Bharath.S Ron
|
|
|
|
|
bharath.s.r wrote: I am accessing this fuction in C# when i am passing the ref variable it is giving me an error.
What error?
Regards,
Satips.
|
|
|
|
|
i am passing a variable as (ref var)
error :- ref object is not declared.
Thanks in Advance.
Bharath.S Ron
|
|
|
|
|
Reference variables are surely supported in C#.
I think the problem under this case might be the use of variable without declaration.
Regards,
Murali
|
|
|
|
|
can u please explain me how i have to rectify it.
i Have learn't C# on my own, i was working on VB Before now has been shifted to C#.
Thanks in Advance.
bharath.s
|
|
|
|
|
While calling the method, pass the 'reference' variables as
SomeMethod(ref varInput);
Then in the definition of the Method u have to use the same reference variable as,
public void SomeMethod(ref varInput)
{
//Give ur implementation here.
}
Regards,
Murali
|
|
|
|
|
the method has allready being deployed in vb6.o
in vb 6.0:-
public function somefunc(ref variable as string)
variable = "XYZ"
end function
in C# i have given reference to this class and function and created a Runtime callable wrapper.
IN c#
object.somefunc(ref csharpvar)
bharath.s
|
|
|
|
|
Make sure you are using the correct namespace.
|
|
|
|
|
maybe this?
IN c#
string csharpvar; //var must be declared first
object.somefunc(ref csharpvar)
|
|
|
|
|
Hi, Im trying to create a C# program that will compute the exact number of months between two durations.
This is my code
TimeSpan duration = startTime - stopTime;
//to compute the difference between days, I use this code
int result = (duration.Days);
unfortunately it stops with duration.Days.. there are no available methods that will compute the months or years (eg. duration.Months , duration.Years)
i tried to compute the days and divide it by 30, but this approach is highly innacurate.
Hope you guys can help
tnx
|
|
|
|
|
|
Hi harini. Thanks for the reply. Ive read the link, but it doesn't mention anything about getting the difference between two dates in months :c
Hope you have other references..
tnx!
|
|
|
|
|
Hai! everybody,
I want to get all the running tasks in my windows os.
Plz give me an hint
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Hi!
You can use the Process class.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Directly u see the Task manager.. or in a .net frame work means Process option is there la.. Its wright take it or u got correct ans intimate me..
Regards..
Maldeeban.R
Hi i am working as a software engineer.. this code project site articles is very usefull for us.. I am very interst to read this articales..
|
|
|
|
|
It is giving the process name i.e Winword but i want to display the tasks as in task manager and i would like to start or stop the tasks even though it is running in the client machine
I tried the Service Controller class also it is giving only the windows services
Best Regards,
M. J. Jaya Chitra
|
|
|
|