473,327 Members | 1,919 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,327 software developers and data experts.

VB 6 Load method equivalent in .net? (Loading a form invisibly)

I'd like to load a form in the background (invisibly) and then, afer
the controls are all drawn (and resized, in this case), I'd like to
show it. I.e., I want the form to show up nice and crisply, without
showing the user a form building (kinda scary to a non technical user
;-)

I've tried:

Dim f As New Form1
f.Visible = False
f.Show()
f.Visible = True

However the show method makes the form visible momentarily (thus you
get a "flash" of the form, defeating the whole purpose).

Nov 21 '05 #1
6 2444
Pardon me if I am wrong, but as soon as you issue:

Dim f As New Form1

then the form is as good as loaded and invisible until you SHOW it.

--
|
+-- Thief_
|

"Mr. Analogy" <Mr*******@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I'd like to load a form in the background (invisibly) and then, afer
the controls are all drawn (and resized, in this case), I'd like to
show it. I.e., I want the form to show up nice and crisply, without
showing the user a form building (kinda scary to a non technical user
;-)

I've tried:

Dim f As New Form1
f.Visible = False
f.Show()
f.Visible = True

However the show method makes the form visible momentarily (thus you
get a "flash" of the form, defeating the whole purpose).

Nov 21 '05 #2
Unfortunately, no it isn't.

The controls on the form aren't yet instantiated.

You can see this If you look at the form immediately after Dim'ing
it, you'll see that f.controls.count=0 (there were controls on the
form).

Nov 21 '05 #3
Controls aren't available (instantiated) until the Load() event fires.
And the form becomes visible when the load() event fires.

Nov 21 '05 #4
Mr. Anoalogy

Where do you have this code in your application?
Dim f As New Form1
f.Visible = False
f.Show()
f.Visible = True


I think that it can explain than something more

Cor
Nov 21 '05 #5
Jon
Have a look at the "opacity" property

eg putting "Me.Opacity = 0" in the form's constructor

Public Sub New()

MyBase.New()

'This call is required by the Windows Form Designer.

InitializeComponent()

'Add any initialization after the InitializeComponent() call

Me.Opacity = 0

End Sub

Jon

"Mr. Analogy" <Mr*******@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I'd like to load a form in the background (invisibly) and then, afer
the controls are all drawn (and resized, in this case), I'd like to
show it. I.e., I want the form to show up nice and crisply, without
showing the user a form building (kinda scary to a non technical user
;-)

I've tried:

Dim f As New Form1
f.Visible = False
f.Show()
f.Visible = True

However the show method makes the form visible momentarily (thus you
get a "flash" of the form, defeating the whole purpose).

Nov 21 '05 #6
Hi,

Take a look at the forms suspendlayout and resumelayout methods

http://msdn.microsoft.com/library/de...ayouttopic.asp

http://msdn.microsoft.com/library/de...ayouttopic.asp

Ken
-------------------
"Mr. Analogy" <Mr*******@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I'd like to load a form in the background (invisibly) and then, afer
the controls are all drawn (and resized, in this case), I'd like to
show it. I.e., I want the form to show up nice and crisply, without
showing the user a form building (kinda scary to a non technical user
;-)

I've tried:

Dim f As New Form1
f.Visible = False
f.Show()
f.Visible = True

However the show method makes the form visible momentarily (thus you
get a "flash" of the form, defeating the whole purpose).
Nov 21 '05 #7

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

Similar topics

2
by: Sam | last post by:
I have a custom control (MyTextBox - taken from Microsoft website) that implements the IPostBackDataHandler interface. It is added to the controls collection of a placeholder control during the...
7
by: UJ | last post by:
I've got a page with a user control on it. While the page is loading, it needs to check certain conditions of the user object to enable/disable things on the screen. Currently in the page_load of...
2
by: **Developer** | last post by:
I have a Form (FV&C) containing a userconrtrol (CF&E) I do a ShowDialog for the form and the form's Load calls a method of the UserControl. The first time I do this the usercontrol appears on...
1
by: Jason Richmeier | last post by:
I am experiencing some unexpected behavior with the Form Load event in a Windows application. Hopefully, someone can explain why this behavior is occurring. In my application, I have a form...
9
by: netasp | last post by:
hi all, how can I populate one aspx form when page is loading based on page ID? for example: loading page A (to search for VB code) would display labels and texboxes, dropdown lists all related...
2
by: Franky | last post by:
Threre is a Form containing a usercontrol In the form's Load event it references a usercontrol property, say, zz The first showdialog(formx) causes 1 usercontrol_load event 2 form_load event...
6
by: Ronald S. Cook | last post by:
We have a Windows app that has one main form (a shell, sort of). We then load user controls into a panel on the form depending on what the user has selected. Our current code to unload the...
0
by: mrjaxon | last post by:
Basically the issue is, when the XSL style sheet is loaded by URI it is cool but when the exact same style sheet loaded by it's contents the load fails (for this particular style sheet). Because...
9
by: RvGrah | last post by:
I'm completely new to using background threading, though I have downloaded and run through several samples and understood how they worked. My question is: I have an app whose primary form...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.