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

Maintaining Form Control

Hi Guys. I am starting a "corporate toolbox" to maintain projects for a
company. I need the main form to be controllable so I can disable it as
I step through the application. When a user brings up another form I
want to disable the main form and/or hide it. I have pondered over this
for awhile, what is the best way to create a main form that you can
control?

I was thinking of creating a splash screen and use that as the main form
which than call the "real main form" and make it shared so other forms
can access its functions.

Any other ideas?

Thanks,

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
2 830
* Ivan Weiss <iv*****@optonline.net> scripsit:
Hi Guys. I am starting a "corporate toolbox" to maintain projects for a
company. I need the main form to be controllable so I can disable it as
I step through the application. When a user brings up another form I
want to disable the main form and/or hide it. I have pondered over this
for awhile, what is the best way to create a main form that you can
control?
You can show the form modally over the main form by calling its
'ShowDialog' method. Maybe it's better to develop an MDI environment.
I was thinking of creating a splash screen and use that as the main form
which than call the "real main form" and make it shared so other forms
can access its functions.


What's your exact problem/question? How to _implement_ the idea you
describe above or to find a better approach?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
My goal is to create the easiest yet efficient way to manage the forms I
create. Unfortunately I liked VB6 better in this regard. I am
currently doing the following which seems to work but hopefully wont
backfire later:

In a module I created a global variable:

Public objMain As frmMain

in the frmMain class Form_Load event I have:

objMain = Me

in any other forms I am creating I am inserting the following code:

objMain.Enabled = True
objMain.Activate()

above:

MyBase.Dispose(disposing)

in the:

Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)

method. Is this an acceptable approach or should I be doing something
else. Whenever I create a new instance of another form I simply set
enabled = false to the main form.

I am actually re-writing a similar program and want it to function
basically the same but with more features (for ease of use). If there
is a better method I am open to suggestions. I do not think MDI is the
better option for this type of application, although is that generally
preferred?

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #3

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

Similar topics

5
by: leegold2 | last post by:
Probably a newbie question about "state": My problem is I have a search form, so user enters a keyword <enter>, then this form posts to another page were the result are displayed. But this...
1
by: Das | last post by:
Hi all, I'm using Asp.net. Within a form I have declared declared a public variable. When the form is loaded I set the property for the variable. but it doesn't maintain its state on postback. I...
2
by: P. Gruenhagen | last post by:
I've written several UserControls that contain different versions of a form that users need to fill out. Depending on which role a user is logged in as, I load the appropriate UserControl and add...
0
by: Justin Crossley | last post by:
I have a webform that lists search results using an XML control The search results are contained in a string called strResults and are transformed using an xsl file into formatted results. The...
27
by: Raymond | last post by:
They say it's easier, but has anyone tried maintaining an ASP.NET site without the source code of the dlls? This was not a problem with classic ASP, all the code was almost always just in text...
1
by: clintonG | last post by:
I'm having a problem maintaining state with a Panel control in a MasterPage and I need help thinking through this process. The basic structure of the HTML in the Master looks like this... ...
0
by: mark.norgate | last post by:
Hi I'm having a problem in adding controls to a page programmatically in response to a button click. Composite user controls added programmatically in the CreateChildControls() method work...
3
by: Mahathi | last post by:
Hi I have a small problem in maintaining the state of a check box. Please do me a favour by telling me the procedure how to do that. My requirement is that "I have to map some roles with...
3
by: AdamOnAccess | last post by:
This is something I've always had trouble with, and it comes up fairly frequently... I have a continous form with a single text field and next to this text field, I have a caption that maintains...
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: 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
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
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...

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.