Forms :: Disable Parent Window While Child Is Open?

Dec 6, 2009

how to disable parent window while child is open so the user cannot click any object in the parent window and to Force the user to interactive only with the child

View 2 Replies


ADVERTISEMENT

.net - Parent/Child Relationships Failing When Getting Data From Parent Class With Multiple Forms Open?

Jun 24, 2009

I have a main form, and some sub forms, and each sub form can have some sub forms. When I have multiple sub forms open, and I try to get data from the parent form, it returns the data from the wrong parent form.For example I have two instances of Mainform.subform running. If I do something like this in a child form of one instance of the subform. It returns data from the other subform.

dim l = Mainform.subform.listofdata

Edit:I am using visual Studio 2008. Winforms, form designed using designer. In my mainform I am doing this

Protected Friend frmMain as Mainform
frmmain = new mainform

In frmMain I am doing this

Protected Friend frmsub as new Subform'
frmsub = new subform

[code]....

View 1 Replies

Forms :: Enable/Disable MDI Parent Menu From Child Form?

Jan 5, 2012

I'm writing an MDI app in vb.net vs2010. The MDI form has the default MDIMenustrip menu with several menu items. Each has some subitems. None of the child forms have a menustrip defined. I thought it would be easy to call a public subroutine in the MDI that would disable or enable the MDIMenustrip items. If I execute the routine from the MDI form, the menu items disable/enable just fine. THe problem I have is when I call the routine from a child form. How can I control the MDI menu from a child form?

View 3 Replies

Wpf - Fire A Custom Event From A Child Window Back To Parent Window?

Feb 13, 2012

I am looking to close the application when I click a cancel button in a login page, but I don't want to do it in such a way that Window 2 closes itself, but by sending some notification to Main Window, and Main Window closes the application. Here's the code that I have so far:

(in loginPage)

Public Event CloseApp As EventHandler
Private Sub CancelButton_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles CancelButton.Click

[Code]....

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

Disable Mdi Parent Button From Mdi Child?

Aug 14, 2009

ok i have a button named (cmdmenu) and i want to disable it while closing a mdi child form.

View 9 Replies

Refer To A Parent Window From A Child?

Mar 4, 2010

I'm working on a sdi-like WPF application with VB as the code behind. Basically, I have a main window that has some tabs and a button that opens (shows) another child window. I need that child window to refer back to the parent main window and automatically bring it in focus and have a specific tab selected (via a button on that child). The child window is a separate class file with its own xaml and VB code in my project.In the child I tried using

My.Windows.MainWindow.myTabControl.ItemSelected = My.Windows.MainWindow.tabIWantSelected
My.Windows.MainWindow.Focus()

but this does not appear to work as the main window in the background doesn't appear to be referenced in this way. I can use My.[bla bla].Show() - but that creates a whole new instance of the main window on top of the old one. Activate() doesn't work either since the main window is already activated.It seems like a simple task but am I forced to use something like SetForegroundWindow()?

View 5 Replies

Don't Allow User To Switch To Parent Window From Child

Apr 29, 2011

Here's an example of what I mean: I have Microsoft Word open. I click 'Save As' to open the SaveFileDialog. When I try to click back into Word the SvaeFileDialog window flashes and it plays a beep noise. More importantly, it doesn't let the main program gain focus whilst it's open.

[Code]...

View 2 Replies

Creating A Parent-Child Window Form In VB 2010?

Aug 4, 2011

I am trying to create a simple parent-child form in VB2010. I use a datagridview for each table/datasource and each is bound to the paretn/child table and each table grid fills correctly. What I want is the parent-child relation to enforce filling the child table with only rows that fulfill the current row on the parent. I have created a DataRelation in the form load, but it will not permit a relation between tables in 2 different datasets. If I attempt to place both tables in a single dataset and define the PK-FK relation in the SQL Serve,r I cannot create 2 separate datagrids from the same dataset.

View 12 Replies

Disable The Focus To Parent Window(Form) While The Msgbox Is Opened?

Dec 13, 2008

I am having form called Test1 which contains button( Button1). When I press the button the message box is getting displaying,but at the same time I am accessing the Form Test1. It should not be the case, because before closing the message box the control should not allow to focus the Test1. But in my case the control is allowing to focus the Test1(form) before closing the message box.

Sample code.

If myReader.Read() Then
MsgBox("Matched record exist.", MsgBoxStyle.Information, "Data Tool")
Else

[Code].....

View 4 Replies

Child Window Open Inside Of The Main Window Form?

Oct 12, 2010

I have create a project with one main form window and also i have to use a number of other forms as well. now i want to open these other forms inside the main window and not outside. I'm using Visual Studio .NET 2010 as developing environment.

View 1 Replies

Show Child Windows Form In The Status Bar Of The Parent Window?

Oct 13, 2010

In my project i have one parent window form with one menu bar and one status bar. that is what i want is:when i show the child form to see in the status ber an icon relative to the child window.How i can do that?And if that can't be how i can see an icon in a task bar?

View 1 Replies

Set IsMidContainer In Forms For Parent-child Relationship Forms?

Jul 1, 2009

I know I can set IsMidContainer in forms for parent-child relationship forms. I just want to know if the parent form could be a panel. If so, how can i do it?

View 1 Replies

Run A Sub Procedure Or Possibly A Method When Closing A Child Window And Returning To Parent

Mar 19, 2012

I am making an address book for my final project in school, and have a few questions. In my address book, there is a feature to add groups so you can sort your contacts. The problem is, the add group feature is in a different form, I tried calling a procedure from the parent form to refresh all data but it does not work.[code]

View 2 Replies

MDI Parent And MDI Child Forms?

Feb 11, 2010

I'm just getting started in VBE 2008 porting a VB6 program and have created the MDI Parent form. I've added a form called frmNav and need to designate this and all subsequent forms as MDI child forms. Is there somewhere in each form's properties where I designate this? It used to be in VB6 there was a property called "MDIChild = True." input id="gwProxy" type="hidden"><!-- Session data--></input> <input id="jsProxy" onclick="jsCall();" type="hidden" />

View 1 Replies

Forms :: Resize And Already Open Window To Automatically Accomodate A New Open Window?

Feb 24, 2009

if you guys have used office 2003 or better( i am sure all) then you would have seen that when the help window open it causes the active windows say of MS WORD to change accordingly so that this help windows fits with it along the right side and this functionality i want to implement in my VB windows application and have no idea how to do it Also i have seen this feature in GOOGLE DESKTOP GADGETS...

i want to implement that when my application opens which ever is the active window( of any application) snaps to the left and allows my application to fir in the right hand side i am developing my application in VS 2005 using Visual Basic.

View 1 Replies

.net - Child Forms Not Getting Minimized Along With The Parent Forms?

Apr 8, 2011

I have made a project on Library management system using Microsoft Visual Studio 2008 and Sql server 2005 .I have used MDiParent form in this project, from where I can click on the menu item to open the desired form.

I am now able to open the child forms in the main window background.Now what happens is When I click on one menu Item it open in the parent form background.I am able to open all child forms corresponding to the click event in the MenuToolStrip ...all in the Parent form Now the problem is that I cannot minimize child forms when I minimize Parent form..I want child forms also to minimize along with the Parent form.. Also are child forms still not attached to the parent Form is also my question here.....

View 2 Replies

Close Parent And Child Forms?

Oct 5, 2009

I have been looking around at how I can close my parent form and my child form. This article: [URL] has some information but it either doesn't work for me or I am putting the wrong information it. What I want to happen is when a button is pressed I want to close both parent and child forms and then go to another form (frmResults). Then there will be a button on frmResults that will take me to the beginning form (frmPTCalculator). With this code below when I click the button on frmCalculator it goes to the MDI form and both parent and child forms are there.

my Parent form is called: frmGender
my Child form is call: frmMale & frmFemale

Below is what I have tried from the example in my Child form frmMale:

Private Sub btnResults_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnResults.Click
Dim frm2 As frmMale = New frmMale()
AddHandler frm2.FormClosed, AddressOf frm2_FormClosed

[code]....

View 3 Replies

Communication Between Child And Parent Forms

Oct 25, 2010

VB.NET 2003 makes it difficult to have a child button create an event on a Parent form control. I would like to change the state of a control on the parent form by using a button on the child form.

View 6 Replies

Forms :: Values From Mdi Parent To Mdi Child?

Dec 15, 2009

Is there any chance to pass values from mdi parent to mdi child.

View 1 Replies

Jncilhinney Or Anyone Parent And Child Forms?

Nov 30, 2011

In all my post I have explained I am a total novice so a little more elementary explanation is normally required in my case. I have tried reading the explanations about Parent and child binding but just cant get it to work.This is what I have:

A parent form called Sites Primary key is pkSitesID Various other fields On that form I have placed a tab control and in page one I dragged SitesInstallation to it there is a relation created in the DBDiagram to link fkSitesID (in the sitesinstallation table) and pkSitesID

All I want to do is when I navigate through the Sites records the data in the tab page changes according the values I have selected for that given site.

For example: The Siteinstallation maybe Pending or on air.

View 6 Replies

Working With MDI Parent/child Forms?

Feb 28, 2011

I am using a parent for with child forms and i have made the option to "Float" the child windows outside of the parent form and "dock" them back in if you want.I'm doing this with a button on the child form to float/dock it. On the other hand I'd like to use a checkable item on the menu to choose if they are docked or floated from the opening point.

View 6 Replies

Forms :: Merging Statusstrip Child To Mdi Parent?

Mar 29, 2009

ive been trying to get statusstrips merging so i can click a label to bring the child form to the front when i have multiple childforms open. I have this code which does work but on closing it leaves the label on the mdiparent and also im struggling with the bring back to front code. i dont want it to open another form just bring it back to front. I have statusstrip set to visible false on my childform. heres some code for merging, this is in mdi parent:-

Private Sub Form1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Form1ToolStripMenuItem.Click
Dim NewMDIChild As New Form1
NewMDIChild.MdiParent = Me

[code].....

and some for bring back to front, this is in form1:-

Private Sub ToolStripStatusLabel1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripStatusLabel1.Click
Dim MDIChild As New Form1

[code]....

View 2 Replies

Forms :: Same Menu Shortcuts In MDI Parent And Child

Apr 30, 2009

I want to use the same menu shortcut keys in a MDI child as in the parent...the problem is that the parent seems to receive the Event first and is calling his menu entry. The child (though it does have the focus) does never receive any event whatsoever...I can bypass this behaviour by adding a Textbox to the Menu, and the moment that one has the focus the menu shortcuts are working as expected (child gets it first, after that it's passed through to the parent).

View 1 Replies

Forms :: Set Property Of Parent Class From Child

May 14, 2009

I would like to have a form class that is called from a button on a parent form and would like a button on the child form to set a property on the parent form. Can anyone explain the best way to go about this or direct me to a good article?

[Code]...

View 3 Replies

Manipulating Controls On Parent Forms From Child

Mar 6, 2012

I'm trying to add a new row to a DataGridView from FORM 2 but I can not succeed, the code I tried is as follows:

[Code]...

Looking like it took time but can not find a solution,

View 1 Replies

VS 2010 Nested MDI Parent/Child Forms?

Mar 3, 2012

I have a MDI project that has a parent and several children forms. In some of the children forms I would like to make one of the forms to be a parent form with children. On this child form I wanted to make a tabbed MDI, which I can do, but I have found out that I can't make a child form a parent, from what I have found.

Is there any way to get around this? (As in nested MDI forms.)

View 1 Replies

Visual Basic (Coding) - Child Form To Open Within A Panel On Its Parent?

Mar 2, 2012

I have created a (kind of) 'Desktop' Form for the main basis of my program. Basically it is made up of 3 panel controls.

1. Holds all buttons which load the different forms (Like the windows start menu when expanded). name: StartMenuPanel

2. Holds Information on log in deatails. name: LogCheckPanel (very thin panel at top of screen)

3. Main panel which takes up the majority of the screen (where I want the forms to load). name: MainPanel

My aim is: When a button is clicked from the 'StartMenuPanel' the form will load with-in the 'MainPanel'.

I tried changing the start position to 'centre parent', but the panels are in the way so some of the childform is overlayed by the panels.

[Code]...

When I run this I get the following error: 'Top-level control cannot be added to a control'.

I hope I've explained this well enough.

View 7 Replies

Asp.net - Enable/disable Web Elements Of A Parent Aspx Page From The Child Ascx Page?

Jul 20, 2009

I have an aspx page with three web controls: one to control the List Users page, one to control the Edit Users page, and one to control the Add User page. I have discovered a method for accessing these elements, but it seems to be limited. Here is what I have done:

Protected Sub editUser(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs)
'set selected user from gridview.

[Code].....

This works in most cases. However, I am unable to access the "enabled" attribute of these web controls. Why is this, and how might I access that attribute?

View 2 Replies

Winforms - Disable The Parent Form When Call A Child Form?

May 14, 2010

How can I disable the parent form when I call a child form?This code doesn't disable the parent form like I thought it would:

frmChild.ShowDialog()

View 2 Replies







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