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

talking to forms

HI all,

New to vb.net
I need to know how to talk to a calling form from a called form. I want to
change various properties of the form as well as properties of objects on
that form, Ie pushbuttons texts, label texts etx. I also need to be able to
call som of the objects on the calling forms events, eg to be able to call a
pushbuttons click event on the calling form.
The calling form is not a mdiparent, the called form is not a mdi client,
they are just two seperate forms
form1 opens
pushbutton on form2 creats a object reference to form2
opens form2
on form2 a pushbutton changes text on a label on form one
and then callus a pushbutton click event on form1

In visual dbase I wouild do it like this

'''form1''
set procedure to form2.wfm addi 'load the form in memory
form.ochildform = new form2() 'create a new object in this form
referencing the new form
form.ochildform.parent = form 'reference this form from the other form

pushbutton onclick()
form.ochildform.open() 'open the new form

'''form2''
form.parent.label1.text = "text has changed" 'cjhange the text on the
label of form1
form.parent.pushbutton_onclick() 'call the click event of pushbutton on
form1

Thanks
Robert


Nov 21 '05 #1
2 1253
> New to vb.net...
<snip>

Http://www.mvps.org/EDais/DotNet/
Hope this helps,

Mike
- Microsoft Visual Basic MVP -
E-Mail: ED***@mvps.org
WWW: Http://www.mvps.org/EDais/
Nov 21 '05 #2
Robert,

Have a look at this resource kit, I assume that it will bring you directly
on the right track,

VB.net Resource kit
http://msdn.microsoft.com/vbasic/vbrkit/default.aspx

And if you have problems installing the resource kit
http://msdn.microsoft.com/vbasic/vbr...q/#installvdir

Another resource for learning is the Quick Starts
http://samples.gotdotnet.com/quickstart/

I hope this helps a little bit?

Cor


"Robert Bravery" <me@u.com>

New to vb.net
I need to know how to talk to a calling form from a called form. I want to
change various properties of the form as well as properties of objects on
that form, Ie pushbuttons texts, label texts etx. I also need to be able to call som of the objects on the calling forms events, eg to be able to call a pushbuttons click event on the calling form.
The calling form is not a mdiparent, the called form is not a mdi client,
they are just two seperate forms
form1 opens
pushbutton on form2 creats a object reference to form2
opens form2
on form2 a pushbutton changes text on a label on form one
and then callus a pushbutton click event on form1

In visual dbase I wouild do it like this

'''form1''
set procedure to form2.wfm addi 'load the form in memory
form.ochildform = new form2() 'create a new object in this form
referencing the new form
form.ochildform.parent = form 'reference this form from the other form

pushbutton onclick()
form.ochildform.open() 'open the new form

'''form2''
form.parent.label1.text = "text has changed" 'cjhange the text on the
label of form1
form.parent.pushbutton_onclick() 'call the click event of pushbutton on
form1

Thanks
Robert


Nov 21 '05 #3

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

Similar topics

3
by: Jane Austine | last post by:
I need to control a command line program via python. I first tried popen2 and 3 but I couldn't find a way to talk to the subprocess interactively; that is, read some and then write some, and...
2
by: Enterprise | last post by:
Hi, I need to pass information between forms. i.e. a button is clicked on one form1, form2 opens and has access to the contents of a text box of form1. Then when the form2 closes it updates the...
6
by: Matthew Wieder | last post by:
I have the following requirements: Build a stand-alone C# application that asks the user to click in a cell in an Excel spreadsheet, and then displays the address of that cell in the C#...
3
by: Lloyd Sheen | last post by:
I have the following situation: Need a user resizable user control. After much trying with user control I came across the idea of hosting the controls in a form marked as not TopLevel = false. ...
1
by: Robert Bravery | last post by:
HI all, New to vb.net I need to know how to talk to a calling form from a called form. I want to change various properties of the form as well as properties of objects on that form, Ie...
5
by: Jenny Stove | last post by:
The poster calling himself 'Br@dley' trolled into David Matthieu's thread and claimed: >I certainly do know may of the regulars in ACC as I've been here >for a few years (and those in ACE who...
3
by: pamelafluente | last post by:
I am new to asp.net. I have an asp page with a submit button which sends out some information. Instead of having IIS to respond and deal with this information, I would like to have a .NET...
20
by: raylopez99 | last post by:
Dvorak is always interesting, albeit speculative. What hidden gem has he found in Vista that helps developers? It can't be .NET/CLI, that's been out forever. RL Vista rollout hides reality...
8
by: lBalal | last post by:
Hi all I am using netbeans to make my hci. now in my form1 i have a button that when pressed takes me to form2 (class2) on form2 i want to press a button to change the color of button in form...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.