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

form.Show not displaying any of the controls on the Form

When I create a form (Dim f as New Form1) and try to
display it using the f.Show method, the form shows, but no
controls do. I have a textbox and a progressbar on the
form.

It displays fine using f.ShowDialog, but I need the form
to be modeless.
Nov 20 '05 #1
3 1897
Did you write an additional Constructor with parameters for the form? If
so, you have to make sure to call Me.New(), not MyBase.New(), since the
InitializeComponent() procedure is called in the automatically-generated
parameterless Constructor. If this procedure is not called, the controls
will not be drawn. I made the exact same mistake just a short while ago.

Mike

--
Michael Caputo
Programmer/Database Administrator
Simon Economic Systems Ltd.

"KenR" <an*******@discussions.microsoft.com> wrote in message
news:0a****************************@phx.gbl...
When I create a form (Dim f as New Form1) and try to
display it using the f.Show method, the form shows, but no
controls do. I have a textbox and a progressbar on the
form.

It displays fine using f.ShowDialog, but I need the form
to be modeless.

Nov 20 '05 #2
"KenR" <an*******@discussions.microsoft.com> schrieb
When I create a form (Dim f as New Form1) and try to
display it using the f.Show method, the form shows, but no
controls do. I have a textbox and a progressbar on the
form.

It displays fine using f.ShowDialog, but I need the form
to be modeless.


Maybe you are starting any job after showing the Form, so the Form does not
have the time to paint itself. If this is true, call the refresh method
directly after showing the Form.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
No, I'm not sure what you mean. In VB6, you just called
the form. The form does not have any parameter that I
created. Any additional insite would be appreciated as I
am new to vb.net.
Ken.
-----Original Message-----
Did you write an additional Constructor with parameters for the form? Ifso, you have to make sure to call Me.New(), not MyBase.New (), since theInitializeComponent() procedure is called in the automatically-generatedparameterless Constructor. If this procedure is not called, the controlswill not be drawn. I made the exact same mistake just a short while ago.
Mike

--
Michael Caputo
Programmer/Database Administrator
Simon Economic Systems Ltd.

"KenR" <an*******@discussions.microsoft.com> wrote in messagenews:0a****************************@phx.gbl...
When I create a form (Dim f as New Form1) and try to
display it using the f.Show method, the form shows, but no controls do. I have a textbox and a progressbar on the
form.

It displays fine using f.ShowDialog, but I need the form
to be modeless.

.

Nov 20 '05 #4

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

Similar topics

7
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET)...
3
by: RAllsopp | last post by:
I have a client who would like to have several pictures associated with one system. I have read about storing only the pathname to save OLE overhead and have set-up a form for my client to...
6
by: Mathieu Chavoutier | last post by:
Hi. I want to create a kind of configuration window. So, I have a main window, and when I click on a button, it opens a new form. But, because it is a configuration window, I would like that...
4
by: Tony W | last post by:
Hi, I am trying to write a simple application to retrieve data from the Windows registry and insert it into textboxs on a windows form. So far I have one namespace containing two classess. ...
3
by: Leo J. Hart IV | last post by:
OK, here's another question for the experts: I am building a multi-step (3 steps actually) form using a panel for each step and hiding/displaying the appropriate panel/panels depending on which...
5
by: Ronald S. Cook | last post by:
It's been longer that I remember since writing windows (not web) apps. 1) I want to load a main form 2) User clicks login button which brings up login form (on top of main form) 3) Upon...
7
by: Terry | last post by:
I have a Mainform with a Statusbar. When opening another form or doing some processing I want to display info in the Statusbar of the Mainform. I have read a lot of articles on this & have come up...
4
by: Simon Tamman {Uchiha Jax} | last post by:
Scenario: Two System.Windows.Forms: Form1 and Form2. Form1 is displayed, Form2 is hidden. At this juncture, is it possible to take the graphics from Form2 and output that to Form1's display...
11
by: Alex | last post by:
Hello all, I have a main form(say "form1") .i want to display another form(say "form2") on occuring of an event (say a button click) and want to hide it after some time so that it will again...
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.