VS 2005 Child Form Remain Enabled While Modal Form Displayed?

Oct 28, 2010

I have a VB. Net App where I want the user to open a modeless form which contains reference information about items in a select box. If the user double clicks the item selected in the list box a modal form is opened to edit the item.I want the previously opened reference form to remain active/enabled, that is, I want the user to be able to click on it, move it, etc.I was able to get the form to at least show up on the task bar by setting it's "ShowInTaskBar" property to true, however, when it comes to the front the user can still not move it to the side to view all of the Edit Forms information.

View 7 Replies


ADVERTISEMENT

Mdi Form And Show Form - Error "Form That Is Already Visible Cannot Be Displayed As A Modal Dialog Box"

Jan 26, 2010

I'm new in .Net and I have an application with windows form "LOGIN" When users enter the user and password and click "ok", then if user passes validation then I have the code Show(MDIMainMenu) (I'm trying to open an mdi form), but I receive the following error: "Form that is already visible cannot be displayed as a modal dialog box. Set the form's visible property to false before calling Show. Error Number 5"

[Code]...

View 2 Replies

VS 2010 How To Keep A Modal Form Displayed Under A Messagebox

Jun 5, 2010

I have a parent form, which can lanch a dialog box. A wrong selection in the box launches a message box with an error message. When the message box pops up, the dialog box disappears, so the messagebox is sitting on top of the parent form.Once the user clicks "OK" in the messagebox, the box disappears, and only the parent form remains.How do I make it so that the dialog box remains when the messagebox is displayed? And also, I want the dialog box to remain when the user closes the message box. The user should have the option to make the right selection in the dialogbox once the messagebox disappears.I tried to hunt for a property for the dialog box to achieve this, but couldn't find any.

Here is the code in the parent form to lauch the dialog box, and to also launch the messagebox, when the user has made a selection in the dialogbox:[code]Am I having this problem because all the code to launch the dialog and message boxes reside in the parent form? If I put the code to launch the messagebox in the dialog box, would that make the dialog box persistent when the messagebox is launched? I am putting all the code in the parent form because it can process the DialogResult.

View 4 Replies

Mdi Application - Open The Form But Focus Remain On Tree View Until Click On The The Form

Jun 11, 2009

I have mdi application, on main form which is mdi container and has a tree view. i open the child form on afterselect even of treeview. the issue i'm facing that i open the form but focus remain on tree view until i click on the the form. my question is how i can give focus to form rather it stays on treeview. i tried frm.focus also activatemdichild(frm) no sucess.

View 21 Replies

VS 2005 Pass A Value From An Independent Form To A Child Form?

Nov 24, 2009

how to pass a value from an Independent form to a Child form...

here whis is the data from..

the indenpendent data is selected from the datagridview by just double clicking the cell the selected data will pass into the combox of child form (Note: this is combobox not textbox)...

i'm done with textbox it work fine..

look:

Independent form when user duble click the datagridview

Private BoxToUpdate As TextBox
Public Sub Start(ByRef DescItem As TextBox)
' Me.Close()

[Code]....

how could i able the value into combobox from independent form into child form...

View 1 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

Unable To Place A Label Box In The MDI Parent Form And Then Open A Child Form The Label Box Highlighted In Child Form?

Dec 15, 2011

I have an issue when I place a label box in the MDI Parent form and then open a child form the label box highlighted in child form?

View 6 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

Drawn Lines Do Not Remain On Form

Apr 15, 2010

I am drawing lines on a picturebox - not in the paint event. I realise that if I resize the PictureBox the lines won't be redrawn - but the PictureBox is fixed. If I display a MessageBox at the end of my draws the lines do not remain on the screen. This was OK with VB 6.0. Hoe can I stop them being erased?

View 2 Replies

Keep Form On Top Of Another Form In Modal Fashion, But Continue Execution?

Apr 18, 2012

I have a form in a vb.net windows form application called PolicyRefreshStatus.vb that has a ProgressBar control on it. From the main form called EditPolicy.vb I need to show PolicyRefreshStatus.vb over top of EditPolicy.vb - but the way things are wired I'm controlling the the ProgressBar and it's steps from logic inside EditPolicy.vbIf I display the PolicyRefreshStatus.vb bar using the .show() method things work fine.The problem is if the user clicks back on the main form then PolicyRefreshStatus.vb losses focus. If I show PolicyRefreshStatus.vb as a modal form using .ShowDialog() then execution halts in EditPolicy.vb after the .ShowDialog() statement.

so for example in the code:
mPolicyRefreshStatus = New PolicyRefreshStatus
mPolicyRefreshStatus.pbMax = mPolicy.ClaimsUpdateMax

[code]....

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

VS 2005 Disposing A MDI Child Form?

May 27, 2010

Quote:

Dim MyForm As Form
MyForm = New Form1()
With MyForm

[Code].....

i use these code to dispose a MDI Child form, but it automatically close the form.. What should I do?

View 2 Replies

VS 2005 Getting Index Of A MDI Child Form

Aug 27, 2011

I am writing a MDI program and I need to know how I can get the index of a MDI Child Form. Is there any possible way to do this in VB.NET 2005?[code] The form that this code is coming from is not the MDI Container.

View 3 Replies

VS 2005 - Setting The MDIParent Of Child Form?

Nov 20, 2010

i have a program with MDI parent and child. initially, the program will call a child e.g. ChildMain. on this child form, 2 processes are run. the 2nd is ran on a backgroundworker. the backgroundworkder in created through code. the process in the background worker is to create another childform but i'm having problem setting the MDIParent of this child form since VS is saying some sort of cross-thread issue.

[code]...

View 2 Replies

Have A Modal Form But Be Able To Access Another Already Open Form

Jul 20, 2010

I have designed my app for multiple gridviews. When a user double clicks a row it opens up the data in a modal form and when they commit changes the row gets updated.While they have that modal window open they can not go back to the grid.But I have a alerts/messages window always running (like outlook tasks). As soon as I open the modal window I can not access that tasks window. (Default behaviour)How can I open the modal form and still let the user access/view the tasks window while they work on the modal window.(I tried creating it in a differant thread, but got a lot of cross thread errors so decided to abandon that approach.I thought that 2 modal form can run at the same time as long as they have differant parents. But aparently the main GUI thread pauses as soon as you open a modal window on it.

View 10 Replies

File To Open As Mdi Child Form / Save From Child Form

Nov 17, 2011

I have a MenuStrip with File > New, Open, Save, Exit located in a parent form, and a RichTextBox located in a child form.The problem I'm running into is concerned with the destination of the file elected from "Open" and the save.When a user selects their file from "Open", I need it to open the child form and put the text into the RichTextBox.I also need the program to be able to "Save" from a child form, whether it's been brought up via "New" or "Open".

View 3 Replies

VS 2005 : Disable Restore Button In MDI Child Form?

Aug 20, 2009

Is there anyway to disable/remove "Restore" button in MDI Child form while child form is in Maximized state?I have set "ControlBox = False". Although this remove the whole control box including "Close".Case is I want this "Close" button but not "Minimize" or "Maximize/Restore" button.Is there anyway to do this without using API?

View 4 Replies

Form In A Form - Manipulate The App's Properties Place Inside Child Form?

Dec 23, 2008

The following code does create a form within a form and does place NotePad inside the child form. You have to manually start NotePad prior to execution (I work on that later) but the code does workŠ My problem is now I want to manipulate the properties of notepad i.e. focus, size, location, etc. but I cannot figure out how to reference notepad and its properties.

[Code]...

View 8 Replies

Mdi Child Form Order - Move The New Form Behind The Main Form While It Loads

Aug 5, 2010

i have my main child form open. then i show the new form:

[Code]...

but when the form opens it flickers a lot. so i want move the new form behind the main form while it loads so the user does not see the flicker. once it is done loading i will set the form to topmost. how do i move the new form behind the main form?

View 12 Replies

VS 2008 Form - 'Exit' Button - When User Clicks It, Another Form Is Displayed

Jun 2, 2012

On each of my form I have put an 'Exit' button. When user clicks it, another form is displayed (I don't want to use 'MessageBox') asking user whether he really wants to quit. If user clicks yes the form closes. If user clicks no, form is redisplayed.

However, out of 4 forms only one form refuses to redisplay. The code is exactly same on all forms. I have included 2 Express 2008 projects showing one form each in the zip file apps-ssk.zip

View 15 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

Progress Bar In Status Bar To Move When Load Any Child Form Inside The MDIParent Form

Sep 16, 2009

i am asking about using the progress bar into the status bar to move when i load any child form inside the MDIParent form.

View 1 Replies

2003 Control On Child Form To Create Event On Parent Form?

Oct 28, 2010

Here is the pertinent part of my code:

Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

[code].....

View 3 Replies

Interface And Graphics :: Adding A A Form As A Child Form To A Third Part Window

Mar 24, 2011

As Autodesk is going to discontinue VBA for their Inventor product in the near future I have been looking at other ways to run VB.NET in Inventor. To date it doesn't look like VSTA will be the replacement. Automation from an External VB.NET app is certainly possible, but leaves something to be desired for speed and integration. Compiled Add Ins are the Cadillac of choice but can be a royal pain to debug and develop. Autodesk now provides a lightweight VB.NET script interface called iLogic. It's main purpose is to allow extreme customization of Solid Modeling parts. The code actually resides inside the Part Model file.

[Code]...

View 7 Replies

MDI Form Size - Child Form Doesn't Appears In Maximized State

Mar 15, 2012

I am developing a application where I have 1 parent from (windowstate of Parent from is set to Maximized) and 2 child forms. In my Parent form I have a menustrip with following code to activate child -

[Code]...

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

Write Text From A Parent Form To The Active Mdi Child Form VB 2010

Jan 28, 2012

It has to be a simple line of code but I do not know how to construct it. Using VB 2010 Express, I have a MDI parent form and many child forms. I want the parent form to determine what child form is active and load data into the RichTextBox1 on the child form. Each Child form has a RichTextBox1. The parent form gets its data by loading a file.

I am close to a solution but just can't get there. You will see in the code below, if I make a direct reference to a specific child form, it works great. What I want to do is to use the Active Form function to determine which form to write to. I have looked at the MS tutorial which gets me close.

Private
Sub OpenToolStripMenuItem_Click(ByVal sender
As System.Object,

[Code].....

View 6 Replies

Pass A Value Into A Modal Form?

Jan 29, 2012

I'm trying to pass a value from the main form, "form1" into "form2". I'm opening "form2" as a modal dialog from this line of code:

form2.ShowDialog()

View 4 Replies

Progressbar In Another Modal Form

Jun 10, 2011

I have a form where I generate a report on some button click. I need to show another Form in Modal Form, And Place Progress bar on that and Increment the status, from calling form so that when progress bar is running user cannot close the form (where I placed button for showing report). To calculate progressbar's percentage is in the form where button to show report is.

View 4 Replies







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