473,395 Members | 1,495 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.

Static Form

I wasn't able to find out how anywhere how to do this, but i need to
have a form loaded at a point and being able to be access with all is
control from anywhere. So i need it to be static and by the same
occasion the control inside of course. How do i do that. I'm sure it
possible if VB6 is able to do that c# should.

I don't want answer like : "Why you want do that ?", it's what i need
for that program section that's it.
Nov 15 '07 #1
2 2131
Franck,

Well, you are going to get questions about why do you want to do that,
because it doesn't make much sense from the information you provided.

Regardless, once you create your form, you can set a static variable to
that form, and then expose it to your application (through a public
property, no doubt).

As for the control on the form, you can set a static variable to that,
or set the visibility of the field with the control (or a public property on
the form which returns the control) to public.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Franck" <th***********@hotmail.comwrote in message
news:2f**********************************@d4g2000p rg.googlegroups.com...
>I wasn't able to find out how anywhere how to do this, but i need to
have a form loaded at a point and being able to be access with all is
control from anywhere. So i need it to be static and by the same
occasion the control inside of course. How do i do that. I'm sure it
possible if VB6 is able to do that c# should.

I don't want answer like : "Why you want do that ?", it's what i need
for that program section that's it.

Nov 15 '07 #2
I created a Static class which instantiate my form as static and now
it work, i have access to all form control and property from any for
in the project. Like VB6.
Nov 15 '07 #3

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

Similar topics

3
by: Steve | last post by:
Visual Studio 2003 .NET / C# I have a treeview object on a form which acts as the main menu controller for my application. the treeview is always in sight, and the form it is on acts as the...
3
by: Greg Merideth | last post by:
An app I'm working on has a "message" box docked to the bottom of the window to display messages. I've added a series of child windows to the main form and wanted to keep passing messages into the...
15
by: Sharon | last post by:
I’m trying to build a generic Publisher-Subscriber that will work over the net, so I’m using the Remoting. I wish that the subscriber user will be notify about the messages sent by the...
2
by: superseed | last post by:
Hi, I'm pretty new to C#, and I'm quite stuck on the following problem. I would like to add to my application a Windows.Form (singleton) on which I could display a message of one of the...
11
by: Kevin Prichard | last post by:
Hi all, I've recently been following the object-oriented techiques discussed here and have been testing them for use in a web application. There is problem that I'd like to discuss with you...
4
by: Bry | last post by:
Is it possible to produce a Windows Dialog form that can be used like MessageBox.ShowDialog(), but returns a custom object type e.g. myObject = MyForm.ShowDialog(); rather than // This...
6
by: RSH | last post by:
I'm having a bit of trouble understanding Static properties. I have two forms and I need to be able to access a property from from1 in form2. The code below does not work but I'm not sure why...
7
by: Jon Slaughter | last post by:
I have some static fields in a class to keep track of "global" information but this information is local to each form that the class is used on. e.g., the class represents a base...
5
by: Jon E. Scott | last post by:
I'm a little confused with "static" methods and how to access other unstatic methods. I'm a little new to C#. I'm testing a callback routine within a DLL and the callback function returns a...
4
by: MichK | last post by:
Hello, I'm new in C#, and I'm working on some application to do direct audio recording and realtime plotting on screen. Now I'm having a lot of trouble to update the screen yet, it has been taking...
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:
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.