473,888 Members | 1,407 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open child form from dialog form

I would like to know how to open child form from dialog form.

Thanks for help!

Simon
Nov 21 '05 #1
14 3784
"Simon Abolnar" <Si***********@ tscng.net> schrieb
I would like to know how to open child form from dialog form.

Thanks for help!

Simon


Is the child form to be a child of the dialog form or of another form?

Armin
Nov 21 '05 #2
Child form is meant that is child of MDI form.

Thanks for help!

Simon

"Armin Zingler" <az*******@free net.de> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
"Simon Abolnar" <Si***********@ tscng.net> schrieb
I would like to know how to open child form from dialog form.

Thanks for help!

Simon


Is the child form to be a child of the dialog form or of another form?

Armin

Nov 21 '05 #3
"Simon Abolnar" <Si***********@ tscng.net> schrieb
I would like to know how to open child form from dialog form.


Is the child form to be a child of the dialog form or of another
form?


Child form is meant that is child of MDI form.

Does the dialog form know the MDI form or is it a multi-purpose form that
can be used from different places? That's a question of abstraction. What
does the dialog form do? Will it be closed after the child Form has been
opened? Which results can it pass back to the caller?

Armin

Nov 21 '05 #4
My dialog form is login form. When application start,
dialog is open through ShowDialog.

If login is successful, I would like to close my dialog form and open other
child form of MDI.

Thanks for help!

Simon
"Armin Zingler" <az*******@free net.de> wrote in message
news:ev******** ******@TK2MSFTN GP09.phx.gbl...
"Simon Abolnar" <Si***********@ tscng.net> schrieb
I would like to know how to open child form from dialog form.
Is the child form to be a child of the dialog form or of another
form?


Child form is meant that is child of MDI form.

Does the dialog form know the MDI form or is it a multi-purpose form that
can be used from different places? That's a question of abstraction. What
does the dialog form do? Will it be closed after the child Form has been
opened? Which results can it pass back to the caller?

Armin

Nov 21 '05 #5
Simon,

Why do you than open it at such a late moment.

I open this in the loadevent of my mdiContainer form. (There is than not
showed anything yet).

\\\
dim frm as new myLoginForm
if frm.showdialog = dialogresult.fa lse me.close
///

This is not how I do it, however the shortest way I know to show it you to
give the idea.

Cor
Nov 21 '05 #6
"Simon Abolnar" <Si***********@ tscng.net> schrieb
>I would like to know how to open child form from dialog form.
>

Is the child form to be a child of the dialog form or of
another form?

Child form is meant that is child of MDI form.

Does the dialog form know the MDI form or is it a multi-purpose form
that can be used from different places? That's a question of
abstraction. What does the dialog form do? Will it be closed after
the child Form has been opened? Which results can it pass back to
the caller?


My dialog form is login form. When application start,
dialog is open through ShowDialog.


Is the login form the startup object of the project?
If login is successful, I would like to close my dialog form and open
other child form of MDI.


This sounds like the MDI form is the startup form.

Which one is true?

I ask to find the best solution.

Armin
Nov 21 '05 #7
MDI form is startup form.
In Load event I show dialog (login) form.

Thanks for help!

Simon

"Armin Zingler" <az*******@free net.de> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
"Simon Abolnar" <Si***********@ tscng.net> schrieb
>>I would like to know how to open child form from dialog form.
>>
>
> Is the child form to be a child of the dialog form or of
> another form?

Child form is meant that is child of MDI form.
Does the dialog form know the MDI form or is it a multi-purpose form
that can be used from different places? That's a question of
abstraction. What does the dialog form do? Will it be closed after
the child Form has been opened? Which results can it pass back to
the caller?


My dialog form is login form. When application start,
dialog is open through ShowDialog.


Is the login form the startup object of the project?
If login is successful, I would like to close my dialog form and open
other child form of MDI.


This sounds like the MDI form is the startup form.

Which one is true?

I ask to find the best solution.

Armin

Nov 21 '05 #8
"Simon Abolnar" <Si***********@ tscng.net> schrieb
Does the dialog form know the MDI form or is it a multi-purpose
form that can be used from different places? That's a question
of abstraction. What does the dialog form do? Will it be closed
after the child Form has been opened? Which results can it pass
back to the caller?

My dialog form is login form. When application start,
dialog is open through ShowDialog.


Is the login form the startup object of the project?
If login is successful, I would like to close my dialog form and
open other child form of MDI.


This sounds like the MDI form is the startup form.

Which one is true?

I ask to find the best solution.


MDI form is startup form.
In Load event I show dialog (login) form.


IMO this is not good design. I guess the login form also has a cancel button
and if it's pushed, the program exits, right? But then it's too late because
the MDI form is about to be shown. I'd changed it this way:

shared sub main

dim loginform as new loginform

if loginform.showd ialog = dialogresult.ok then
application.run (new mdiform)
end if

end sub

Despite, I still don't know why you want to open an MDI child form from the
login form. Is the child form always to be displayed at startup or does it
depend on any selection within the login form?
Armin

Nov 21 '05 #9
1. Thank you very much for your suggestion.
I tried to aplied your solution.
It works OK, except I can't close login dialog.
When I press OK button, application (MDI form) run, with dialog form still
present.
I don't know where to close dialog form. in sub main or in btnOK event and
how?

