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

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Sep 2008
Posts: 10
Reputation: nav010 is an unknown quantity at this point 
Solved Threads: 0
nav010 nav010 is offline Offline
Newbie Poster

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

 
0
  #1
Sep 15th, 2008
Please help me I am new to VB.net and I want to create a pop-up window in VB.net

Thanks
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 3
Reputation: vidyadhar is an unknown quantity at this point 
Solved Threads: 2
vidyadhar vidyadhar is offline Offline
Newbie Poster

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

 
0
  #2
Sep 15th, 2008
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

Originally Posted by nav010 View Post
Please help me I am new to VB.net and I want to create a pop-up window in VB.net

Thanks
Regards,
Vidyadhar
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 10
Reputation: nav010 is an unknown quantity at this point 
Solved Threads: 0
nav010 nav010 is offline Offline
Newbie Poster

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

 
0
  #3
Sep 15th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

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

 
1
  #4
Sep 15th, 2008
Post your code.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 3
Reputation: vidyadhar is an unknown quantity at this point 
Solved Threads: 2
vidyadhar vidyadhar is offline Offline
Newbie Poster

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

 
0
  #5
Sep 15th, 2008
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...

Originally Posted by nav010 View Post
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.
Regards,
Vidyadhar
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 10
Reputation: nav010 is an unknown quantity at this point 
Solved Threads: 0
nav010 nav010 is offline Offline
Newbie Poster

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

 
0
  #6
Sep 15th, 2008
My form name is also form1.

I am getting this error:

An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

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

 
1
  #7
Sep 15th, 2008
Then post your code, it more help.
and which line of error...
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 27
Reputation: rainny has a little shameless behaviour in the past 
Solved Threads: 1
rainny rainny is offline Offline
Light Poster

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

 
0
  #8
Sep 15th, 2008
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..
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 10
Reputation: nav010 is an unknown quantity at this point 
Solved Threads: 0
nav010 nav010 is offline Offline
Newbie Poster

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

 
0
  #9
Sep 15th, 2008
Dim obj As New Form1


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

obj.Show()

End Sub
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 10
Reputation: nav010 is an unknown quantity at this point 
Solved Threads: 0
nav010 nav010 is offline Offline
Newbie Poster

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

 
0
  #10
Sep 15th, 2008
Thanks
part of my problemis solved, but can it be done in another way, without taking another form.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC