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

showing a form

Hi,

I am learning vb.net and am trying to move between forms in a windows
application that I am writing. The following code is what I am using to
call up a form called 'Scores' from the start-up form called names. Scores
has a label and a text box and two buttons that move either back to the
first form or move to the third form. When I run this, it brings up a blank
form (ie without any buttons or boxes).

Could someone please let me know what I may be doing wrong. Does the ' dim
scores as new form' create a blank form? Can I just use 'dim scores as
form' instead?

Private Sub Button3_Click(ByVal sender As System.Object, byVal e As
System.EventArgs) Handles Button3.Click

Dim Scores As New Form

Scores.Show()

Me.Hide()

End Sub

thanks for your kind assistance

Doug


Nov 21 '05 #1
2 1001
Your problem is with the line:
Dim Scores As New Form
This is declaring "Scores" as being a new blank form.

Try this:
Dim Scores As New Scores
Where the last "Scores" is the object type of the form you want to display.

Jody
"gordon" <go**********@optusnet.com.au> wrote in message
news:42**********************@news.optusnet.com.au ...
Hi,

I am learning vb.net and am trying to move between forms in a windows
application that I am writing. The following code is what I am using to
call up a form called 'Scores' from the start-up form called names.
Scores has a label and a text box and two buttons that move either back to
the first form or move to the third form. When I run this, it brings up a
blank form (ie without any buttons or boxes).

Could someone please let me know what I may be doing wrong. Does the '
dim scores as new form' create a blank form? Can I just use 'dim scores
as form' instead?

Private Sub Button3_Click(ByVal sender As System.Object, byVal e As
System.EventArgs) Handles Button3.Click

Dim Scores As New Form

Scores.Show()

Me.Hide()

End Sub

thanks for your kind assistance

Doug

Nov 21 '05 #2
Thank you Jody for your advice - it works as anticipated now.

Doug
"Jody Gelowitz" <jg**************@blah.leevalley.com> wrote in message
news:ev**************@TK2MSFTNGP15.phx.gbl...
Your problem is with the line:
Dim Scores As New Form
This is declaring "Scores" as being a new blank form.

Try this:
Dim Scores As New Scores
Where the last "Scores" is the object type of the form you want to
display.

Jody
"gordon" <go**********@optusnet.com.au> wrote in message
news:42**********************@news.optusnet.com.au ...
Hi,

I am learning vb.net and am trying to move between forms in a windows
application that I am writing. The following code is what I am using to
call up a form called 'Scores' from the start-up form called names.
Scores has a label and a text box and two buttons that move either back
to the first form or move to the third form. When I run this, it brings
up a blank form (ie without any buttons or boxes).

Could someone please let me know what I may be doing wrong. Does the '
dim scores as new form' create a blank form? Can I just use 'dim scores
as form' instead?

Private Sub Button3_Click(ByVal sender As System.Object, byVal e As
System.EventArgs) Handles Button3.Click

Dim Scores As New Form

Scores.Show()

Me.Hide()

End Sub

thanks for your kind assistance

Doug


Nov 21 '05 #3

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

Similar topics

2
by: c.anandkumar | last post by:
Hi All - I have some problems getting a small piece of javascript working correctly for Firefox. Here is what I am trying to do - 1. I have a form (like a search form) 2. I have many groups...
2
by: Steven C | last post by:
Hello: I have a C# app that I'm trying to build. I have three projects in the solution, the first of which stores the base object definitions (base form, base textbox, base commandbutton, etc),...
2
by: Krzysztof Karnicki | last post by:
I would like develop Form on my Windows Application, that is going to notify the user, just like Microsoft Office 2003 shows that there are new mail coming. When I use System.Windows.Forms.Form and...
2
by: Timbo | last post by:
Hi there, I’m not used to working in VB and I think this situation calls for excactly that. I use Access 97 SR-2. My first table is a table containing all the Tickets I got. The field ”Ticket”...
0
by: Brian Tkatch | last post by:
Been trying to figure out how to show borderless forms indside an MDI Form, without showing the border at all. Given that (in our case) only one such form needs to show at a time, we were able...
15
missinglinq
by: missinglinq | last post by:
I'd like to use acCmdAppMinimize with two forms on the screen at once. Currently, if I have a form opening the db (with DoCmd.Maximize in the OnLoad event) and then a popup form on top of the first...
3
by: Torben Laursen | last post by:
I have a COM shared add-in written in C# that I use in Excel. One of the thinks that the user can do is to open some winforms. The problem that I have is that the first time the user opens a...
5
by: John Dann | last post by:
Something very simple that I can't spot how to do: I wand to display a msgbox showing some current configuration parameters when my VB2005 program starts up. However, I want the main form to...
6
by: painkiller | last post by:
language: vb.net environment: windows forms .net : v1.1 i am having a checkedlistbox control that display document category such as text, image, video, audio etc. these values are coming from...
7
by: =?Utf-8?B?TWF0dA==?= | last post by:
Hi I have an app that runs without a main form, just a notification icon, when the user clicks the icon the form is shown, and when the form is minimized it's hidden. This all works great,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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,...

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.