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

forms do not repond

I am trying to use the standard code for showing the form.

dim msgForm = New Form1()
msgForm.Show()
although it does show the form, but it is a just a blank white background
and when i take the mouse their it changes to an 'hour glass' i click the
mouse on it and the form just stops to repond.

Is their anything i am missing. I know it is very basic.
irfan

Nov 21 '05 #1
12 1051
sounds like you have an infinite loop in your Form_Load routine.

Post the code.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Irfan Mumtaz" <sp****@spam.net> wrote in message
news:FC**********************************@microsof t.com...
I am trying to use the standard code for showing the form.

dim msgForm = New Form1()
msgForm.Show()
although it does show the form, but it is a just a blank white background
and when i take the mouse their it changes to an 'hour glass' i click the
mouse on it and the form just stops to repond.

Is their anything i am missing. I know it is very basic.
irfan

Nov 21 '05 #2
Hi,

you type:
dim msgForm = New Form1()
msgForm.Show()
try:
dim msgForm AS New Form1()
msgForm.Show()

hth Peter

"Irfan Mumtaz" <sp****@spam.net> schreef in bericht
news:FC**********************************@microsof t.com... I am trying to use the standard code for showing the form.

dim msgForm = New Form1()
msgForm.Show()
although it does show the form, but it is a just a blank white background
and when i take the mouse their it changes to an 'hour glass' i click the
mouse on it and the form just stops to repond.

Is their anything i am missing. I know it is very basic.
irfan

Nov 21 '05 #3
Irfan,

When you have created your application using VB.Net or a version of Visual
Studio Net, than you don't have to do anything to show your main form.

In VBNet is a build in procedure that shows that.

I think that is your probably your problem.

Therefore remove those two rows try and when it does not go tell us.

I hope this helps

Cor
Nov 21 '05 #4
"Irfan Mumtaz" <sp****@spam.net> schrieb:
dim msgForm = New Form1()
msgForm.Show()
I suggest to enable 'Option Strict':

\\\
Dim MsgForm As New Form1()
MsgForm.Show()
///

However, this won't solve the problem.
although it does show the form, but it is a just a blank white background
and when i take the mouse their it changes to an 'hour glass' i click the
mouse on it and the form just stops to repond.


Which controls are you using on your form? Are you performing any
operations in the form's 'Load' event?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5
It took Pete's suggestion, but it didnt work.
Nick' s sugestion that there might be endless loop, but i am opening a new
poject and using just these two lines to show the form

However, the form does show up when i make it as startup object but the
problem arises when i call the form from a module or main sub

Dim msgForm As New Form1()
msgForm.Show()

I still dont know the reason for this basic problem

I am using vb.net 2003

"Cor Ligthert" wrote:
Irfan,

When you have created your application using VB.Net or a version of Visual
Studio Net, than you don't have to do anything to show your main form.

In VBNet is a build in procedure that shows that.

I think that is your probably your problem.

Therefore remove those two rows try and when it does not go tell us.

I hope this helps

Cor

Nov 21 '05 #6
i tried to put msg box, when it reaches End sub it shows both, msgbox and the
form1,
Option Strict On
Module Module1
Sub main()
Dim msgForm As New Form1()
msgForm.Show()
MsgBox("hello")

End Sub
Sub open()

End Sub
End Module
"Herfried K. Wagner [MVP]" wrote:
"Irfan Mumtaz" <sp****@spam.net> schrieb:
dim msgForm = New Form1()
msgForm.Show()


I suggest to enable 'Option Strict':

\\\
Dim MsgForm As New Form1()
MsgForm.Show()
///

However, this won't solve the problem.
although it does show the form, but it is a just a blank white background
and when i take the mouse their it changes to an 'hour glass' i click the
mouse on it and the form just stops to repond.


Which controls are you using on your form? Are you performing any
operations in the form's 'Load' event?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #7
"Irfan Mumtaz" <sp****@spam.net> schrieb:
i tried to put msg box, when it reaches End sub it shows both, msgbox and
the
form1,
Option Strict On
Module Module1
Sub main()
Dim msgForm As New Form1()
msgForm.Show()
MsgBox("hello")

Use 'Application.Run(MsgForm)' instead of calling the form's 'Show' method.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #8
Irfan,

Dont use that module main (as I do it) or do it with that application.Run as
Herfried suggest.
(You can set your startup form in the properties from the project)

I hope this helps,

Cor
Nov 21 '05 #9
It probably doesn't make any difference but I use
dim msgForm as Form1 = New Form1

"Irfan Mumtaz" wrote:
i tried to put msg box, when it reaches End sub it shows both, msgbox and the
form1,
Option Strict On
Module Module1
Sub main()
Dim msgForm As New Form1()
msgForm.Show()
MsgBox("hello")

End Sub
Sub open()

End Sub
End Module
"Herfried K. Wagner [MVP]" wrote:
"Irfan Mumtaz" <sp****@spam.net> schrieb:
dim msgForm = New Form1()
msgForm.Show()


I suggest to enable 'Option Strict':

\\\
Dim MsgForm As New Form1()
MsgForm.Show()
///

However, this won't solve the problem.
although it does show the form, but it is a just a blank white background
and when i take the mouse their it changes to an 'hour glass' i click the
mouse on it and the form just stops to repond.


Which controls are you using on your form? Are you performing any
operations in the form's 'Load' event?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #10
considering the simplicity of your app, is there some reason you've chosen
NOT to post 100% of the code?

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Irfan Mumtaz" <sp****@spam.net> wrote in message
news:F3**********************************@microsof t.com...
i tried to put msg box, when it reaches End sub it shows both, msgbox and
the
form1,
Option Strict On
Module Module1
Sub main()
Dim msgForm As New Form1()
msgForm.Show()
MsgBox("hello")

End Sub
Sub open()

End Sub
End Module
"Herfried K. Wagner [MVP]" wrote:
"Irfan Mumtaz" <sp****@spam.net> schrieb:
> dim msgForm = New Form1()
> msgForm.Show()


I suggest to enable 'Option Strict':

\\\
Dim MsgForm As New Form1()
MsgForm.Show()
///

However, this won't solve the problem.
> although it does show the form, but it is a just a blank white
> background
> and when i take the mouse their it changes to an 'hour glass' i click
> the
> mouse on it and the form just stops to repond.


Which controls are you using on your form? Are you performing any
operations in the form's 'Load' event?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #11
Have you tried
dim msgForm = New msgForm
msgForm.Show()

(I guess it would depend on what you named your form. I did this once, and
switched the position of the name of my form with the variable)

--
Message posted via http://www.dotnetmonster.com
Nov 21 '05 #12
the = should be an AS

sorry...

--
Message posted via http://www.dotnetmonster.com
Nov 21 '05 #13

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

Similar topics

3
by: Joshua Russell | last post by:
Hi, Both the methods below open up a windows form called MasterForm. However, one works better than the other. Method 1 opens the form correctly but I don't have any reference to the instance of...
7
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls...
13
by: MD | last post by:
I have been converting a program from VB6 to VB.Net and enhancing it as well. All has been progressing OK although its been hard work. Now, all of a sudden, when I try to execute a ShowDialog()...
3
by: Lloyd Sheen | last post by:
I have the following situation: Need a user resizable user control. After much trying with user control I came across the idea of hosting the controls in a form marked as not TopLevel = false. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
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: 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
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.