By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,499 Members | 1,751 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,499 IT Pros & Developers. It's quick & easy.

VB InputBox

P: n/a

Hi,

What can I use for the equivalent VB InputBox to get a string from the user?

thanks,
Mori
Nov 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Thanks Nicholas but I'm trying to do without using the VisualBasic.dll if
possible.

Mori
"Nicholas Paldino [.NET/C# MVP]" <ni**************@exisconsulting.com> wrote
in message news:Oo**************@TK2MSFTNGP11.phx.gbl...
Mori,

You can set a reference to Microsoft.VisualBasic.dll and then call the
static InputBox method on the Interaction class in the Microsoft.VisualBasic namespace.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Mori" <mo**@design-paradigm.co.uk> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...

Hi,

What can I use for the equivalent VB InputBox to get a string from the

user?

thanks,
Mori


Nov 13 '05 #2

P: n/a
Mori,

Then you will have to create your own form and handle the input
yourself.

I'm curious, why are you trying to avoid it? It's managed code, and it
is distributed with the runtime, so it is guaranteed to be there.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Mori" <mo**@design-paradigm.co.uk> wrote in message
news:ei****************@TK2MSFTNGP11.phx.gbl...
Thanks Nicholas but I'm trying to do without using the VisualBasic.dll if
possible.

Mori
"Nicholas Paldino [.NET/C# MVP]" <ni**************@exisconsulting.com> wrote in message news:Oo**************@TK2MSFTNGP11.phx.gbl...
Mori,

You can set a reference to Microsoft.VisualBasic.dll and then call the static InputBox method on the Interaction class in the

Microsoft.VisualBasic
namespace.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Mori" <mo**@design-paradigm.co.uk> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...

Hi,

What can I use for the equivalent VB InputBox to get a string from the

user?

thanks,
Mori



Nov 13 '05 #3

P: n/a
I'm using all .NET components in my (first) C# application and I don't want
to have to rely on any old dlls to shortcut any problems. I know it is code
that is already written and tested but because I'm learning a new language
and environment, I'm making every effort to stick to it.

I'll write my own form to do the job. Any ideas how I stop the code from
running whilst the user types in his/her input and presses the OK button.
eg.
..
..
..lines of code

result = MyNewInputForm("Input some info please");
..
..Carry on with program
..
..

Thanks
Mori

"Nicholas Paldino [.NET/C# MVP]" <ni**************@exisconsulting.com> wrote
in message news:eQ**************@TK2MSFTNGP10.phx.gbl...
Mori,

Then you will have to create your own form and handle the input
yourself.

I'm curious, why are you trying to avoid it? It's managed code, and it is distributed with the runtime, so it is guaranteed to be there.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Mori" <mo**@design-paradigm.co.uk> wrote in message
news:ei****************@TK2MSFTNGP11.phx.gbl...
Thanks Nicholas but I'm trying to do without using the VisualBasic.dll if
possible.

Mori
"Nicholas Paldino [.NET/C# MVP]" <ni**************@exisconsulting.com>

wrote
in message news:Oo**************@TK2MSFTNGP11.phx.gbl...
Mori,

You can set a reference to Microsoft.VisualBasic.dll and then call

the static InputBox method on the Interaction class in the

Microsoft.VisualBasic
namespace.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Mori" <mo**@design-paradigm.co.uk> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
>
> Hi,
>
> What can I use for the equivalent VB InputBox to get a string from the user?
>
> thanks,
> Mori
>
>



Nov 13 '05 #4

P: n/a
It's OK, I've done it, I wrote a Show() method that returns a value.

Thank,
Mori
"Mori" <mo**@design-paradigm.co.uk> wrote in message
news:O3**************@TK2MSFTNGP10.phx.gbl...
I'm using all .NET components in my (first) C# application and I don't want to have to rely on any old dlls to shortcut any problems. I know it is code that is already written and tested but because I'm learning a new language
and environment, I'm making every effort to stick to it.

I'll write my own form to do the job. Any ideas how I stop the code from
running whilst the user types in his/her input and presses the OK button.
eg.
.
.
.lines of code

result = MyNewInputForm("Input some info please");
.
.Carry on with program
.
.

Thanks
Mori

"Nicholas Paldino [.NET/C# MVP]" <ni**************@exisconsulting.com> wrote in message news:eQ**************@TK2MSFTNGP10.phx.gbl...
Mori,

Then you will have to create your own form and handle the input
yourself.

I'm curious, why are you trying to avoid it? It's managed code, and

it
is distributed with the runtime, so it is guaranteed to be there.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Mori" <mo**@design-paradigm.co.uk> wrote in message
news:ei****************@TK2MSFTNGP11.phx.gbl...
Thanks Nicholas but I'm trying to do without using the VisualBasic.dll if possible.

Mori
"Nicholas Paldino [.NET/C# MVP]" <ni**************@exisconsulting.com>

wrote
in message news:Oo**************@TK2MSFTNGP11.phx.gbl...
> Mori,
>
> You can set a reference to Microsoft.VisualBasic.dll and then
call
the
> static InputBox method on the Interaction class in the
Microsoft.VisualBasic
> namespace.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - ni**************@exisconsulting.com
>
> "Mori" <mo**@design-paradigm.co.uk> wrote in message
> news:%2****************@TK2MSFTNGP12.phx.gbl...
> >
> > Hi,
> >
> > What can I use for the equivalent VB InputBox to get a string from

the > user?
> >
> > thanks,
> > Mori
> >
> >
>
>



Nov 13 '05 #5

P: n/a
System.Windows.Forms.TextBox

"Mori" <mo**@design-paradigm.co.uk> wrote in message news:<#Q**************@TK2MSFTNGP12.phx.gbl>...
Hi,

What can I use for the equivalent VB InputBox to get a string from the user?

thanks,
Mori

Nov 13 '05 #6

P: n/a
guy
scared of VB? surely not :-)

we are all doing lots of learning - but its worth it!

good luck

guy
-----Original Message-----
Yep, I would have used it without question. Sorry for my ignorance chaps, itwas just the name that scared me away. I will have a rethink (and perhaps alittle study).

Thanks for your knowledge.
Mori
"guy" <gu********************@hotmail.com> wrote in messagenews:09****************************@phx.gbl...
Microsoft.VisualBasic.dll is just a name.
If it was called Microsoft.Utilities.dll you would you use it wouldnt you ;-)

guy

>-----Original Message-----
>I'm using all .NET components in my (first) C#

application and I don't want
>to have to rely on any old dlls to shortcut any problems.
I know it is code
>that is already written and tested but because I'm

learning a new language
>and environment, I'm making every effort to stick to
it. >
>I'll write my own form to do the job. Any ideas how I

stop the code fro
>running whilst the user types in his/her input and

presses the OK button.
>eg.
>..
>..
>..lines of code
>
>result = MyNewInputForm("Input some info please");
>..
>..Carry on with program
>..
>..
>
>Thanks
>Mori
>
>"Nicholas Paldino [.NET/C# MVP]"

<ni**************@exisconsulting.com> wrote
>in message news:eQ**************@TK2MSFTNGP10.phx.gbl... >> Mori,
>>
>> Then you will have to create your own form and

handle the input
>> yourself.
>>
>> I'm curious, why are you trying to avoid it? It's managed code, and
>it
>> is distributed with the runtime, so it is guaranteed
to be there.
>>
>>
>> --
>> - Nicholas Paldino [.NET/C# MVP]
>> - ni**************@exisconsulting.com
>>
>> "Mori" <mo**@design-paradigm.co.uk> wrote in message
>> news:ei****************@TK2MSFTNGP11.phx.gbl...
>> > Thanks Nicholas but I'm trying to do without using

the VisualBasic.dll
>if
>> > possible.
>> >
>> > Mori
>> >
>> >
>> > "Nicholas Paldino [.NET/C# MVP]"

<ni**************@exisconsulting.com>
>> wrote
>> > in message

news:Oo**************@TK2MSFTNGP11.phx.gbl...
>> > > Mori,
>> > >
>> > > You can set a reference to

Microsoft.VisualBasic.dll and then call
>> the
>> > > static InputBox method on the Interaction class
in the
>> > Microsoft.VisualBasic
>> > > namespace.
>> > >
>> > > Hope this helps.
>> > >
>> > >
>> > > --
>> > > - Nicholas Paldino [.NET/C# MVP]
>> > > -
ni**************@exisconsulting.com >> > >
>> > > "Mori" <mo**@design-paradigm.co.uk> wrote in message >> > > news:%2****************@TK2MSFTNGP12.phx.gbl...
>> > > >
>> > > > Hi,
>> > > >
>> > > > What can I use for the equivalent VB InputBox

to get a string from
>the
>> > > user?
>> > > >
>> > > > thanks,
>> > > > Mori
>> > > >
>> > > >
>> > >
>> > >
>> >
>> >
>>
>>
>
>
>.
>

.

Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.