469,592 Members | 1,928 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,592 developers. It's quick & easy.

Windows Forms

L
Hi,

I am writing an ftp program and I provide a form interface (say
Form1) to display the status to the window. This form1 reads an ini
file, which has all the settings needed to do the ftp (Ex: IP address,
username, etc) and starts doing the ftp displaying corresponding
messages to window. This Form1 has a mainmenu and menu items. One of
the menu items is "SetUp". If I want to change the setting used for the
ftp process I can click this menuitem. When I click this menu item, it
will open another form (say
Form2) which has text boxes for entry values of IP addresses, username,
etc and two buttons "OK" and "CANCEL". Form2 reads the ini file and
loads the text boxes when it opens up. When I change something in the
textboxes and click "OK", it should save them to the ini file and
close.

The problem is when Form2 opens, the ftp process should stop and wait
untill I click ok on Form2 which is not happening. Form1 is just
continuing doing its ftp job and displaying messages to window while
Form2 is open. How can I make Form1 stop the ftp, untill I click "OK"
on Form2. Also after I click "OK", the Form1 should start the ftp again
from the begining, not from where it left off when the menuitem "SetUp"
click event got triggered. How do I achieve this

By the way I am using delegates to display messages to the UI (Form1).

The explanation is a bit lengthy but I am not able to think of small
sample code to put up here.

Thanks in Advance,
Lalasa.

Nov 17 '05 #1
1 2842
Hi,

Use Form.ShowDialog() instead of Show
also if you are using a thread to do the transfer you should stop the
thread.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"L" <la********@investors.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hi,

I am writing an ftp program and I provide a form interface (say
Form1) to display the status to the window. This form1 reads an ini
file, which has all the settings needed to do the ftp (Ex: IP address,
username, etc) and starts doing the ftp displaying corresponding
messages to window. This Form1 has a mainmenu and menu items. One of
the menu items is "SetUp". If I want to change the setting used for the
ftp process I can click this menuitem. When I click this menu item, it
will open another form (say
Form2) which has text boxes for entry values of IP addresses, username,
etc and two buttons "OK" and "CANCEL". Form2 reads the ini file and
loads the text boxes when it opens up. When I change something in the
textboxes and click "OK", it should save them to the ini file and
close.

The problem is when Form2 opens, the ftp process should stop and wait
untill I click ok on Form2 which is not happening. Form1 is just
continuing doing its ftp job and displaying messages to window while
Form2 is open. How can I make Form1 stop the ftp, untill I click "OK"
on Form2. Also after I click "OK", the Form1 should start the ftp again
from the begining, not from where it left off when the menuitem "SetUp"
click event got triggered. How do I achieve this

By the way I am using delegates to display messages to the UI (Form1).

The explanation is a bit lengthy but I am not able to think of small
sample code to put up here.

Thanks in Advance,
Lalasa.

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by david | last post: by
7 posts views Thread by Tyler Foreman | last post: by
1 post views Thread by Scott Davies | last post: by
reply views Thread by Scott Davies | last post: by
4 posts views Thread by Rod Gill | last post: by
4 posts views Thread by tshad | last post: by
21 posts views Thread by Dan Tallent | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.