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

Popup Control

Hi Guys

I am in the process of developing a control, and will need it to "popup" on
the users for on the press of a button ask for some input and then chuck the
information back to the form. Does anyone know how I can develop this.

Thanks,
Mike.

Nov 21 '05 #1
7 2018
Check out the form.showdialog method

for example form2 is the form you want to show as input form on form1

on form1:

dim input as as new form2
if input.showdialog = dialogresult.ok then
variable = input.nameOfAPropertyOnForm2
end if

on form2 set an ok button and in the buttons click event set dialogresult =
dialogresult.ok
hth Peter

"Michael Turner" <fi*****@m-turner.co.uk> wrote in message
news:Og**************@TK2MSFTNGP11.phx.gbl...
Hi Guys

I am in the process of developing a control, and will need it to "popup" on the users for on the press of a button ask for some input and then chuck the information back to the form. Does anyone know how I can develop this.

Thanks,
Mike.

Nov 21 '05 #2
"Michael Turner" <fi*****@m-turner.co.uk> schrieb:
I am in the process of developing a control, and will need it to "popup"
on
the users for on the press of a button ask for some input and then chuck
the
information back to the form. Does anyone know how I can develop this.


Add a form and use it as input window:

\\\
Dim f As New FooForm()
If f.ShowDialog() = DialogResult.OK Then
...
End If
///

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

Nov 21 '05 #3
Hi Guys

That seems to be a new form. I am creating a control and really wanted it to
popup on form 1, is there away to do this or do i need to use a form.

Mike.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:e8**************@TK2MSFTNGP12.phx.gbl...
"Michael Turner" <fi*****@m-turner.co.uk> schrieb:
I am in the process of developing a control, and will need it to "popup"
on
the users for on the press of a button ask for some input and then chuck
the
information back to the form. Does anyone know how I can develop this.


Add a form and use it as input window:

\\\
Dim f As New FooForm()
If f.ShowDialog() = DialogResult.OK Then
...
End If
///

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


Nov 21 '05 #4
Michael,

Do you mean changing the borders?

Cor

"Michael Turner"
Hi Guys

That seems to be a new form. I am creating a control and really wanted it
to
popup on form 1, is there away to do this or do i need to use a form.

Mike.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:e8**************@TK2MSFTNGP12.phx.gbl...
"Michael Turner" <fi*****@m-turner.co.uk> schrieb:
> I am in the process of developing a control, and will need it to
> "popup"
> on
> the users for on the press of a button ask for some input and then
> chuck
> the
> information back to the form. Does anyone know how I can develop this.


Add a form and use it as input window:

\\\
Dim f As New FooForm()
If f.ShowDialog() = DialogResult.OK Then
...
End If
///

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


Nov 21 '05 #5
Hi create a new form called input then and copy paste the code below, in the
form where you want the input box to show copy paste the other piece of code
below. I think this will do what you want

hth Peter

'copy paste on the form when you want the inputbox to show
Dim obj As New input()
If obj.ShowDialog = DialogResult.OK Then
MsgBox(obj.giveValue)
End If

'The inputbox

Public Class input
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(194, 8)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(60, 34)
Me.Button1.TabIndex = 0
Me.Button1.Text = "OK"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(6, 14)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(178, 20)
Me.TextBox1.TabIndex = 1
Me.TextBox1.Text = ""
'
'input
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(262, 59)
Me.Controls.AddRange(New System.Windows.Forms.Control()
{Me.TextBox1, Me.Button1})
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedDialog
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "input"
Me.StartPosition =
System.Windows.Forms.FormStartPosition.CenterScree n
Me.Text = "input"
Me.ResumeLayout(False)

End Sub

#End Region

Public ReadOnly Property giveValue() As String
Get
Return TextBox1.Text
End Get
End Property

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
DialogResult = DialogResult.OK
End Sub

End Class

"Cor Ligthert" <no************@planet.nl> wrote in message
news:et**************@TK2MSFTNGP09.phx.gbl...
Michael,

Do you mean changing the borders?

Cor

"Michael Turner"
Hi Guys

That seems to be a new form. I am creating a control and really wanted it to
popup on form 1, is there away to do this or do i need to use a form.

Mike.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:e8**************@TK2MSFTNGP12.phx.gbl...
"Michael Turner" <fi*****@m-turner.co.uk> schrieb:
> I am in the process of developing a control, and will need it to
> "popup"
> on
> the users for on the press of a button ask for some input and then
> chuck
> the
> information back to the form. Does anyone know how I can develop this.
Add a form and use it as input window:

\\\
Dim f As New FooForm()
If f.ShowDialog() = DialogResult.OK Then
...
End If
///

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



Nov 21 '05 #6
"Michael Turner" <fi*****@m-turner.co.uk> schrieb:
That seems to be a new form. I am creating a control and really wanted it
to
popup on form 1, is there away to do this or do i need to use a form.


<URL:http://vbaccelerator.com/article.asp?id=13309>

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

Nov 21 '05 #7
Cheers Guys

Thats Great!

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uc**************@TK2MSFTNGP15.phx.gbl...
"Michael Turner" <fi*****@m-turner.co.uk> schrieb:
That seems to be a new form. I am creating a control and really wanted it to
popup on form 1, is there away to do this or do i need to use a form\0\0\0>

<URL:http://vbaccelerator.com/article.asp?id=13309>

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

Nov 21 '05 #8

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

Similar topics

1
by: Noozer | last post by:
When using the WebBrowser control, is it possible to cause popup windows to appear within the WebBrowser control itself instead of a new window? This is what I've written in the NewWindow2 event,...
12
by: HarveyB | last post by:
I would like to generate non-modal popup windows from ASP.Net code-behind. I have tried using Client Side scripting like "function Test(){ window.open('test.htm',_blank,...
4
by: Newbie | last post by:
Hello all~ I have got some questions about popup window, hope that someone can help me.. m(_ _)m~thx~ when a popup window appear, can I force users to focus on the popup window "ONLY" that...
4
by: Davey | last post by:
I have a website which has a popup window (this only opens when the user chooses to open it). In the popup window I have a <select> control which lists a selection of "classes". Each class has a...
2
by: PC User | last post by:
I'm creating a shortcut menu to popup over my richtext box. Its a form with a listbox of menu items with associated richtext activex (rtf) editing commands. I found a way to transfer a value from...
4
by: GrantS | last post by:
I am having a problem closing a popup window opened modally. When I try to close the window (when the user hits save button and the data has been processed), the Popup window opens as a full screen...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
1
by: billy | last post by:
Ok, here's the situation... I have a user control that contains two textboxes (one for a from date/time and one for a to date/time) and two image buttons. The user control itself is supposed to...
4
by: Macbane | last post by:
Hi, I have a 'main' form called frmIssues which has a subform control (named linkIssuesDrug) containing the subform sfrmLink_Issues_Drugs. A control button on the main form opens a pop-up form...
5
by: =?Utf-8?B?SmFtZXMgUGFnZQ==?= | last post by:
Hi all Have a couple of issues with the modal popup extender (asp.net 3.5, vb.net, visual studio 2008): I have created a user control (e-mail enquiry form) which is designed to accept text...
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...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.