473,388 Members | 1,340 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Opening form invisible

Hi

Is there a way to open a form hidden/invisible while it is populating its
controls, and then make it visible once it is done? I am using the following
code but the form remains visible.

cform = New frmClients
cform.Visible = False ' this does not seem to make form hidden (not
visible)
cform.TopLevel = False
Me.FormsPanel.Controls.Add(cform) 'Me is a main/parent form
cform.Show()
cform.BringToFront()
cform.Visible = True

Thanks

Regards
Nov 20 '05 #1
6 1362
Hi John,

When you do your loading in the "load" event from the form, it is invisible
untill that is ready. The first event with a visible form I use is the form
activated.

I hope this helps?

Cor
Nov 20 '05 #2
* "John" <jo**@nospam.infovis.co.uk> scripsit:
Is there a way to open a form hidden/invisible while it is populating its
controls, and then make it visible once it is done? I am using the following
code but the form remains visible.

cform = New frmClients
cform.Visible = False ' this does not seem to make form hidden (not
visible)
cform.TopLevel = False
Me.FormsPanel.Controls.Add(cform) 'Me is a main/parent form
The form will remain invisible until the execution of the next line.
cform.Show()
cform.BringToFront()
cform.Visible = True


The last line doesn't make sense because the form is already visible.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
The problem is that I see the controls being painted one by one. Can I not
keep the form hidden until all controls are painted during the first form
loading?

Thanks

Regards
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OD**************@TK2MSFTNGP10.phx.gbl...
* "John" <jo**@nospam.infovis.co.uk> scripsit:
Is there a way to open a form hidden/invisible while it is populating its controls, and then make it visible once it is done? I am using the following code but the form remains visible.

cform = New frmClients
cform.Visible = False ' this does not seem to make form hidden (not visible)
cform.TopLevel = False
Me.FormsPanel.Controls.Add(cform) 'Me is a main/parent form


The form will remain invisible until the execution of the next line.
cform.Show()
cform.BringToFront()
cform.Visible = True


The last line doesn't make sense because the form is already visible.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #4
The problem is that I see the controls being painted one by one. Can I not
keep the form hidden until all controls are painted during the first form
loading?

Thanks

Regards

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:e5**************@TK2MSFTNGP09.phx.gbl...
Hi John,

When you do your loading in the "load" event from the form, it is invisible untill that is ready. The first event with a visible form I use is the form activated.

I hope this helps?

Cor

Nov 20 '05 #5
* "John" <jo**@nospam.infovis.co.uk> scripsit:
The problem is that I see the controls being painted one by one. Can I not
keep the form hidden until all controls are painted during the first form
loading?


Google for 'SendMessage' + 'WM_SETREDRAW', maybe this will work for you.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #6
Private Sub CreateForm_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

' mhf is a form declared at class level

mhf.Visible = False

For x As Integer = 0 To 20

mhf.Controls.Add(New Windows.Forms.Button)

Next

End Sub

Private Sub MakeVisible_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click

mhf.Visible = True

End Sub

End Class

"John" <jo**@nospam.infovis.co.uk> wrote in message
news:ug**************@TK2MSFTNGP09.phx.gbl...
Hi

Is there a way to open a form hidden/invisible while it is populating its
controls, and then make it visible once it is done? I am using the following code but the form remains visible.

cform = New frmClients
cform.Visible = False ' this does not seem to make form hidden (not
visible)
cform.TopLevel = False
Me.FormsPanel.Controls.Add(cform) 'Me is a main/parent form
cform.Show()
cform.BringToFront()
cform.Visible = True

Thanks

Regards

Nov 20 '05 #7

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

Similar topics

3
by: Susan Bricker | last post by:
Greetings. I have three forms that are open at the same time. They are related and cascading. The first form (frmEventAdd) is the anchor. Each event can have many Trials. The second form is...
8
by: Emily Jones | last post by:
Very strange one this. Application written in Access 2000. Runs in 2003 at client's site, 2000 on my development system. FE/BE system. The app's startup form sets a few options, opens the...
10
by: Cy | last post by:
I've had good luck with posting in the past, so we'll see how things go this time...:) I have an Access 2000 form. On the form is about 40 objects. I want to set everything to invisible,...
3
by: Jose_Csharp | last post by:
Hi guys, I´m trying to make a startup invisible form. I don´t want a form with Opacity property 0. First I did the property Visible of the form to false. It wasn´t a good idea, was too easy. Then...
16
by: AJPlonka | last post by:
Can anyone tell me why this doesn't start hidden? Public Class Form1 Inherits System.Windows.Forms.Form Public Sub New() MyBase.New() InitializeComponent() End Sub Protected Overloads...
8
by: TORQUE | last post by:
Hi, I am having some trouble with recording a field on a form into my Table after formatting it to calculate several fields on the form. If i just put the amount in the field and have it linked...
6
by: kaosyeti | last post by:
hey.... i have a duplicate record issue i could use some help with. on a form that has 2 unbound controls, txtboxyear and cboxmonth, together will automatically fill in an invisible txtboxdate...
2
by: Robert Dufour | last post by:
I have Form1 and Form2. Form2 has to be loaded in memory so that controls on it can be controlled from Form1, so I declared it in the Form1 declaration section. That works OK. Now I just need to...
21
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...

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.