Wrox Programmer Forums
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 3rd, 2004, 02:51 AM
Authorized User
 
Join Date: Feb 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default Refresh Form

Hi,

I am writing a program which includes a folder and file browser controls. While the program is running, the user can create or delete files at the folders shown at my program. I am wondering at which event i should refresh my controls to reflect this changes. Currently i do that on Form.Activate event, but it dosn't work as Windows Explorer for example, which refreshes when the change is made and not when activated.

I guess it is something essential. Thanks beforehand.

Alex

 
Old May 5th, 2004, 09:27 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Call the control refresh code from within any event handler that could affect what is in that control. I.e.: If you have a "create new folder" event, after the folder is created you should call the "refresh folder list control" part of the code.

Peter
-------------------------
Work smarter, not harder
 
Old May 11th, 2004, 03:01 AM
Authorized User
 
Join Date: Feb 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Actualy I meant that the user can make changes using another program, lets say Windows Explorer, while my program is running. Sory for making it clear at first. Actualy I found that such a monitoring on the File System can be made using FileSystemWatcher component. With this component this otherwise complicated task is simlified in .NET.

Thanks for replying. All the best.

Alex






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to refresh owner form on closing of child form akumarp2p C# 2005 0 December 22nd, 2006 10:27 AM
How to refresh picture in sub-form sawyer4444 BOOK: Access 2003 VBA Programmer's Reference 0 September 3rd, 2004 04:01 PM
VBA - Form Refresh lxu Access 2 March 4th, 2004 11:13 AM
Refresh form while updating linked form mfletch Access 0 February 26th, 2004 10:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.