473,804 Members | 4,288 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to make a form modeless...???

I have a windows app whose main dialog contains a button
that launches a form. I've tried using Form.Show() to
have it launch as a modeless form, but it behaves as if
it's modal (i.e. parent form can't receive focus)...

Can someone tell me what I need to do to make the child
form modeless..??? I want to be able to alternate focus
between both dialogs...

thanks,

vince
Nov 15 '05 #1
8 9101
Rob,

thanks for the reply...

I created a test app as you suggested, and it did what it
was supposed to, allowing me to alternate focus from the
parent to the child form...

However, there's nothing unusual about the app in
question, the main form is a treeview/listview pair with
a "settings" button that launches the child form using
Form.Show()...

The child form contains various controls (textboxes,
buttons, a monthcalendar control, and a statusbar), and
the only custom constructor (if you can call it that)
accepts a string value that is used to initialize a
textbox in the form...

I'm still clueless about what could be preventing the
child form from being modeless...

thanks for any more suggestions,

vince

-----Original Message-----
You must have some other code in there causing this, because Show() createsa modeless window.
We'll need more information in order to help you. (PS: don't email me theinfo, type it here in the group so everyone can benefit from the discussion.I don't reply on this email account) Try create a new blank windows formapplication with Form1 and Form2.
Place a button on Form1 that creates a new instance of Form2 and calls theShow method, and you'll see that it's not modal.

-Rob [MVP]

"vince" <vl******@sdcer a.org> wrote in message
news:06******* *************** ******@phx.gbl. ..
I have a windows app whose main dialog contains a button that launches a form. I've tried using Form.Show() to
have it launch as a modeless form, but it behaves as if
it's modal (i.e. parent form can't receive focus)...

Can someone tell me what I need to do to make the child
form modeless..??? I want to be able to alternate focus
between both dialogs...

thanks,

vince

.

Nov 15 '05 #2
You must have some other code in there causing this, because Show() creates
a modeless window.
We'll need more information in order to help you. (PS: don't email me the
info, type it here in the group so everyone can benefit from the discussion.
I don't reply on this email account) Try create a new blank windows form
application with Form1 and Form2.
Place a button on Form1 that creates a new instance of Form2 and calls the
Show method, and you'll see that it's not modal.

-Rob [MVP]

"vince" <vl******@sdcer a.org> wrote in message
news:06******** *************** *****@phx.gbl.. .
I have a windows app whose main dialog contains a button
that launches a form. I've tried using Form.Show() to
have it launch as a modeless form, but it behaves as if
it's modal (i.e. parent form can't receive focus)...

Can someone tell me what I need to do to make the child
form modeless..??? I want to be able to alternate focus
between both dialogs...

thanks,

vince

Nov 15 '05 #3
Rob,

thanks for the reply...

I did create a test app with 2 simple forms and I got the child to
behave as a modeless form...

However, there's really nothing unusual about the app in question, main
form is a treeview/listview pair with a "settings" button that launches
the child form using the Form.Show() method...

Child form contains various controls (textboxes, buttons, a
monthcalendar control and a statusbar)... there are no special property
settings for it, and the only custom constructor (if you can call it
that) accepts a string that is used to initialize one of the
textboxes...

Once the child form is launched, the parent form can't receive focus
until the child form is closed...

Any other suggestions would be appreciated...

vince

Vince Lusardi
vl******@sdcera .org

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

thanks for the reply...

I created a test app as you suggested, and it did what it
was supposed to, allowing me to alternate focus from the
parent to the child form...

However, there's nothing unusual about the app in
question, the main form is a treeview/listview pair with
a "settings" button that launches the child form using
Form.Show()...

The child form contains various controls (textboxes,
buttons, a monthcalendar control, and a statusbar), and
the only custom constructor (if you can call it that)
accepts a string value that is used to initialize a
textbox in the form...

I'm still clueless about what could be preventing the
child form from being modeless...

thanks for any more suggestions,

vince

-----Original Message-----
You must have some other code in there causing this, because Show() createsa modeless window.
We'll need more information in order to help you. (PS: don't email me theinfo, type it here in the group so everyone can benefit from the discussion.I don't reply on this email account) Try create a new blank windows formapplication with Form1 and Form2.
Place a button on Form1 that creates a new instance of Form2 and calls theShow method, and you'll see that it's not modal.

-Rob [MVP]

"vince" <vl******@sdcer a.org> wrote in message
news:06******* *************** ******@phx.gbl. ..
I have a windows app whose main dialog contains a button that launches a form. I've tried using Form.Show() to
have it launch as a modeless form, but it behaves as if
it's modal (i.e. parent form can't receive focus)...

Can someone tell me what I need to do to make the child
form modeless..??? I want to be able to alternate focus
between both dialogs...

thanks,

vince

.

Nov 15 '05 #5
I believe you want ShowDialog() to make it modal.

--Bob

"vince" <vl******@sdcer a.org> wrote in message
news:06******** *************** *****@phx.gbl.. .
I have a windows app whose main dialog contains a button
that launches a form. I've tried using Form.Show() to
have it launch as a modeless form, but it behaves as if
it's modal (i.e. parent form can't receive focus)...

Can someone tell me what I need to do to make the child
form modeless..??? I want to be able to alternate focus
between both dialogs...

