🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.language.csharp
Article #494

Re: InputBox or InputQuery

#494
From: JED
Date: Thu, 10 Feb 2005 01:26
38 lines
1942 bytes
David Clegg wrote:

> Chris Holland wrote:
> 
> > That would explain why I cant find it
> 
> VB.NET users have one they can use. It should be possible to find the
> assembly that it's implemented in (probably part of the standard .NET
> Runtime) and use it from there.

In the Microsoft.VisualBasic assembly, Interaction class...

Add Reference to Microsoft.VisualBasic
Add using Microsoft.VisualBasic 

Drop down a button and add the following::

string value = Microsoft.VisualBasic.Interaction.InputBox("My Prompt",
"Some Title", "I am the default", -1, -1);
if (value.Length != 0) {
	Text = value;
}
else {
	Text = "Cancel selected";
}


Dialog doesn't look the best though (IMHO).

-- 
QC Client: http://www.alphalink.com.au/~jed/QC/
Blog: http://jedqc.blogspot.com/

Configure Delphi the way you want it to be:
www.alphalink.com.au/~jed/dcm.htm

Checkout my code central submissions for D2005
http://cc.borland.com/ccweb.exe/author?authorid=205627
Technical Details
Message-ID: <xn0dyc6sy8v8pa009@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4208bec0$1@newsgroups.borland.com> <42091f36@newsgroups.borland.com> <4209ca4d@newsgroups.borland.com> <xn0dyc0v84b1cp6000@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,448921ecbb33be75
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "JED" <nospam@nospam.com>
Subject: Re: InputBox or InputQuery
Newsgroups: borland.public.csharpbuilder.language.csharp
References: <4208bec0$1@newsgroups.borland.com> <42091f36@newsgroups.borland.com> <4209ca4d@newsgroups.borland.com> <xn0dyc0v84b1cp6000@newsgroups.borland.com>
User-Agent: XanaNews/1.17.2.3
Message-ID: <xn0dyc6sy8v8pa009@newsgroups.borland.com>
X-Ref: newsgroups.borland.com ~XNS:000009D9
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 210.50.120.51
Date: 9 Feb 2005 17:26:25 -0800
X-Trace: newsgroups.borland.com 1107998785 210.50.120.51 (9 Feb 2005 17:26:25 -0800)
Lines: 38
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail