473,395 Members | 2,446 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,395 software developers and data experts.

Main Form reference, size

How can the Main application form be referred to?

In other words, I would like to get the size of the Main Form. But I
don't know how to instantiate it before:

Application.Run(new MyForm());

Thanks!
Nov 15 '05 #1
1 1479
Replace the Application.Run statement with:

MyForm mF = new MyForm();
Application.Run(mF);
and then save/use the variable mF which points to your main form. You could
make mF a static variable in MyForm class and thus make it available
throughout your application, or some other technique.

"Jim Witt" <JW***@BayTechEng.com> wrote in message
news:1068306459.695522@rh9cache...
How can the Main application form be referred to?

In other words, I would like to get the size of the Main Form. But I
don't know how to instantiate it before:

Application.Run(new MyForm());

Thanks!

Nov 15 '05 #2

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

Similar topics

1
by: James Dean | last post by:
I am trying to add controls(labels) to the main form from another class without having the main form as a base class......how do i do this? *** Sent via Developersdex...
3
by: Ray Stevens | last post by:
How do you access properties of the main program's class from another form? There does not apear to be an instance variable that can be used.
1
by: Henry | last post by:
I was trying to work through the Lab 2 exercises in the Microsoft's Windows-Based Applications in Visual C#. While I am not showing any errors I am also not seeing the mainMenu object when I run...
1
by: BillZondlo | last post by:
Can someone look at this and tell me why, when I call this from my main app, it displays fine (fades form in and out) but then before my main app displays, I see other dialog boxes flash...
7
by: | last post by:
Hello, Please bear with me as this is a very basic question. Using Sub Main() within a console application gets executed when the console application first starts. Does the same hold true for...
7
by: Terry | last post by:
I have a Mainform with a Statusbar. When opening another form or doing some processing I want to display info in the Statusbar of the Mainform. I have read a lot of articles on this & have come up...
9
by: Tyler | last post by:
Hello All: I am currently working on a project to create an FEM model for school. I was thinking about using wxPython to gather the 12 input variables from the user, then, after pressing the...
4
by: urkel | last post by:
Hello everybody, I am getting bogged-down by these errors troubling me for the last few days I am writing a C program with a main and several user-defined functions. One of the user-defined...
2
by: pat.saunders | last post by:
Hi, I am using Visual Studio 2005 and am using Visual C#. I notice that the program.cs creates an instance of a form and runs it. I have a PictureBox in the form and a Class File x.cs and in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.