I changed your solution to:

Shared Sub main()
Dim loginform As New frmPrijava

loginform.btnOK .DialogResult = loginform.Dialo gResult.OK

If loginform.ShowD ialog = loginform.Dialo gResult.OK Then

Application.Run (New frmReferatNET)

End If

End Sub

2. Despite, I still don't know why you want to open an MDI child form from
the
login form. Is the child form always to be displayed at startup or does
it
depend on any selection within the login form?

Yes, I would like to display MDI child form after successfull login. It
depends on user.

Thanks for help!

Simon

"Armin Zingler" <az*******@free net.de> wrote in message
news:u7******** ******@tk2msftn gp13.phx.gbl...
"Simon Abolnar" <Si***********@ tscng.net> schrieb
> Does the dialog form know the MDI form or is it a multi-purpose
> form that can be used from different places? That's a question
> of abstraction. What does the dialog form do? Will it be closed
> after the child Form has been opened? Which results can it pass
> back to the caller?

My dialog form is login form. When application start,
dialog is open through ShowDialog.

Is the login form the startup object of the project?

If login is successful, I would like to close my dialog form and
open other child form of MDI.

This sounds like the MDI form is the startup form.

Which one is true?

I ask to find the best solution.


MDI form is startup form.
In Load event I show dialog (login) form.


IMO this is not good design. I guess the login form also has a cancel
button and if it's pushed, the program exits, right? But then it's too
late because the MDI form is about to be shown. I'd changed it this way:

shared sub main

dim loginform as new loginform

if loginform.showd ialog = dialogresult.ok then
application.run (new mdiform)
end if

end sub

Despite, I still don't know why you want to open an MDI child form from
the login form. Is the child form always to be displayed at startup or
does it depend on any selection within the login form?
Armin

Nov 21 '05 #10

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

Similar topics

2
351
by: Sendhil | last post by:
hi, I have an application with a MainForm(Parent) and SubForm(Child). on click of a button the Child form is created. Iam not sure where in the MainForm,the control is returned when i close the child form. I need to know this to populate some values in a list box in the Main form, which were got from the Child form. Is there any other way to access a control in the Main form from the Child form. Thanks
3
6656
by: Gretjns | last post by:
I'm trying to figure out this script doesn't display any text in the child window and why I'm getting the null or not an object error. It's taken directly from the Javascript and DHTML cookbook (not listed in the book errata on o'reilly website). Initially I get an error "window.dialogArguments.yourName" is null or not an object. Then I fill out the field on the form, press the button and the child window does display but there is no...
1
1890
by: Just Me | last post by:
Table A contains a list of colors (example red, blue, green) Table B contains a variation of the colors in Table A (example light-red, medium-red, dark-red) To add a color variation to Table B, I want it to open a find record dialog box before it opens the form so that you can locate the main color you are going to enter the variations for. The form should then open with the information from Table A already preloaded (or a dialog box...
1
4581
by: VMI | last post by:
How can I add a small "Please wait..." form to a child form so that when I minimize the child form, the "Please Wait..." form will also disappear? This form will be displayed when the child form is running a lengthy process or when the child form is displayed. Once the child form finishes the process, or it's minimized, the "wait" form will also disappear. Thanks.
3
9719
by: Maheshkumar.R | last post by:
Hi groups, How i can command over the MDI CHIlD forms created dynamically at runtime from PARENT. Let say, i have generated 5 mdichild forms, but i want to work with child form1 from MDI parent menu functions. if i select draw line in MDI parent, the line should be drawn in current active child..any URLS for this or guide me to achieve this communication... -- Mähésh Kumär. R
1
5415
by: Jorge Ponte | last post by:
hi I have a Web User Control (ascx) - lets call it "My_WUC" - in a Web form. In that WUC I want have a textbox and a button. I want to click on the button and open a popup (I use javascript for that), the popup window will have also a text box and a button. when the User click on the button the value on the textbox will be send back to the textbox on My_WUC. I hope I was clear off what I want to do. I've been searching for some ideas...
4
3645
by: raj_genius | last post by:
I hav two queries, whc are as follows: FIRSTLY: is it possible to access the controls(by name) of a parent form(MDI) from its child forms??if yes then how??plzz provide a coded example in VB if possible.. for example..i hav a menu in the parent form named "Administrator" whic has an item "mnuLogIn"..now when i click on login..another child form named "frmLogIn" is displayed..what i want to happen is this: when login form(frmLogIn) is...
13
2958
by: Academic | last post by:
I have a MDI form, sometimes child forms and sometimes forms that are neither If I close the app the child forms closing and closed event happens followed by the Mdi form receiving the events.. But the regular forms that are also open do not receive that event. This is true whether there are child forms open or not.
3
3631
by: AboutJAV | last post by:
Hi, I created a child dialog to tell the user that there is a loading of data from the database. When the loading is done, the child dialog will close. The child dialog contains a custom control and the child dialog with the custom control show up fine if the dialog is called as a modal state dlgLoading.ShowDialog();
0
9961
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9800
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
11185
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...
0
9597
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
7990
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
7148
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5824
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...
0
6014
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4642
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

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.