thanks,

vince

Nov 15 '05 #6
I believe you want ShowDialog() to make it modal.

--Bob

"vince" <vl******@sdcer a.org> wrote in message
news:06******** *************** *****@phx.gbl.. .
I have a windows app whose main dialog contains a button
that launches a form. I've tried using Form.Show() to
have it launch as a modeless form, but it behaves as if
it's modal (i.e. parent form can't receive focus)...

Can someone tell me what I need to do to make the child
form modeless..??? I want to be able to alternate focus
between both dialogs...

thanks,

vince

Nov 15 '05 #7
Bob,

I want to do the exact opposite of ShowDialog, make the
child MODELESS, so that I can alternate focus between the
child and the parent... I've tried Form.Show(), which
should work, but it doesn't and I'm trying to figure out
why... read thru the thread again for more details...

thanks for any help...

vince
-----Original Message-----
I believe you want ShowDialog() to make it modal.

--Bob

"vince" <vl******@sdcer a.org> wrote in message
news:06******* *************** ******@phx.gbl. ..
I have a windows app whose main dialog contains a button that launches a form. I've tried using Form.Show() to
have it launch as a modeless form, but it behaves as if
it's modal (i.e. parent form can't receive focus)...

Can someone tell me what I need to do to make the child
form modeless..??? I want to be able to alternate focus
between both dialogs...

thanks,

vince

.

Nov 15 '05 #8
Bob,

I want to do the exact opposite of ShowDialog, make the
child MODELESS, so that I can alternate focus between the
child and the parent... I've tried Form.Show(), which
should work, but it doesn't and I'm trying to figure out
why... read thru the thread again for more details...

thanks for any help...

vince
-----Original Message-----
I believe you want ShowDialog() to make it modal.

--Bob

"vince" <vl******@sdcer a.org> wrote in message
news:06******* *************** ******@phx.gbl. ..
I have a windows app whose main dialog contains a button that launches a form. I've tried using Form.Show() to
have it launch as a modeless form, but it behaves as if
it's modal (i.e. parent form can't receive focus)...

Can someone tell me what I need to do to make the child
form modeless..??? I want to be able to alternate focus
between both dialogs...

thanks,

vince

.

Nov 15 '05 #9

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

Similar topics

2
1620
by: vince | last post by:
I have a windows app whose main dialog contains a button that launches a form. I've tried using Form.Show() to have it launch as a modeless form, but it behaves as if it's modal (i.e. parent form can't receive focus)... Can someone tell me what I need to do to make the child form modeless..??? I want to be able to alternate focus between both dialogs... thanks,
6
3230
by: Gary Miller | last post by:
Does anyone know how to detect a modeless form on closing by the form that invoked the modeless form? form.Show();
1
2439
by: andrew | last post by:
Hi there, I'm having a problem with a modeless form in my app. I have a main form in my app and a socket that waits on data from a server (I use BeginReceive/EndReceive for that) and when I receive certain data from the server I want to create a new modeless form to show some of that data. But after receiving the data from the socket the modeless dialog does not appear (it seems to be receiving no windows message to update itself,...
1
2263
by: Jason Richmeier | last post by:
I am experiencing some unexpected behavior with the Form Load event in a Windows application. Hopefully, someone can explain why this behavior is occurring. In my application, I have a form that I would like to show multiple times throughout the life of the application. The startup code for this form can be quite lengthy so I am hiding and showning the form (versus unloading and loading it). If I show the form non-modally (using the...
1
4861
by: James | last post by:
CWinFormsDialog in .net 2.0 lets you host a .Net UserControl as a dialog in a managed C++ MDI application. I.e. in the sample: ----------------------------------------------- #include <afxwinforms.h> #using <WinFormUserControl1.dll> using namespace WinFormUserControl1;
2
3058
by: proit_123 | last post by:
I am working on a windows forms application and have the following requirement. · I need to display a modeless dialog from the main form. o This allows user to continue to work with the application. o For the sake of example, the user could launch the modeless dialog from Form A and navigate to a Form B in the main window. · When the modeless dialog is closed, I need to perform certain logic in the main form based on the form that is...
11
5303
by: Zytan | last post by:
I have created a new form from the main form. When I close the main form with the 'x' close button, its Form.FormClosed event is run, but not the dialog's. Is this normal? It is ok / dangerous? How can I force shutdown code within the dialog's Form.FormClosed event run? Zytan
0
997
by: sree1981 | last post by:
Hello sir, I am developing an application in vb.net. It involves the creation of a modeless form. We need to interact with the aplication window when the form is open. TopMost property sets to True gives the form on top of application. But the form is open and top on other applications also. How to set the modeless form to be open and on top of its application window only? please help Regards Sreeja
4
4565
by: =?Utf-8?B?Z2luYWNyZXNzZQ==?= | last post by:
I am trying to close/dispose multiple instances of a form but because they are modal and hidden, they do not show up in My.Application.OpenForms. They must be modal, so making them modeless is not an option. I also need to check the values in a spread control on the forms before I close/dispose them. I'm using VB 2005. Is there some way for me to do this?
0
9589
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,...
0
10593
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10329
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
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 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...
0
9163
agi2029
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...
1
7626
isladogs
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...
0
5527
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...
1
4304
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
2
3830
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.