|
Ok cool
Oh btw, have you looked at Mono.Nat? I didn't have too much luck with it, but several people have recommended it in the past and it's free anyway..
|
|
|
|
|
No, I haven't. Thanks, I'll give a look at this project!
|
|
|
|
|
First, sorry for my poor english
If u want connect two computer through internet for your application(using socket programming or wcf). U must open port of your modem.
Example: server application use port 8080 to listen client connect to. U must open port 8080.
To open port, run cmd, type ipconfig, enter. The default getway is Ip of modem. Type this IP on IE or FireFox... to access modem, (require usename and password). U cant find the way to open port modem here http://portforward.com/[^]
Client app can connect to your server app if it use correct global IP and port, u can use this page to know your global IP (dynamic IP) http://ip2location.com
Note: if u test your app, both client and server on a computer or computers on LAN, u cant use this global IP (instead LAN IP, or loopback IP). U can get your friend(certainly, use a computer connected internet) to help you.
IF ur app use wcf, u must set security mode in config file to "none" (this is the easiest way ).
|
|
|
|
|
But.. If I can't access the router/modem?
With this example, I can connect a computer to a gateway.
I want to gateway could redirect this connection to a sub-network computer.
I'll search more about WCF, I don't know what it is.
Thank you!
|
|
|
|
|
I want to add button like the following screen shot in my application with VC#. It's from Firefox with Glasser. Can anyone help?
Screenshot
|
|
|
|
|
|
|
|
Hi
Let's assume that I have 2 forms, the main form and the form that main form opens (Form2).
In the first form I have a button - when pressed it opens Form2 and closes the main form -. It closes main form and opens Form2 with this code:
this.Hide();
using (Form2 _Form2 = new Form2())
{
_Form2.ShowDialog();
this.Dispose();
}
this.Close();
When I press that button main form closes and Form2 opens without a problem, but main form doesn't get destroyed. If main form is doing something on it's thread it keeps doing it at background. I want the main form to be completely destroyed. How can I do this?
Thanks.
|
|
|
|
|
Hi,
Form.ShowDialog() waits for the new Form to be closed, so your Dispose statement isn't helping at all.
Try this:
this.Hide();
_Form2.ShowDialog();
this.Show();
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
When I open Form2, I want main form to be completely destroyed but in your code it doesn't get destroyed too.
A thread is working in main form and it keeps doing what it does after the main form is closed and form2 is shown. I don't want main windows to keep doing anything.
|
|
|
|
|
SimpleData wrote: A thread is working in main form
That does not make sense. A thread does not live inside a Form, a thread is a piece of code, any code, executing on a processor, and a Form is a GUI component. Maybe your Form class created and started the thread, destroying the Form would not stop such a thread, unless you do it explicitly in a destructor/finalizer but I doubt very much that is what you are doing.
If you want a thread to stop doing what it does, then tell it to stop by setting some flag, and have the thread check that flag regularly. Killing/aborting a thread the hard way isn't a very good idea.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
How can I set a flag and then stop that thread with a destructor/finalizer?
|
|
|
|
|
you don't need a destructor/finalizer to stop a thread.
Here is a pseudo-code example:
Thread thread;
bool cancel;
void start_Clicked() {
cancel=false;
thread==new Thread(...threadCode);
thread.Start();
}
void stop_Clicked() {
cancel=true;
}
void threadCode() {
while(!cancel) {
.. do something useful
}
}
thas is cooperative thread control: the thread is doing some of the controlability work itself (the while test)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Thank you for your answer, I really need to make some structural changes on my code 
|
|
|
|
|
Hai
I want to connect the remote server from my LAN computer becoz to access the database in the remote server through C# code.
plz give me some useful ideas and examples in C#
|
|
|
|
|
Just set the data source in the connection string as the name/IP of the computer where database is. Connection string can be found here[^].
|
|
|
|
|
|
Hi,
I have a problem with my WebBrowser:
I can't get the full HTML code!
I only get redirects to the frame's, but i need the code in it!
I can't go to the url, because for some reason, the page is empty then!
Please help me!
Martijn.
BTW. Sorry, i'm dutch, i can't speak very well english 
|
|
|
|
|
Your english seems fine, I'm just having trouble seeing the relevance of the question to a C# forum or programming in general.
Who's html code, yours or another site. Some detail of what you are trying to achieve may be useful.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
I have a c# application & i want to install this application in the drive where the operating system is currently installed..................... can you tell me the code just to know in which drive is the operating system installed(like 'C','D')..............then i will work it out..
Thank you
|
|
|
|
|
Hi,
there are many ways to get such information.
One is by looking at some of the environment variables (e.g. WINDIR).
An easier one is using Environment.GetFolderPath(SpecialFolder.System)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Thanks muchness Luc. 
|
|
|
|
|
all of you are welcome.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|