473,398 Members | 2,393 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,398 software developers and data experts.

Trigger On Click Event of a button from another form.

Hi
I would like to be able to trigger the "on click event" of a button
from the code within a different form. Does anyone know if this is
possible and if so how.

TIA
Andrew
Feb 6 '08 #1
2 27229
On Wed, 6 Feb 2008 10:42:59 -0800 (PST), An****@2bsystems.co.uk wrote:
Hi
I would like to be able to trigger the "on click event" of a button
from the code within a different form. Does anyone know if this is
possible and if so how.

TIA

Andrew
First make sure the sub procedure is set to Public (not Private).

To call it from another form:
Call Forms("NameOfForm").CommandName_Click

Both forms must be open.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Feb 6 '08 #2
On 6 Feb, 21:19, fredg <fgutk...@example.invalidwrote:
On Wed, 6 Feb 2008 10:42:59 -0800 (PST), And...@2bsystems.co.uk wrote:
Hi
I would like to be able totriggerthe "onclickevent" of a button
from the code within a different form. Does anyone know if this is
possible and if so how.
TIA
Andrew

First make sure the sub procedure is set to Public (not Private).

To call it from another form:
Call Forms("NameOfForm").CommandName_Click

Both forms must be open.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Hi Fred
Thanks you for that, it works on 2 separate forms, however one of my
forms requires me to trigger it on a sub form, I have tried the
obvious which fails:

forms!frm1!frm1_Sub.event

TIA
Andrew
do you know how to
Feb 7 '08 #3

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

Similar topics

3
by: Cary Linkfield | last post by:
I have a standard form I use. It inherits from Windows.Forms.Form. I usually add a Cancel button the form in the designer. I want to raise the Cancel button's Click event when the user presses...
1
by: sachin | last post by:
How to check Maximize button click event of a Form or how to check whether present size of form is maximum available size
2
by: ital1 | last post by:
Hi I have created one form that has an event handler, coded in the following lines : (ON FORM1 : Picture Boxes, when clicked they fire events) this.OnPADClick += new...
2
by: eveready | last post by:
Hello I have two forms - a start form running in the background and a content form in the foreground. When a timer fires on the start form, I need to fire the click event for a button on the...
6
by: romy | last post by:
Hi I have two .NET applications that run together on the same local PC. I have a situation, that when I click a button on the first application, I need to trigger an event for the second...
1
by: bradw2k | last post by:
I have one frame that needs to cause a button click event on another frame. I was trying to do this by putting a display:none LinkButton on the target frame, and having a javascript on that page...
2
by: Chu | last post by:
Thanks everyone for taking a moment to read this. I've got a page where I use a LinkButton and I wire up a dynamic event to the button. When the user clicks the button, the event is fired as...
4
by: LyzH | last post by:
Someone else had a question on how to emulate a mouse click. I tried posting in that thread but I have something of a twist on this problem and I'm really in trouble here! If I don't get help...
8
by: hoofbeats95 | last post by:
I don't think this should be this complicated, but I can't figure it out. I've worked with C# for several years now, but in a web environment, not with windows form. I have a form with a query...
5
by: =?Utf-8?B?Umljaw==?= | last post by:
I have a form FormA with a button Button1; I use SetParent(FormB.Handle, this.Handle) to load FormB inside FormA. FormB also has a button Button1 which displays a messagebox. When Button1 is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.