PC Review


Reply
Thread Tools Rate Thread

inputbox for C#

 
 
Melissa
Guest
Posts: n/a
 
      24th Sep 2003
Hello,
Just wondering if there is an equivelant available to C#
for quick string input. I am NOT using vb.net so i cant
use that version.

TIA,
Mel
 
Reply With Quote
 
 
 
 
Deepak
Guest
Posts: n/a
 
      25th Sep 2003
No, there is no Input box in C#. You will have to create
your own.

Regards

Deepak
#*#*#*#*#*#*#*#
I Code, therefore I am

>-----Original Message-----
>Hello,
>Just wondering if there is an equivelant available to C#
>for quick string input. I am NOT using vb.net so i cant
>use that version.
>
>TIA,
>Mel
>.
>

 
Reply With Quote
 
 
 
 
Ying-Shen Yu[MSFT]
Guest
Posts: n/a
 
      25th Sep 2003
Hi Melissa,
The .NET Framework has provided a InputBox for VB.NET. and we can reuse it
in other .NET languages.
You need reference the "Microsoft.VisualBasic.dll" assembly and use it like
this,
string str = Interaction.InputBox("hello:","This is an
InputBox","World!",30,40);
Note, due to C# didn't support the optional value, you need to provide full
params to call the InputBox method.
However, you may define a wrapper method to do this.

Thanks, if you have any further questions , please let me know.

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!

--------------------
| Content-Class: urn:content-classes:message
| From: "Deepak" <(E-Mail Removed)>
| Sender: "Deepak" <(E-Mail Removed)>
| References: <11fd01c382c2$d820f250$(E-Mail Removed)>
| Subject: inputbox for C#
| Date: Wed, 24 Sep 2003 18:32:57 -0700
| Lines: 19
| Message-ID: <102001c38304$f2c217a0$(E-Mail Removed)>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcODBPK/ttPWxplzT5C6I48yAGlvbQ==
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:53060
| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| No, there is no Input box in C#. You will have to create
| your own.
|
| Regards
|
| Deepak
| #*#*#*#*#*#*#*#
| I Code, therefore I am
|
| >-----Original Message-----
| >Hello,
| >Just wondering if there is an equivelant available to C#
| >for quick string input. I am NOT using vb.net so i cant
| >use that version.
| >
| >TIA,
| >Mel
| >.
| >
|

 
Reply With Quote
 
Deepak Kapoor
Guest
Posts: n/a
 
      25th Sep 2003
Hi Ying,
I was under the impression that Microsoft.VisualBasic.dll namespace is
there only to help VB6 programers find things that they so much loved
(such as VbCrlf, Input Box...), the idea still being to use the
framework as much as possible. I also think that this namespace
discourages one to explore many rich features provided by the
framework, thus its use should be discouraged. Personally I don't do
much VB.NET, but whenever I have to, I make sure that I do not include
this namespace.

Just a bit of opinion

Regards

Deepak
#*#*#*#*#*#*#*#*#*#*#*#
I Code, therefore I am




(E-Mail Removed) (Ying-Shen Yu[MSFT]) wrote in message news:<(E-Mail Removed)>...
> Hi Melissa,
> The .NET Framework has provided a InputBox for VB.NET. and we can reuse it
> in other .NET languages.
> You need reference the "Microsoft.VisualBasic.dll" assembly and use it like
> this,
> string str = Interaction.InputBox("hello:","This is an
> InputBox","World!",30,40);
> Note, due to C# didn't support the optional value, you need to provide full
> params to call the InputBox method.
> However, you may define a wrapper method to do this.
>
> Thanks, if you have any further questions , please let me know.
>
> Best regards,
>
> Ying-Shen Yu [MSFT]
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
>
> This posting is provided "AS IS" with no warranties and confers no rights.
> You should not reply this mail directly, "Online" should be removed before
> sending, Thanks!
>
> --------------------
> | Content-Class: urn:content-classes:message
> | From: "Deepak" <(E-Mail Removed)>
> | Sender: "Deepak" <(E-Mail Removed)>
> | References: <11fd01c382c2$d820f250$(E-Mail Removed)>
> | Subject: inputbox for C#
> | Date: Wed, 24 Sep 2003 18:32:57 -0700
> | Lines: 19
> | Message-ID: <102001c38304$f2c217a0$(E-Mail Removed)>
> | MIME-Version: 1.0
> | Content-Type: text/plain;
> | charset="iso-8859-1"
> | Content-Transfer-Encoding: 7bit
> | X-Newsreader: Microsoft CDO for Windows 2000
> | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
> | Thread-Index: AcODBPK/ttPWxplzT5C6I48yAGlvbQ==
> | Newsgroups: microsoft.public.dotnet.framework.windowsforms
> | Path: cpmsftngxa06.phx.gbl
> | Xref: cpmsftngxa06.phx.gbl
> microsoft.public.dotnet.framework.windowsforms:53060
> | NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
> | X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
> |
> | No, there is no Input box in C#. You will have to create
> | your own.
> |
> | Regards
> |
> | Deepak
> | #*#*#*#*#*#*#*#
> | I Code, therefore I am
> |
> | >-----Original Message-----
> | >Hello,
> | >Just wondering if there is an equivelant available to C#
> | >for quick string input. I am NOT using vb.net so i cant
> | >use that version.
> | >
> | >TIA,
> | >Mel
> | >.
> | >
> |

 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      25th Sep 2003
Hello,

"Deepak Kapoor" <(E-Mail Removed)> schrieb:
> I was under the impression that Microsoft.VisualBasic.dll
> namespace is there only to help VB6 programers find things
> that they so much loved (such as VbCrlf, Input Box...),#


No, the Visual Basic .NET Runtime Libarary provides some _shortcuts_ for
classes/methods of the framework that make work easiert to the developer.
Nevertheless the 'InputBox' function is only available in this library and
not in the Framework Class Libarary.

> the idea still being to use the framework as much as possible.


Why not use language-specific "shortcuts"?

> I also think that this namespace discourages one to explore
> many rich features provided by the framework, thus its use should
> be discouraged.


I don't think so. Many things in the 'Microsoft.VisualBasic' namespace are
not directly availabe in the framework.

> Personally I don't do much VB.NET, but whenever I have to,
> I make sure that I do not include this namespace.


ROFL

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inputbox and Application.InputBox Maria Microsoft Excel Programming 1 20th Sep 2004 11:36 AM
InputBox function =?Utf-8?B?TG9yZWU=?= Microsoft Word Document Management 1 9th Jun 2004 10:56 PM
Excel 2000, inputbox repeat Harry Lime Microsoft Excel Discussion 1 11th Feb 2004 06:21 PM
Inputbox Rick Sanderson Microsoft Excel Discussion 2 1st Jan 2004 08:55 PM
Multiple Inputs in a Form (Inputbox) - Checkbox aalwazeer@gistrans.com Microsoft Excel Discussion 1 25th Aug 2003 08:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:08 AM.