473,748 Members | 3,107 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.lab el1.text = "text has changed" 'cjhange the text on the
label of form1
form.parent.pus hbutton_onclick () 'call the click event of pushbutton on
form1

Thanks
Robert

Nov 21 '05 #1
1 909
Double post answered above
Nov 21 '05 #2

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

Similar topics

3
3508
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 read some more again... (suppose controlling an interactive shell program) When I try this with popen family, it just hangs. I have to close one pipe before reading from the other. I know that there is a wonderful thing called Expect, but it's not...
2
1155
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 text box on form1. I know this can be done with global variables, but is there an actual way to pass a variable from one form to another and then back? Thanks
6
12505
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# application. It seems simple enough, but the problem I'm encountering is as follows: In order for the user to select the cell from Excel, they must first click once on the Excel window to give it focus and then their second click is what changes the cell...
3
1645
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. This work fine for most cases, allowing the user to resize the form (and controls within the form. The forms them selves are create dynamically when the user drags a node from a listview to a panel (contained in a Usercontrol which is hosted by...
2
1265
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 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...
5
1275
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 have also been to ACC). .... You've only been registered since February this year ... >You'll also note that many of my posts have been in ACE because of other >people cross-posting habits over the last few years.
3
1452
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 program (for instance a .NET service, or even a client .net application) which is able to intercept this call and deal with the associate information. This middle application might decide whether to send something to IIS or just do everything by itself...
20
1867
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 Commentary: It's not about customers, it's about developers By John C. Dvorak Last Update: 2:44 PM ET Jan 31, 2007
8
1975
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 1. as well as this i want to pass information between the two forms. can any one help thankyou in advance
0
8987
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8826
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9366
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9316
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9241
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4597
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2777
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.