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

Form doesn't show

the following code doesn't seem to work. Does anyone know why my form isn't showing?
Dim pickarea1 As New PickArea
pickarea1.Show()

Nov 20 '05 #1
8 1356
* "=?Utf-8?B?bWlrZQ==?=" <an*******@discussions.microsoft.com> scripsit:
the following code doesn't seem to work. Does anyone know why my form isn't showing?
Dim pickarea1 As New PickArea
pickarea1.Show()


Where do you use the code? If it's inside the sub main, use this
instead:

\\\
Application.Run(New PickArea())
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
the code is inside the load event of the main form.
Nov 20 '05 #3
"mike" <an*******@discussions.microsoft.com> schrieb
the following code doesn't seem to work. Does anyone know why my
form isn't showing?
Dim pickarea1 As New PickArea
pickarea1.Show()


Is there long running code in the constructor or in OnLoad? Does the Load
event fire? Does the Activated event fire?
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4
This application is being upgraded from vb6.
Nov 20 '05 #5
"mike" <an*******@discussions.microsoft.com> schrieb
I get the following error message when I use H. Wagner's
suggestion. An unhandled exception of type
'System.InvalidOperationException' occurred in
system.windows.forms.dll

Additional information: It is invalid to start a second message loop
on a single thread. Use Application.RunDialog or Form.ShowDialog
instead.


Right, that's why he wrote that you should do this only if your code was in
Sub Main.

What about my questions?
--
Armin

Nov 20 '05 #6
does anyone know of any properties that might be set on the form that I am not aware of. I created a brand new form since this is an upgraded application and when i called the form it worked. any ideas will be appreciated. Thanks
Nov 20 '05 #7
* "=?Utf-8?B?bWlrZQ==?=" <an*******@discussions.microsoft.com> scripsit:
the code is inside the load event of the main form.


Then it should work...

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #8
"mike" <an*******@discussions.microsoft.com> schrieb
does anyone know of any properties that might be set on the form that
I am not aware of. I created a brand new form since this is an
upgraded application and when i called the form it worked. any ideas
will be appreciated. Thanks


I've already asked how you set some properties but you didn't answer.
--
Armin

Nov 20 '05 #9

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

Similar topics

3
by: BakelNB | last post by:
I am new to the .Net environment, so please bear with me. I am passing a form object (e.g. formA) to an existing form (e.g. formB) by setting a property value defined in formB to hold the formA...
5
by: ortaias | last post by:
I have a form which calls up a second form for purposes of data entry. When closing the data entry form and returning to the main form, things don't work as expected. When I return to the main...
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
11
by: Zytan | last post by:
I have created a new form from the main form. When I close the main form with the 'x' close button, its Form.FormClosed event is run, but not the dialog's. Is this normal? It is ok /...
4
by: Franck | last post by:
I'm a vb programmer but i have to touch C# a bit now. I'm looking for a thing that doesn't seems to exist anywhere here im talking of how to open a form. in vb it was just frmMyform.show or...
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:
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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,...
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...

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.