How I use TextBox.GetLineText() method (this is a .Net Framework 3.5new feature) ?

J

jc

I create a new project, and I confirme the current project is for .Net
Framework 3.5, but why TextBox is still 2.0?

Ex: .Net Framework 3.5 new features, such as TextBox.GetLineText no
way to use!

Manual keyin "TextBox1.GetLineText(...)", IDE is also to determine the
syntax error : (

Anybody have similar problem?


My development environment:
Windows XP SP3
Visual C # 2008 Express SP1
.. Net Framework 3.5
 
F

Family Tree Mike

jc said:
I create a new project, and I confirme the current project is for .Net
Framework 3.5, but why TextBox is still 2.0?

Ex: .Net Framework 3.5 new features, such as TextBox.GetLineText no
way to use!

Manual keyin "TextBox1.GetLineText(...)", IDE is also to determine the
syntax error : (

Anybody have similar problem?


My development environment:
Windows XP SP3
Visual C # 2008 Express SP1
. Net Framework 3.5

I don't know why it doesn't work, and it does not work for me either.
It appears to be the equivalent of TextBox1.Lines [idx], and I have
always used that. "idx" is the line number, zero based.
 
F

Family Tree Mike

Family said:
jc said:
I create a new project, and I confirme the current project is for .Net
Framework 3.5, but why TextBox is still 2.0?

Ex: .Net Framework 3.5 new features, such as TextBox.GetLineText no
way to use!

Manual keyin "TextBox1.GetLineText(...)", IDE is also to determine the
syntax error : (

Anybody have similar problem?


My development environment:
Windows XP SP3
Visual C # 2008 Express SP1
. Net Framework 3.5

I don't know why it doesn't work, and it does not work for me either. It
appears to be the equivalent of TextBox1.Lines [idx], and I have always
used that. "idx" is the line number, zero based.

I just realized that GetLineText() is available in WPF applications, not
windows forms applications. If you are not using WPF, then the
equivalent is as I said, Textbox1.Lines [...].
 
J

jc

I don't know why it doesn't work, and it does not work for me either. It
appears to be the equivalent of TextBox1.Lines [idx], and I have always
used that.  "idx" is the line number, zero based.

I just realized that GetLineText() is available in WPF applications, not
windows forms applications.  If you are not using WPF, then the
equivalent is as I said, Textbox1.Lines [...].


So , For .Net Framework 3.5 , Better to use WPF Application than
WindowsForm Application ?

However, WPF projects has few item in toolbox!! :(
 
P

PvdG42

jc said:
So , For .Net Framework 3.5 , Better to use WPF Application than
WindowsForm Application ?

However, WPF projects has few item in toolbox!! :(
It depends on what you need/want. Mike has shown you how to get the
equivalent functionality in a WinForms app, so why not use that? WinForms is
old/mature/feature rich (depending on how you'd like to describe it), while
WPF is new/immature/etc. with more features/controls to come (IMHO). Taking
a "glass half full" approach is less stressful :)
 
J

jc

It depends on what you need/want. Mike has shown you how to get the
equivalent functionality in a WinForms app, so why not use that? WinFormsis
old/mature/feature rich (depending on how you'd like to describe it), while
WPF is new/immature/etc. with more features/controls to come (IMHO). Taking
a "glass half full" approach is less stressful :)

Ah, I understand. I will Careful consideration!
Thanks.
 
F

Fred Mellender

I found WPF to have a steep learning curve. The WPF UI designer that came
with VS 2008 was much less capable than the one for Forms, IMHO, both in
layout and in the toolbox of UI elements. I found myself writing a lot of
XML by hand. Maybe this has improved with VS2010 (I have no experience with
that).

You can certainly do things with WPF you cannot do with Forms, however.
 
F

Family Tree Mike

Michael said:
What is the current feeling here as to whether we should, in general, be
hastening toward WPF or lagging behind with good old Forms?

Our small group at work has not adopted it for several reasons. One
customer will not migrate beyond .Net 2.0. For other projects, there is
a steep learning curve for (to us) no perceived benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top