473,382 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Accessing a loaded form

Hi

How can I get a handle to a currently loaded form instance and use that to
call one of form's methods?

Thanks
Mar 14 '08 #1
1 809
"John" <Jo**@nospam.infovis.co.ukschrieb
The form is the main form of my app and it has a status bar. I need
to display text in status bar from various subs in modules outside
of the form. What is the best mechanism?
If the code in the modules refer to the Form, you should move the code
from the modules into the Form. Without the Form, the code won't run
anyway.

If you want to write more abstract code, you can cut the relation to the
Form. Instead, declare and raise an event in the Module. The Form can
catch the event and update the statusbar.

Be aware that long running code makes the UI inoperatable. Even short
running code can lead to inoperatable ghost windows that don't reflect
changes in your status bar. In this case you should consider executing
the code in another thread.
Armin

Mar 14 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: JC | last post by:
How do I extract data from a form into the main form for processing? For instance, I have several image files in a form called images(images.frm), indexed from 0 to 99, and I want to import these...
1
by: Jehan | last post by:
At the end of my HTML page I have following..... <script> for (i = 0; i < document.section_entry.length;i++) { // some code } </script>
1
by: R | last post by:
Hello, I have a frame in which there are 2 IFrames., both being loaded from the same domain. One IFrame is loaded from http://test1.xyz.com and the other IFrame is loaded from...
4
by: Paul Brant | last post by:
Hi all, I have a page with an IFRAME in it. From a script in the main ( parent ) page I instruct the IFRAME to load a specific URL. The URL contains parameters that are processed by the server....
2
by: Parveen | last post by:
I have a data grid on a windows form that I want to access from another class that's outside the form but in the same project. This other class stores all methods that populate and modify the grid...
3
by: DotNetNewbie | last post by:
I am reading the book Teach Yourself Microsoft Visual Basic .Net 2003 in 21 Days. I am having trouble getting one of the exercises to work at the end of day 4. Exercises: 1. Create a new...
3
by: simon.duvall | last post by:
Hey all, Was referencing various COMs, and tried using the Windows Genuine Advantage 1.0 Type Library. There's a cool method called GetMachineDetails() that I wanted to try, but for some...
3
by: kosmodisk | last post by:
Hi, I'm having problem accessing javascript-created elements from opened window. This occurs only when I'm including another files in opened window, javascript or css. When I comment out...
1
by: Alexey Smirnov | last post by:
I have a web form, which load a web control by using the LoadControl method void Page_Init(...) { Control ctl = LoadControl(Request.QueryString+".ascx"); // url = default.aspx?module=control1...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.