943,616 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Marked Solved
  • Views: 42989
  • VB.NET RSS
You are currently viewing page 1 of this multi-page discussion thread
Sep 15th, 2008
0

How to create a pop-up window in VB.net

Expand Post »
Please help me I am new to VB.net and I want to create a pop-up window in VB.net

Thanks
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nav010 is offline Offline
10 posts
since Sep 2008
Sep 15th, 2008
0

Re: How to create a pop-up window in VB.net

Hi,

What do u exactly want do u want to show any message as a pop-up in vb.net or do you want to show entire other form as pop-up???

if u want message as a pop-up then you can write

MsgBox("<<Message To Show>>", MsgBoxStyle.Information, "<<Tital>>")

OR

MessageBox.Show("<<Message To Show>>", "<<Tital>>", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly, False)


if u want to open new form as pop-up then

Dim Obj as new Form1
Obj.Show()


or

Dim Obj As New Form1
Obj.ShowDialog()



Regards,
Vidyadhar

Click to Expand / Collapse  Quote originally posted by nav010 ...
Please help me I am new to VB.net and I want to create a pop-up window in VB.net

Thanks
Reputation Points: 10
Solved Threads: 2
Newbie Poster
vidyadhar is offline Offline
3 posts
since Sep 2008
Sep 15th, 2008
0

Re: How to create a pop-up window in VB.net

i want to create pop-up as new form.
I tried to put your code
dim obj as new form1
obj.show()

but, Stackoverflow exception is there.

I want that whenever i click a button, a new pop-up window be opened.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nav010 is offline Offline
10 posts
since Sep 2008
Sep 15th, 2008
1

Re: How to create a pop-up window in VB.net

Post your code.
Reputation Points: 1182
Solved Threads: 392
Posting Sensei
Jx_Man is offline Offline
3,138 posts
since Nov 2007
Sep 15th, 2008
0

Re: How to create a pop-up window in VB.net

Can you tell me what is ur forms name.. In my code give below you will have to replace form1 text with your forms name... Please try this and let me know if you are still getting any error write back to me with exact error message you are getting...

Click to Expand / Collapse  Quote originally posted by nav010 ...
i want to create pop-up as new form.
I tried to put your code
dim obj as new form1
obj.show()

but, Stackoverflow exception is there.

I want that whenever i click a button, a new pop-up window be opened.
Reputation Points: 10
Solved Threads: 2
Newbie Poster
vidyadhar is offline Offline
3 posts
since Sep 2008
Sep 15th, 2008
0

Re: How to create a pop-up window in VB.net

My form name is also form1.

I am getting this error:

An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nav010 is offline Offline
10 posts
since Sep 2008
Sep 15th, 2008
1

Re: How to create a pop-up window in VB.net

Then post your code, it more help.
and which line of error...
Reputation Points: 1182
Solved Threads: 392
Posting Sensei
Jx_Man is offline Offline
3,138 posts
since Nov 2007
Sep 15th, 2008
0

Re: How to create a pop-up window in VB.net

Hi, i think i understand your requirement. Is it you want you click the button, and then the current form will be close, and the new form will pop up?

if this is your requirement, then the solution will as the following

when u click the button, then the form1 will close while the form2 will be pop up.
Me.Hide()
Form2.Show()

Hope this can help u..
Reputation Points: 6
Solved Threads: 1
Light Poster
rainny is offline Offline
27 posts
since Dec 2007
Sep 15th, 2008
0

Re: How to create a pop-up window in VB.net

Dim obj As New Form1


Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)

obj.Show()

End Sub
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nav010 is offline Offline
10 posts
since Sep 2008
Sep 15th, 2008
0

Re: How to create a pop-up window in VB.net

Thanks
part of my problemis solved, but can it be done in another way, without taking another form.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nav010 is offline Offline
10 posts
since Sep 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Insert query in VB.NET
Next Thread in VB.NET Forum Timeline: Best Method For a Quiz??





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC