|
Hi manoj
In my application, form1 is the main form and form2 comes from ShowDialog().
and now i want to open/activate form1 from form2 which is already hidden in system tray.
Thanks
Devesh Mishra
|
|
|
|
|
Since form2 is Modal dialog in ur application, you will not be able to get the form1 over it. what you can try is making the form2 modeless by running it with Show() function. In this can you can show form1 over form2 as form2 is modless now.
Manoj
Never Gives up
|
|
|
|
|
Hello,
devesh_code wrote: form2 comes from ShowDialog().
If you are using ShowDialog in Form1 to show Form2, code stops at this point and will only go if you close the form2.
In form2 you have the posibility to set the DialogResult and check it afterwards in form1.
Form2 f2 = new Form2();
if(f2.ShowDialog() == DialogResult.OK)
{
}
else
{
}
What you can not do is showing and interacting form1 while form2 is still open
If you whant to do this you would have to use Show() instead of ShowDialog().
If you then need to call a method or set a field in from1 from form2 you should read this nice article from ColinAngusMackay:
http://www.codeproject.com/dotnet/passingvaluesbetweenforms.asp[^]
Hope it helps!
All the best,
Martin
|
|
|
|
|
Hi Martin
Its not working...I think u r not getting me what i need..
there are two form i.e form1 and form2. There is a send button on the form1. when i click on send, it'll send a message that i m displaying on from2. form2 displays on the another system and form1 is on another system. Application is running on both the system. At form2, there is a reply button. Now i want to show form1 which is in system tray on both the system, when i click on reply.
reply me asap...
Thanks
Devesh Mishra
|
|
|
|
|
You're getting bad answers because your header is totally wrong. Your wording implies you have two forms on the one PC. You need to choose a port, listen to it with form2, and transmit to it with form1. Surely there are articles on what is essentially a chat program, here on Code Project ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i've VS.net 2005.How can i add progress bar to subitem of listview control?
thank
=)
|
|
|
|
|
Hi,
How to convert single dimention byte array to two dimensional byte array.
Advance thanks
|
|
|
|
|
Hello,
I think fatsest way would be a loop!
byte[] b1 = new byte[5];
b1[0]=1;
b1[1]=2;
b1[2]=3;
b1[3]=4;
b1[4]=5;
byte[,] b2 = new byte[2, b1.Length];
for(int x=0;x < b1.Length;x++)
{
b2[0,x]=b1[x];
}
All the best,
Martin
-- modified at 6:58 Wednesday 30th May, 2007
|
|
|
|
|
Hai Friends,
i have to develop a .net appllication that will read windows events like
1. installation/Uninstalling of a software
2. pluging or pluging out of new Hardware
i will make my program as windows service or exe that will run always
now when these (above mentioned ) events occeres. i have to capture and show this message to user
how to do that?
plese help me. it is very urgent.
any idea? any Consepts? or any linkes?
plese help me
thank u
"Help Others U will be helped"
========>Joe<=============
-- modified at 1:37 Wednesday 30th May, 2007
|
|
|
|
|
|
Dear Friend,
thanks For your replay. i went throw the link
it was bit helpfull but i am unable to understand fully, and complete my problem
if U know please Explain me.
thank u
joe
|
|
|
|
|
Hi,
if you need further help, the best is you ask detailed questions in the forum of the article.
|
|
|
|
|
Does anyone here have a source code on internet speed?
What i mean is, I want to implement a program which can detect the speed of an internet. or just like the http://speedtest.net
I have a code already on client to server connection
using Net.Socket
Can you help me please. I`m a newbie in C# and also newbie in codeproject.com
Thanks guys.
just want to know everything...that`s it.
|
|
|
|
|
A speed test works by tracking the progress of a fair size file. So, you can set up a big file and download it, and see how long it takes to come down. Obviously, you can only test speed so long as your connection is slower than the server of the file. It seems to also be testing the speed of ping, that's also a reasonable test.
C#Coudou wrote: I`m a newbie in C# and also newbie in codeproject.com
I recommend you buy a beginner book on C# and work through learning hte language a bit, if you're really new to it. Too many people here will never know how to code, because all they are learning is how to ask for snippets and paste them into their apps.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Wow, I like this forum, very fast to reply. thanks so much.
Christian Graus wrote: because all they are learning is how to ask for snippets and paste them into their apps.
this is what i want and like "snippets".
Yeah i have lots of books here of C#. I just want to go on directly on my app. broadband speed test
could you please help me.
this is the part of code and it works fine.
for server
IPAddress IPAdd = IPAddress.Parse("192.168.1.8"); // my local ip address.
// initialize listener
TcpListener myList = new TcpListener(IPAdd, 8080);
for client
TcpClient myClient = new TcpClient();
Console.WriteLine("Connecting to server...");
// use the specified ipaddress and port in server side
myClient.Connect("192.168.2.226", 8080);
----
you have a code on this->
Christian Graus wrote: It seems to also be testing the speed of ping, that's also a reasonable test.
to know everything is to know yourself...
|
|
|
|
|
C#Coudou wrote: myClient.Connect("192.168.2.226", 8080);
You're connecting to yourself here, right ? That's not going to test your web connection.
C#Coudou wrote: you have a code on this->
No, I don't. It just seems like a reasonable thing to test.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi Friends,
I have an Arrlist which carries 10 strings like :-
arrList.Add("aaaa");
arrList.Add("bbbb");
......... upto 10 strings.
How can i generate these strings randumly..i have tried like
randum o=new random(10);
int i=o.next(1,10);
but in this case i is always 9.
thanks
|
|
|
|
|
What you need to do is create your Random class as a member variable, if you create it every time you need a random number, the numbers get less random.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Remove the '10' out of the Random constructor. It is the seed for the generator and by giving it always the same number it will also always procude the same numbers. Removing the argument from the constructor will result in a time based seed generation which should always be different.
Robert
|
|
|
|
|
Thanks robert..it working fine
|
|
|
|
|
How can i make the thread wait and do other task
hello every one
|
|
|
|
|
Wait for what? Do you want it to do "other task" while waiting, or after waiting?
---
single minded; short sighted; long gone;
|
|
|
|
|
That is kind of what you're generally avoiding when you use threads. You need to better explain what you're trying to do, it sounds like you don't want to use a thread at all.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
To get this implemented you need to have a smart design.
You can implement somthing like:
Suppose thread #2 is waiting for thread #1 to finish the job, and you want thread #2 to do somting while its waiting for thread #1.
In thread #2 implementation you can do the following:
while (true) // this is the wait loop for the thread #2
{
//check if thread #1 has completed its job
if (yes)
exit from this wait loop.
else
perform the task you want thread #2 to do, while waiting.
//Sleep for say 0 so that others thread gets quantum
}
Manoj
Never Gives up
|
|
|
|
|
thanx manoj
hello every one
|
|
|
|