3 Replies - 407 Views - Last Post: 30 March 2013 - 09:30 AM Rate Topic: -----

#1 fatihmert  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 25
  • Joined: 04-March 12

How to select a textbox in one form from a different form?

Posted 30 March 2013 - 05:14 AM

Hi guys, It's me again :)

Form1 objects -> just textbox and button controll.
Form1->textbox text select with button click to Form2 open.
Opens, closes Form2 to Form1->textbox->select text is deselect.

I wouldn't Form2 opened , Form1->textbox->select text is deselect.
I want Form2 opened, Form1->textbox->select text still select text.

How I do this?

Thank you for interest..
Good works..

Is This A Good Question/Topic? 0
  • +

Replies To: How to select a textbox in one form from a different form?

#2 tlhIn`toq  Icon User is online

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5316
  • View blog
  • Posts: 11,357
  • Joined: 02-June 10

Re: How to select a textbox in one form from a different form?

Posted 30 March 2013 - 06:16 AM

Q: ...get Form/class 'A' to make a change or talk to Form/class 'B'

NOTE: Don't try to access GUI controls across forms. Its wrong. Nobody will hire you if you do this sort of crap. It violates every guideline for 'black box' programming, Separation of Responsibility, loose binding of components, and event driven programming. Read the tutorials and learn to do it right the first time so you don't develop bad habits that you just have to un-learn later.
A:
Was This Post Helpful? 0
  • +
  • -

#3 fatihmert  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 25
  • Joined: 04-March 12

Re: How to select a textbox in one form from a different form?

Posted 30 March 2013 - 09:19 AM

I think, I could not tell.

After selecting text in Form1.textbox Form2 is opened with the help of a button, Form1.textbox in the selected text, It can now not selected.

I have to beat. Because, I apply the commands from within Form2, Affect the selected text in Form1.textbox.

You know?

Thank you for interest..
Good works..
Was This Post Helpful? -1
  • +
  • -

#4 tlhIn`toq  Icon User is online

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5316
  • View blog
  • Posts: 11,357
  • Joined: 02-June 10

Re: How to select a textbox in one form from a different form?

Posted 30 March 2013 - 09:30 AM

Quote

Because, I apply the commands from within Form2, Affect the selected text in Form1.textbox.

This is a HORRIBLE coding and design practice. As already stated in the earlier advice: NEVER DO THIS.

You need to work the tutorials that show you how to do this right.
If you're not interested in learning the right way, then don't ask for advice you're going to ignore.
http://www.dreaminco...ny-other-forms/
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1