473,466 Members | 1,313 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2976
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Greg Bacchus | last post by:
Hi, I'm getting an exception that really has me stumped. It's sporadic at best, it's only happened a handful of times. This particular time it happened when the user pressed 'Alt-S' to save the...
15
by: Wiktor Zychla | last post by:
today we've found a critical issue regarding the ListView from Windows.Forms. it was confirmed on several machines with Win2K and XP. here's the problem: create a ListView with about 50000 rows....
5
by: david | last post by:
I have developed my web service with a domain name of my computer name and wwwroot directory. I also developed a client of windows form application. It works locally (i.e. in the same machine). ...
7
by: Tyler Foreman | last post by:
Hello, I have a strange problem that occurs every so often in my application. It usually takes place when I hide one form and activate another. What happens is I get the following exception:...
1
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. I'm having trouble getting the code that I've written to work, can anyone shed some light as to where I'm...
0
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. The program I'm trying to develop needs to be able to do the following: - Select remote server -...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
1
by: mfunkmann | last post by:
Hi, I recently got an error and I don't know how to fix it: Error 1 'System.Data.DataColumn' does not contain a definition for 'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO I...
21
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.