I have a main form and then a secondary form that allows entry of some
settings. I want to show the secondary form modally (I guess using
..ShowDialog), but I'd like it shown against the background of the main
form. At present using frm2.showdialog eg from a main form menu click
causes the main form to disappear from the background, which is a
little disorientating for the user.
Is this the standard behaviour of ShowDialog or have I got a bug (like
a me.hide hidden away somewhere relating to the main form that I need
to hunt down) ?
JGD 6 1162
John,
Just set in your dialog form
\\\
frm.owner = me
///
And you should of course make than frm, something smaller otherwise it looks
strange.
The mainform should not disapear when the dialog form is smaller, when it
does, than show us some code you are using.
With the showdialog is as far as I know only a bug with the behaviour of the
standard form buttons and not in this case.
I hope this helps?
Cor
"John Dann" <ne**@prodata.c o.uk> I have a main form and then a secondary form that allows entry of some settings. I want to show the secondary form modally (I guess using .ShowDialog), but I'd like it shown against the background of the main form. At present using frm2.showdialog eg from a main form menu click causes the main form to disappear from the background, which is a little disorientating for the user.
Is this the standard behaviour of ShowDialog or have I got a bug (like a me.hide hidden away somewhere relating to the main form that I need to hunt down) ?
JGD
Your main form should not be disappearing w/o you having coded it to do so.
Greg
"John Dann" <ne**@prodata.c o.uk> wrote in message
news:rj******** *************** *********@4ax.c om... I have a main form and then a secondary form that allows entry of some settings. I want to show the secondary form modally (I guess using .ShowDialog), but I'd like it shown against the background of the main form. At present using frm2.showdialog eg from a main form menu click causes the main form to disappear from the background, which is a little disorientating for the user.
Is this the standard behaviour of ShowDialog or have I got a bug (like a me.hide hidden away somewhere relating to the main form that I need to hunt down) ?
JGD
On Sat, 1 Jan 2005 19:20:38 +0100, "Cor Ligthert"
<no************ @planet.nl> wrote: Just set in your dialog form \\\ frm.owner = me ///
OK thanks. Is there any reason not to say:
frm.showdialog( Me)
(Which I've just discovered with your prompting and which seems to
work equally well)
JGD
John,
There is in my opinion never a reason not to use something, that is the
poweer of dotnet, there is not a best way, there are maybe ways to avoid.
Just my thought,
Cor
"John Dann" <ne**@prodata.c o.uk> schrieb: I have a main form and then a secondary form that allows entry of some settings. I want to show the secondary form modally (I guess using .ShowDialog), but I'd like it shown against the background of the main form. At present using frm2.showdialog eg from a main form menu click causes the main form to disappear from the background, which is a little disorientating for the user.
Is this the standard behaviour of ShowDialog or have I got a bug (like a me.hide hidden away somewhere relating to the main form that I need to hunt down) ?
Normally, showing a form modally does not /hide/ the form it's shown on.
Can you post the code you are using to show the 2nd form?
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
On Sat, 1 Jan 2005 19:46:24 +0100, "Herfried K. Wagner [MVP]"
<hi************ ***@gmx.at> wrote: Normally, showing a form modally does not /hide/ the form it's shown on.
That's what I thought.
Can you post the code you are using to show the 2nd form?
Well I would but it's fairly straightforward and innocuous. But more
to the point, now that I've gone back and taken out the owner
reference as a test, the main form isn't disappearing any more! But
I'd swear it was happening every time before. So something's obviously
changed but it's probably not worth taking anyone's time in
speculating or investigating what it might have been. Just hope it
doesn't happen again!
Thanks everyone anyway.
JGD This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: R.G. Vervoort |
last post by:
Does anyone have a suggestion how I can order a list with names in a
secondary select string.
The first string selects a number of locations where people work
From this string I get several id's form people (in the location table there
|
by: hank |
last post by:
Hi All
In the Circular Logging when the Primary Log file fill up, the
database manager will creat a secondary log files for the transaction;
when this transaction finished, the secondary log files still
allocated in log directory; when all application disconnect from
database or database reactive or database restart the secondary log
files will be deleted from log directory. For each transaction log
request, database manager always...
|
by: BG |
last post by:
We're having trouble writing the code to update a UI control (label.Text)
from a secondary thread. We're using C# with Windows Forms.
We have a main form named MainForm, a splash screen form named SplashScreen,
and a C# class library named BackgroundProcess.
|
by: Wilfried Mestdagh |
last post by:
Hi,
I'm trying to move a secondary form to the main form's center. But this does
not work with the code I try. Can someone explain ?
Form1 is my seond form. And this is menu item click from main form:
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
Point loc = new Point();
|
by: kurotsuke |
last post by:
Hi,
I need to show a form from a secondary thread and I'm using the Invoke
method to call the delegate on my form.
I would like to display the form and issuing the command from the
secondary thread. My problem is that the Show seems to do nothing. I
put a breakpoint and it isn't even triggered. On the other hand if the
form is visible I can alter its properties via Invoke.
Any ideas on how to solve it? Is it possibile to display a...
| |
by: Dale Lundgren |
last post by:
I have a c# class library that launches a Win Form in a secondary thread.
From the Form (now running in the secondary thread) I need to be able to
start a method that is defined in the class and have it run in the main
thread.
I have read many examples and tried numerous approaches based on delegates
all of which will launch the method, but never in the main thread, always in
the secondary thread. Is what I'm trying to accomplish...
|
by: Zorpiedoman |
last post by:
In a multi-monitor environment, a form I am creating at run time keeps
placing itself on the primary screen, even if the main form of the program
making the call is on the secondary screen.
How do I place a form on the secondary screen (monitor)?
--
--Zorpie
|
by: mmeldrum |
last post by:
Hoping someone can help me out here. I have a form which performs calcualtions in it. The form was build using a table with the exact same fields. I placed the one expression in the actual field where the expression is kept. The expression is as follows in a field called Primary Total
=++++++++++++
The other expression is in a filed called Primary HC. That expression is
=/30+/50
Can anyone help please ?
|
by: Ed Bitzer |
last post by:
Appreciate some direction as to what most of you professionals do when
passing some limited variables to another form. A simple example
would be passing the location of a second form. I could use a
constructor which I think of as parameters attached to the creation of
my New form (parameters) or I could use "properties" as I have learned
to use with classes. Some advice please.
Ed
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |