I have a MDI based application with two problems. First: when i close the MDI child i want to ask if the user would like to save the data in the child and give them the regular choice yes,no,cancel however when i try to use the Formclosing event it never fires, it does fire for the mdi parent but that is no help.
Second: When i load the child i am using a template form to get all the controls and code, but if i close all the children then reopen one it errors because the controls are disposed.
Im working with MDI parent/child objects. when closing the child objects i need the child to check to see if it is the last child object before closing. i couldn't find anything on google, maybe im searching for the wrong thing.
I have an MDI application where a child form (A) opens a second form as a Dialog (B), which works great but you can't do anything in the MDI until you close the Dialog form.I've now changed the Dialog form (B) so it just calls as a Show and I have disabled the parent form (A). This works better and allows you to click anywhere in the MDI (except the parent form (A)) which is ideal and works much better.
The problem comes if you maximize the parent form (A) and then open form (B), this is then also maximised but I need it to be a fixed.I've done some research and I've tried using the API SetParent which gets round the problem of the form being maximized but this makes the form TopMost in the MDI.
All I need is form B to be topmost of form A and to be a fixed size. Is there any solution?
Dim obj_DataTable As New System.Data.DataTable("Category") Dim obj_DataSet As New DataSet() 'Declaring the array of DataColum to hold the Primary Key Columns
My program handles XML files that have certain elements within a root-child node that are identical expect for their inner text value. So while populating my combo box with all of a root-child's child element's names I get like five identical items listed. Which brought about the problem of selecting say the third item and getting the value of the first displayed. So I came up with a loop function that determines if the selected combo box item is preceded by one of the same name, if it is, then it adds +1 to a counter variable and keeps checking farther and farther up the list. Once it loops to an item that doesn't have the same name it exits and it reads the Xth (X = counter mentioned earlier) element's inner text from the file. This works great for elements 1, 3, 4, and 5. But not for 2. A while back when I was focused on this problem I discovered the root of the problem but I was unable to circumvent it. I'll put the loop below so you can see the problem in action instead of trying to follow my verbose explanation:
I'm from denmark and hope I can explain my question for you. This is just a example: I have a panel, let's say panel1 and another panel on that panel (panel2) and so on until for example panel5 - on panel5 I have a button (button1). Now I would like to change button1's backcolor property through code how do I then get access to button1, now it's a child-control on panel5 that is a child control on panel4 etc. ??
findwindowEX Send Message in Child of a Child of an ApplicationFirst:- my english is very ad (german)- i am a newby of Visual BasicMy Form with SQL-Integration is sending Data per Button to Notepad sucessfull. Unfortunately, the purpose application has interlocking children.But the application don become the data. to found a solution / or a Idear. i think i put in screenshots an my
Public Class Form1 'Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
i have created two forms A and B when button in form A is clicked B is invoked when B is running its not possible to work on A until i close form B. How can i work on A without closing B
I have a 3rd party program that puts up a pop up box and asks the user for input. In Spy++ the original program (I'll refer to this as Window A from now on) is a top level window, and the popup (Window B) is also a parent window. However, when I use FindWindow(Nothing, "Captcha Challenge") it returns 0. I've also used a code snippet from the forums
OK, so I have the code to add a Child Node to a selected node in ta TreeView. The thing is, even if I select a child node to "add" to, it adds the new node to the parent of the selected child node.
I know why it does that: TreeView1.Nodes(TreeView1.SelectedNode.Index).Nodes.Add() adds to the first node. So how do I progamatically add to the child node I have selected, not it's parent node. I can't figure out the logic on how to accomplish this.
NOTE: There can be an infinite amount of child nodes.
UPDATE: I just found out that if I have a child node selected, TreeView1.SelectedNode.Index returns -1 since there is nothing selected in that first level. I'd have to use TreeView1.Nodes(0).SelectedNode.Index to get the proper index for the ChildNode. *sigh*
In my form I hace a Groupbox1, within Groupbox1 have a Groupbox2, within Groupbox2 have a Textbox1..how to call the Texbox1 from another form? When I use Dim newControl As Control = Form1.Controls(Textbox1.Name) I get nothing value?if I use Form1.Controls(Groupbox1.Name) it can get the Groupbox1
I've got an MDI vb project with several child forms. Now I want each child to be placed on top of the other open childs when I create it. In simple words, I don't want it to hide behind the other open childs.
In one of my apps I'm using MDI childs so the user only has one screen. There's only one MDI child open at any time, it is maximized and all control option (controlbox, minimize and maximize buttons) are turned off, so to the user it seems there is one program with one screen.In the parentform I'm using devexpress' RibbonBar for the menu.
When I open a new child, the uppermost part of the childform (about 15px) is not shown, it's put under the Ribbonbar. If I resize the parentform however, the childform ofcourse changes dimensions as well because it is maximized and this somehow causes it to shows like it's supposed to.Is there any way to invoke this behaviour programmatically so the location of the child form is correct from the beginning?
I am using VB.NET (2008). I have a MDI form and a child form loads whenever I click on a menu item.In an MDI form if you click on Window menu, where you see options like Tile Horizontal, Cascade etc you also see the name of child forms which are open in that list. If you click any one of them then the focus shifts there.'Now the problem is if a child form changes its caption/text after it has been loaded and then you click on Window Menu it still shows the old text. If I open more than one child form and change one of the form's text and then click on another one and then open Window Menu then its okay.how can I refresh the list or do whatever so that if my mdi child form loads and its caption changes then it should be reflected in my mdi's form's window menu.
How can i set the form1 as a mdi child? when im showing the form in the mdi parent the form appears but the form is not exactly inside the mdi parent. In vb6 i can make it by setting the form1 to mdi child into true, but in vb9 i cant find it.
In your opinion what API use Spy++ to get the "Rectangle" and "Restored Rect" data of a child control of an external window?I don't think it uses GetWindowPlacement because if I use this API for the main window I obtain the same values of Spy++, but if I use the GetWindowPlacement API to find the position of a control of the window itself, known it Hwnd, I obtain different results as to Spy++ (that are ALWAYS the same results also if I shift the Main window... so I think that are relative data and not absolute data... but they are wrong )
One example: Spy++ : (620, 473)-(792, 505) GetWindowPlacement: (615, 450)-(787, 482) same dimensions... but different pos... and the right pos is the Spy++ pos.
In a MDI application, for opening a form in the MDI, I am using the following code
Private Sub RoleToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RoleToolStripMenuItem.Click Dim lobj_ChildForm As frmRole 'Check if form is already open lobj_ChildForm = Nothing
[code]....
As you can see, I need loopong through all the open child forms.
I have these codes to load 2 MDI child forms from my menu...
Private Sub Form1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Form1ToolStripMenuItem.Click Dim f As New Form1
I have a main form having the MDI Parent Control. I have a menu toolstrip menu "set status" which opens a Child Form having a DataGridView. The DataGridView has a
I got a situation where i have the first word only of a a child window and the rest of the name changes. I need to find this child window using findwindowex i think by not knowing the full name.
Searching the processes wont work since it is a child.
I have a Midi form with controls I always want to be displayed even when child forms are open. I can position the location of the child forms when the project is first opened with no issues. The problem I have is if more than 3 child forms are open and I enter the middle form one of the others is no longer visible. Me.LayoutMdi(MdiLayout.Cascade) will reorder all the forms but it starts at location(0,0). Have tried the other options available with midilayout and they all do the same thing
I'm having trouble with MDI child and a dialog form. The problem details are listed below:
1. One MDI Parent form (Form1) with a button on it (Button1).
2. One Child form of Form1 (name = Form2) with a button (Button2) and a textbox (text_box1).
3. Another form in the project (not child of Form1 and not MDI Parent) with name Form3. This form has also a button on it (Button3).
The application behaviour is as follows: the application starts with Form1. Clicking the Button1 will show Form2. Form2 correctly opened as a MDI child. Clicking the Button2 on the Form2 will show Form3 as dialog (Form3.ShowDialog() ). Clicking the Button3 on the Form3 need to do the magical thing - to set/change the text in the Form2's text_box1.
Tried various examples from this forum. Also followed a lot of examples from net. Nothing works. Tried to create a writable property in the Form2 class but calling it from the Form3 does nothing.
I tried to access the MDIchildren(ss) while ss loops in MDIchildrens array but I don't know how to access the label control inside the Form2 using this technique. Successfully changed the Form2 caption but no controls are available in VB intellisense - practically correct because VB don't know which form from array I'm referring to.
have a form with 3 comboboxes and 3 Bindingdource dropped on, Now I can manage to have the first dropdown box display a list of manufacturers ok then when one is selected to display the range of products made and be able to open a form etc based on that, but what I really want to do is in the 3rd combobox display a list of models of the product in combobox2... Is this possible?. I have spent hours trying to figure this out and looking on the net but all examples only point to 1 parent and 1 child..
I have a huge image which I loaded into a picturebox on a Child Form. The problem is that I can't seem to create scrollbars on the Child Form. So... I tried the Webbrowser control. The code I used:
WebBrowser1.Navigate("file:///" & Application.StartupPath.ToString() & "libmap.jpg")Doesn't work somehow. But then again... I'm not sure where to place that particular folder. I tried all the C:UsersRadjeshDocumentsVisual Studio 2008Projectsproject_name.... and subfolders, but I ca't seem to get it right.
How can i write code to check if the hyperlink that would show the data for the child table has been clicked. When i try to use code such as currentcell.gettype it would simply say datagridcell but does not provide any more information?
Hwnd = WindowFromPoint(Cursor.Position) I can get the Hwnd of every control of an external window is under the cursor. Question: I need only and always the MAIN WINDOW hwnd, everywhere should be the cursor. what API I need?