473,614 Members | 2,328 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form on top of Main form???

I have an in house application which uses 3 different version of the same
database. When application starts a form is displayed which allows user to
provide the path to the database. My problem is I want this form to open on
top of main form. At present the main form doesn’t appears until user press
OK or Cancel on the form where they provide the data path.

I have used Sub Main as startup object as follows

Sub main()
Dim frm As New frmMain
frm.ShowDialog( )
End Sub
And called the other on Form Load event of main form as follow

Private Sub frmMain_Load(By Val sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load

Dim frm As New frmSetDatabaseP ath
frm.ShowDialog( Me)

End Sub

How can I fix this.

Nov 22 '05 #1
2 1479
Job,

When you forget your Sub Main

And let your MainForm be your startup page, than you can archieve what you
want by setting this at the end of your load event of that mainform

\\\
me.show
Dim frm As New frmMain
frm.ShowDialog( )
///

Did you know by the way that the
microsoft.publi c.dotnet.langua ges.vb newsgroups belongs to the most active
devellopers ones

(Somebody using C# would never do it this way, simple because it is
impossible with C#)

I hope this helps?

Cor
"Job Lot" <Jo****@discuss ions.microsoft. com>
I have an in house application which uses 3 different version of the same
database. When application starts a form is displayed which allows user to
provide the path to the database. My problem is I want this form to open
on
top of main form. At present the main form doesn't appears until user
press
OK or Cancel on the form where they provide the data path.

I have used Sub Main as startup object as follows

Sub main()
Dim frm As New frmMain
frm.ShowDialog( )
End Sub
And called the other on Form Load event of main form as follow

Private Sub frmMain_Load(By Val sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load

Dim frm As New frmSetDatabaseP ath
frm.ShowDialog( Me)

End Sub

How can I fix this.

Nov 22 '05 #2
1st you load the main form and then in the onload event of main form load
database path form and also make it modal or modeless as ur requirement

"Job Lot" ने लिखा:
I have an in house application which uses 3 different version of the same
database. When application starts a form is displayed which allows user to
provide the path to the database. My problem is I want this form to open on
top of main form. At present the main form doesn’t appears until user press
OK or Cancel on the form where they provide the data path.

I have used Sub Main as startup object as follows

Sub main()
Dim frm As New frmMain
frm.ShowDialog( )
End Sub
And called the other on Form Load event of main form as follow

Private Sub frmMain_Load(By Val sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load

Dim frm As New frmSetDatabaseP ath
frm.ShowDialog( Me)

End Sub

How can I fix this.

Nov 22 '05 #3

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

Similar topics

2
2642
by: Kiteman - Canada | last post by:
Is there an event triggered when a form is dragged by its titlebar? I have two forms on screen - the main form is draggable and I need the secondary form to automatically reposition itself adjacent to the main form if the main form is relocated. Tom
5
10035
by: ChrisR | last post by:
Hi all Ive have a Main Form with Command Buttons down the Left hand side, that open various forms. Clicking on a button opens a Sub Form which is moved to take up 3/4s of the right of the main form, so they look as one form. 1st Problem: If I set Modal = True in all Forms, and a Sub Form is open, then I cant access the Command Buttons on the Main Form, which are still
25
10211
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
4
7000
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the user enters the last qualifying field on the main form. In one case this works fine, the subform shows the data the user wants to update -- which means showing all the data put in previously (ie showing this via the requery and the continuous...
5
5047
by: Lyn | last post by:
Hi, I hope someone can help. I have a main form which mostly fills the Access window. In the bottom half of this form I have a tab control to display various types of data related to the main form record. In each page of the tab control, there are three buttons: Add, Update, Delete. Any of these buttons will open another, smaller form to add, update or delete the related data record. Originally, I had placed the smaller form such...
6
3223
by: Gary Miller | last post by:
Does anyone know how to detect a modeless form on closing by the form that invoked the modeless form? form.Show();
2
3332
by: Legendary Pansy | last post by:
Hello, I'm trying to accomplish the impossible by trying to do something equivalent of this example found here http://www.c-sharpcorner.com/Code/2003/Dec/DialogTutorial.as Starting with "Listing 2 - Changing the constructor of the modeless dialog to accept the parent object:" line and go onwards is what I'm trying to do Basically, there is the main form, and then there's the modeless form. I want the modeless form act like a modal form,...
3
13981
by: gsb58 | last post by:
Hi! A mainform is being used to show records from a table in an sql database. A button on the main form will load a new form that allows the user to add, delete, update and search certain records in the underlying table of the main form. My question:
22
3069
by: Zytan | last post by:
I have public methods in a form. The main form calls them, to update that form's display. This form is like a real-time view of data that is changing. But, the form may not exist (it is created / destroyed at user request). I can check form != null to prevent incorrect access. But, the form could disappear immediately after the check, before the method is run. Or someone could click 'close' when it's in the middle of an update. ...
6
2264
by: Thom Little | last post by:
Using C# 3.5 I have a form that calls many other sub-forms. Typically there will be five forms open at the same time. If the main form is closed all the sub forms are also closed. Is there a standard way to gain control within the sub-forms to do individual clean-up prior to their removal?
0
8198
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
8142
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
8642
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
8591
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7115
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
6093
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
5549
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();...
1
2575
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
0
1438
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.