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

Input Box in C#

Hi!
I want to prompt the user an inoput box and get the result in a variable
I know how to do this in VB but how do i do it in c#.

Regards,
Abhishek
Nov 16 '05 #1
5 18983
There's no InputBox API in C#. You can create a new form with a TextBox in
it and use ShowDialog() API to show it.

-vJ

"Abhishek" <ab******@alwayshelpful.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi!
I want to prompt the user an inoput box and get the result in a variable
I know how to do this in VB but how do i do it in c#.

Regards,
Abhishek

Nov 16 '05 #2
Abhishek,

There is no problem to set a reference in C# to the Microsoft.VisualBasic
namespace in the same way as any other namespace.

You can than use C# with the members from that Microsoft.VisualBasic
namespace.

If you want that is up to you, I would do that only in rare places where I
have not a better alternative.

I hope this gives an idea.

Cor
Nov 16 '05 #3

Thanks folks
But it just seams strange on part of MS not to include it in C#
anyways i know the workarounds but just wanted to know if there is InputBox
in c#
Thanks again

abhishek
Nov 16 '05 #4
Well, one team in Microsoft wrote the .Net Framework, include everything
they though it needed.

Then another team at MS was charged with taking that, and using it to
simulate the VB6 experience as best they could in VB.Net. So, VB has a
collection of methods not automatically included in other languages.

"Abhishek" <ab******@alwayshelpful.com> wrote in message
news:et**************@tk2msftngp13.phx.gbl...

Thanks folks
But it just seams strange on part of MS not to include it in C#
anyways i know the workarounds but just wanted to know if there is InputBox in c#

Nov 16 '05 #5
This seems to be the kind of thing I would expect to be different in
c# vs. vb.net. VB has the tradition of being easier for a
non-programmer to work with. Therefore, prewritten input boxes are a
good thing for vb. I guess the folks at ms figured c# developers would
usually want more control over the presentation and function. What I
do not understand is compiler/editor (studio) differences. VB seems to
be better at picking up errors before compile time, yet does not have
an unreachable code warning. Those things seem language independent.
I would like to see base visual studio behavior be a little more
consistent

-Dan

Nov 16 '05 #6

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

Similar topics

0
by: gotcha | last post by:
I have a little code to add multiple items to a shopping cart based page. This code works perfect, but it adds all of the info to the same input fields every time it loops. I need it to change...
3
by: david | last post by:
HI! Im trying to make "HTML form" into automatic. 1. If I get 18 numbers like: A B C D E F . . . . 2. How can I put those 18 numbers automatically into 6 numbers format like: A B C D E F
2
by: SophistiCat | last post by:
Hi, I am working on a computational program that has to read a number of parameters (~50) from an input file. The program contains a single class hierarchy with about a dozen member-classes or...
2
by: Cranky | last post by:
Ok, here is my scenario: I need to input numbers using my handheld IPAQ. I figured out how to create an online numeric keypad for inputting numbers into an input field, what I need to know is how...
3
by: acecraig100 | last post by:
I am fairly new to Javascript. I have a form that users fill out to enter an animal to exhibit at a fair. Because we have no way of knowing, how many animals a user may enter, I created a table...
3
by: cbradio | last post by:
Hi, I am having trouble developing a form in a restricted environment. My sample code is found below my message (sorry I don't have a URL). Basically, without a doctype, the form displays properly...
18
by: Diogenes | last post by:
Hi All; I, like others, have been frustrated with designing forms that look and flow the same in both IE and Firefox. They simply did not scale the same. I have discovered, to my chagrin,...
13
by: cront | last post by:
I have a problem to work on: we will ask user to input anything and we will put that back onto the standard output with all set of brackets removed. We will not remove any single bracket e.g. ...
1
by: tcertain | last post by:
I am totally duh at javascript although I have 2 books trying to learn it. I am trying to add values to a form and have a calculate total at end. this is my form script. I have hours at end of...
1
by: printline | last post by:
Hello All I'm quite new to xml vs. PHP, so i hope someone can help with an issue i have been struggeling with. I have an html form, that when submitted, it should create an xml file, and save...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.