Minimizing A Modal Form Minimizes Parent Or Main Application?

Jun 2, 2009

Is it possible to have an application where form1 opens a second modal form (form2) and then allows the user to minimized form2 causing the entire application to minimize to the taskbar.(form2 is never shown in the taskbar) A simple example of this is winzip where a second modal progress window is opened which can be minimized?

View 10 Replies


ADVERTISEMENT

Use Main Form Like MDI Parent Form In Window Application?

Sep 10, 2010

how can I use main form like MDI parent form in window application?

View 1 Replies

Calling Showdialog() On A Form - From The Main Form's OnLoad Event Makes The Modal Dialog Go Away After A Few Seconds?

Aug 7, 2009

I'm having an interesting issue that I can't reproduce on a different project, but can consistently on this one. I have no clue what might be causing it, but am hoping that someone may have seen it before.

I have a main form, from which I run a series of checks. On this form, I have a listview control. Because of some issues with the refreshing of this listview control, I had to create my own messagebox. It's just a form that displays some text ( it also happens to look nicer than MsgBox; in my opinion, anyways ). It's been working great for months, until recently.

My problem is that on my main form's load event, I run this check, which returns an error within a try/catch block. I then call my custom messagebox with a message. It in turns calls it's ShowDialog() function.

In any other situation ( after the main form has been loaded ), I have no problems. The messagebox goes on the screen and behaves appropriately ( ie: waits for my input and acts as a modal dialog ( stops execution of my main form's thread ) ). However, on this onload event, my messagebox comes up and goes away almost immediately afterwards.

I've traced it all the way to the showdialog() call. For no explicable reason, it appears to skip right over this call, without me doing anything on the form.

Here's what the inner trace looks like ( when I put a breakpoint on the onclosing event for this messagebox form ):

CODE:

View 10 Replies

Find When Dialog / Modal Form Is Shown For My Main Form?

Feb 3, 2010

I want to be able to check if there is currently a dialog or modal form shown for my form so that I can close it.
Is there a way to do this?

View 1 Replies

.net - Main Form Minimized When Modal Dialog Calls Me.Hide()?

Mar 22, 2011

sometimes (not everytimes), when I call the Me.Hide() in a form, which I called with .ShowDialog(), the main form, which called this dialog minimized.

View 2 Replies

Passing Values From Modal Form To Parent Form?

Aug 11, 2011

I am trying to pass information to parent form from modal form in vb.net winforms application.

1.) I created a copy of a form and displayed it using following code.

dim f=new frmParent()
f.show()

2.) Depending on conditions a button on frmParent opens a modal child form and asks for some informations. I used following code for that:

dim f = new ChildForm()
f.showDialog()

Both code works fine. When user press saves in child form i need to close childForm and use the user types values in parent form. I know how to close the childform but not sure how to pass info from childform to parent form.

View 1 Replies

Asp.net - Setting Control Text In Parent Form From Modal Popup

Mar 28, 2012

I have a problem I am trying to set the parent textbox from the modal popup.

Although I found the control from the modal popup with the below code
DirectCast(Parent.Page.Form.FindControl("ContentPlaceHolder1").FindControl("myAccordion").FindControl("txtTo"), TextBox).Text = str

This is being called on button click when the user has finished selecting from the Checkboxlist.

When the parent page is shown again though the textbox is empty.

The scenario of my user control is that a user is to select from a checkbox list which is a list of emails.

When done has been clicked then it is required that the selected emails be forwarded to the parent webpage.

Then the To Textbox in this case will be filled with the emails that the user has selected.

View 1 Replies

MDI Parent Occasionally Not Minimizing?

Apr 6, 2011

I have a MDI parent that opens another form like this:

Dim frm As New Form1
frm.ShowDialog(Me)

That form has a button that, when clicked, does this:

CreateObject("Shell.Application").ToggleDesktop()

The button operates as expected (showing the desktop) most of the time but occasionally does not minimize the MDI parent. All the other windows, including the form above get minimized every time.

View 1 Replies

VS 2010 Sub/Child Form Close When Click On Main/Parent Form?

Jun 5, 2012

i am having some trouble in my Windows form application. i have 2 forms1st Main / Parent Form2nd Sub / Child Form (Menu)

View 7 Replies

Open A MDI Child Form Using A MenuList On The Main MDI Parent Form?

Feb 6, 2011

I have a MDI Parent form created with a MenuList, I also have the MDI child form created.ow do I go about using the MenuList to open the MDI child form within the parent form?

View 1 Replies

VS 2008 : Modal Form Hide Instead Of Close - Main Form Does Not Close

Mar 20, 2009

I have a main form that has a button with which a smaller form is shown. Think of the smaller form as the Find/Replace dialog in many applications, such as Notepad. It's important that the form is (what I believe is called) modal. What I mean is that it always stays on top of the main form. I ensure that by calling the Show method with "Me" as the owner argument. Whenever the small form loses focus it will not disappear into the background but stay visible (albeit out of focus). If you don't understand open up Notepad and have a look at the behavior of the Find/Replace dialog.

Here's my problem: instead of actually closing the form when the X is pressed, I want it to simply Hide itself, so its position and the state of any controls (checkboxes etc) is preserved automatically.To achieve this I simply cancel the FormClosing event and Hide it:

vb.net
Private Sub Form2_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing

[code]....

To show the form, I use the following (note the (Me) to make the main form the owner of the form; this ensures that it remains visible even when it is out of focus):

vb.net
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form2.Show(Me)
End Sub

Now. When I run my project, and open the Form2 (small form), then hide it again (by 'closing' it), I can no longer close the main form (Form1)! It seems the main form cannot close when the small form still exists (albeit invisible)...?? When I don't use the Me argument in the Show method, I don't get the behavior I want. I know I can set the TopMost property to True but that will also cause it to become visible on top of all the other forms, even windows not part of my application.

View 8 Replies

Prevent Minimize Of Child Window When Parent Window Minimizes?

Dec 19, 2011

If I show a new non-modal child window using .Show(frmParent), and then the parent window is minimized, the child will get minimized automatically as well.

View 2 Replies

Close A Modal Form From Who Initiated Modal One?

Feb 25, 2011

I have a parent form (form1), which is calling a second form (form2) as modal.[code]...

No form2 is modal. Closing this form2 from the form itself is clear.But how can I close the form via myform2.close from form1 via an event handler?

View 6 Replies

Asp.net - Hiding A Parent Modal Popup In ASP / Ajax

Jun 21, 2011

I have a modal popup extender on a parent form (called from a child aspx is in an iFrame). I'm able to show it by calling

parent.ShowModal();

Which is a javascript function on the parent page that executes $find('ModalPopupExtender1').show();

It works great. But now I've discovered a new problem.

After the VB code-behind is finished executing on the child page, I'd really like to hide that modal form. Don't get me wrong, I have nothing against modal popups. I rather like them in fact. It's just that my users would like it better if they could continue working after the VB code-behind (child page) is finished executing. I tried

ParentForm.ModalPopupExtender1.Hide()
Top.ModalPopupExtender1.Hide

View 1 Replies

Server Trace Minimizes The Other Form Expands?

Dec 28, 2011

A form within a form? So it can minimize maximize in there own container.

Also if the server trace minimizes the other form expands.

View 3 Replies

VS 2008 Form Minimizes Instead Of Opening On Button Click

Apr 3, 2009

I have this code which when I run the program and click on the btnReturn the form actually minimises to the taskbar. What I have noticed is that yellow and green lines have appeared next to the btnReset section and all the way to the end of the code and that the last line (private sub fmmxxxxload) had disappeared, which I replaced. Now when I run the program it still minimises rather than appears on screen. If I click on it in the taskbar, the correct form is displayed.

[Code]...

View 7 Replies

Asp.net - Refresh DataGrid And DropDown On Main Page After Hiding Modal Popup?

Dec 7, 2009

I am adding records to a database from a modal popup. After hiding the modal popup, the page has not been refreshed (even though I have Re-bound the controls). I have reviewed a few postings on the web about this but the solution still evades me. I have attached my code after removing some of the extra detail.

It seems I need to cause a postback, but I don't know what needs to be changed. Some posts have talked about the extender being misplaced.<asp:Content ID="Content1" ContentPlaceHolderID="Head" Runat="Server">

<div class="divBorder">
<asp:DataGrid id="dgrSessionFolders" runat="server" BorderWidth="2px"
BorderStyle="Solid" BorderColor="#C0C0FF"

[Code]...

View 2 Replies

Showing A Modal Dialog Box Or Form When The Application Is Not Running In UserInteractive Mode Is Not A Valid Operation?

Sep 5, 2008

I am writing a web application using .net 3.5 and vs 2008 which allows people to add data to a db via a control panel front end.Objective: Before committing one of the fields to the db i would like the user to answer Yes, No or Cancel to confirm their action. I have tried to implement this with a modal dialog box or message box but the following error appears: Server Error in '/' Application.

View 10 Replies

Modal Window - Cannot Refresh Parent (Retry / Cancel Popup)

Jan 15, 2009

I am using modal window for my VB.NET program and I am trying to open this child modal window from another window, after I close the child modal window I am trying to refresh the parent but I am getting retry/cancel popup, I tried a lot of things to avoid but I can't get rid of this popup.

View 1 Replies

Forms :: VB - MDI - Application That Consists Of Mainly One Main Form - Ranging Form Graphs, Tables, Dropdown Boxes, Print Preview

Apr 7, 2010

I have to write an application that consists of mainly one main form, but several different things I wanna display. Pretty standard I guess. So there is a menu, some controls, and the main stuff below (ranging form graphs, tables, dropdown boxes, print preview, etc). I would like to use it like one would use frames in html, design an object that is limited to a box or panel that I define. The literature I have does not give me a clear idea of how to do this (yet). The most obvious seem to be the use of MDI, open a predefined form with no borders, maximize it before showing and remove all minimize/maximize options. But that does not work so well. The form inside the MDI parent does not fit the size that is given for it when it is loaded. e.g.

[CODE]:......................

So my main question is: Is MDI the way to go here at all or are there better/easyer ways to achieve this? If MDI is the way to go, how do I sucessfully restrict a child form inside another object, without giving the user any opportunity to resize (i noticed that I have minnimize/maximize/close buttons, even if I disable them on the child forms themselves)

View 6 Replies

[vb2008] Minimizing External Application?

Dec 27, 2010

like seen on the web, with both the two following codes:

ShowWindow(Hwnd, SW_MINIMIZE)
ShowWindow(Hwnd, SW_SHOWMINIMIZED)

I can minimize without problems an EXTERNAL application window from it Hwnd.The big problem is that once minimized the application cannot be manually managed: also if I close my program, both left click or right click on the external application taskbar button don't work: I can't maximize it and I can close it only by Ctrl+Alt+Del... why?

View 3 Replies

Application Start And Main Form?

Oct 2, 2009

I am developing a commercial application that needs to do some environment checking upon start up. I need to check things like the following. 1. Is there a registry entry on this machine that has various keys for paths to SQL Server 2. If it does not I need to create them. 3. Prompt user for the path to the SQL Server 4.Check the SQL Server to see if the database I need exists. 5. Create the DB if not. 6. Populate the DB with the tables I need 7. Create stored procs in the DB 8. Write the registry. I could do all this in the form load of the main form. However is there a better way? Like doing all these checks as part of a splash screen for example.

View 2 Replies

Application That Contains A MDI Form As Main Screen

Feb 25, 2009

I have an application that contains a MDI Form as the main screen. In the text field of the form, I am trying to display the version of the application using the following syntax:[code]Using the above code, it always looks like 1.0.0.0 when in reality I'm on version 1.0.0.6. What am I doing wrong?

View 11 Replies

Minimizing A Form?

Oct 21, 2010

I have a Form inside an application. I need to be able to minimize it from within the code of the Form itself. Any ideas on how to do it? Could not find a minimize function.

View 2 Replies

Reload The Main Form Without Closing An Application?

Jun 12, 2009

I need to reload the form of my application. The application has only one form vb.net 2005. I need a button that will call the page_load event so I can restart and reload all my settings. basically I need to call the Sub private Page_load event().I just need to force the reloading of the form without having to close it and reopen it.This is the code which I need to reload:

Public Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For Each URLname As String In My.Settings.URLtoTrackCollection
URLtoTrack.Add(URLname)

[code]....

View 8 Replies

VS 2010 Automatic Resizing The Application When Maximizing Or Minimizing?

Sep 10, 2011

While the application is running, I want the buttons, text boxes, datagrid, everything thats on the form to resize when the screen is maximized and again resize when its minimized.

View 2 Replies

Preventing Form Minimizing?

Sep 24, 2009

I have two froms when one from is opend it should not be minimized when mouse clicked outside the from like the message box in vb.net

View 1 Replies

Close Only The Main Form In 2010 Without Terminating The Application?

May 7, 2011

I have a login form which I need to close without the entire application being terminated. I tried using Me.Close() , Me.Hide() as well. The login form is used as the main form as well.

View 2 Replies

Display Application Name In The Text Property Of Main Form?

Feb 25, 2012

I am wanting to display my Application name in the text property of my main form. This is the code I a using:
Me.text = My.Application.Info.Title & " " & My.Application.Info.Version.ToString I am wanting to change the name of my project from when I first created it and for this new name to be displayed via the above code.

I have changed the name under the properties setting, yet it is not updating.

View 2 Replies

Pass Constructor Arguments To Application Main Form?

Oct 23, 2010

I've constructed a custom System.Windows.Forms.Form that requires arguments to New. I want to use one of these as the MainForm in a Windows Forms Application. How do I get the Application Framework to pass those arguments as needed?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved