I'm doing a program and part of it is to have a text box and a button which when you type text into the textbox and press the button the the information goes to the last form. I have a bit of coding for this which is:
Form8.Amount.Items.Add("")
Amount is the textbox which is on the last form. Usually in the ("") writing goes in but i want it so if you write within it the text shows at the last form..
could anybody help with what im missing with the brackets or if they shouldnt even be there, it would be much appreciated!
Visual basic problem
Page 1 of 12 Replies - 479 Views - Last Post: 06 November 2012 - 01:01 PM
Replies To: Visual basic problem
#2
Re: Visual basic problem
Posted 06 November 2012 - 12:32 PM
1) Please try to give your posts meaningful titles. "Problem" in a help forum is pretty meaningless.
2) "could anybody help with what im missing with the brackets "
Brackets? What brackets? You don't have any brackets in your code.
3) I'm not sure why you are doing this in ancient VB6... But maybe one of these tutorials for more modern .NET will help. At the very least the concepts of form-to-form communication my help get you away from bad design planning.
Q: ...get Form 'A' to make a change or talk to Form '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:
2) "could anybody help with what im missing with the brackets "
Brackets? What brackets? You don't have any brackets in your code.
3) I'm not sure why you are doing this in ancient VB6... But maybe one of these tutorials for more modern .NET will help. At the very least the concepts of form-to-form communication my help get you away from bad design planning.
Q: ...get Form 'A' to make a change or talk to Form '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:
- See this thread for the simplest of example code between two forms.
The tutorials below actually teach and explain it further. - Passing values between forms/classes
- Bulding an application - Part 1
- Building an application - Part 2
- Quick and easy custom events
- Delegates, Lambdas and Events
- http://www.codeproje...g-Windows-Forms
#3
Re: Visual basic problem
Posted 06 November 2012 - 01:01 PM
Thank you for your advice, I will take this into considerations. I've never used this forum until recently, so as expected I didnt know. I will watch the tutorials and hopefully figure it out myself like I did the rest. Thanks for the help.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|