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

How to apply a mouse click via code to a control?


How do I programatically apply a click to a particular row and column
0 of a datagrid?

I want to do this in code as if the user did a mouse click on the
leftmost column.

-----------------------------------------------------------
Gary Kahrau
ka****@monair.com
-----------------------------------------------------------
Nov 21 '05 #1
3 1247
Why not just place the code you have in the click event into a Subroutine or
Function? That way you could call the function from the click event and from
a mouse up event on the leftmost column.

I'm assuming you can code up mouse events on datagrids. I don't use data
grids so I could be wrong.

"Gary Kahrau" wrote:

How do I programatically apply a click to a particular row and column
0 of a datagrid?

I want to do this in code as if the user did a mouse click on the
leftmost column.

-----------------------------------------------------------
Gary Kahrau
ka****@monair.com
-----------------------------------------------------------

Nov 21 '05 #2
Half of that is what I was planning to do. I do plan to place the code
in a sub. However, I guess it is what you are used to. In the 4GL I
work with, applying a mouse click is common.
I will have to read up on selecting a datagrid row via code, then
calling the subroutine.
On Tue, 1 Mar 2005 16:13:01 -0800, "ocertain"
<oc******@discussions.microsoft.com> wrote:
Why not just place the code you have in the click event into a Subroutine or
Function? That way you could call the function from the click event and from
a mouse up event on the leftmost column.

I'm assuming you can code up mouse events on datagrids. I don't use data
grids so I could be wrong.

"Gary Kahrau" wrote:

How do I programatically apply a click to a particular row and column
0 of a datagrid?

I want to do this in code as if the user did a mouse click on the
leftmost column.

-----------------------------------------------------------
Gary Kahrau
ka****@monair.com
-----------------------------------------------------------


-----------------------------------------------------------
Gary Kahrau - VP
ka****@monair.com (W)
Stellex Monitor Aerospace Corp.
-----------------------------------------------------------
Nov 21 '05 #3
LOL! Too many hours at work! You should just iqnore me. After re-reading
your request I realized that I completely miss-understood you. I thought you
had a Button click enent that you wanted to clikc programatically. Sorry ...

To progamatically add a click you need to code an event and, as I stated
below, I don't know what events are available for datagrids.

"ocertain" wrote:
Why not just place the code you have in the click event into a Subroutine or
Function? That way you could call the function from the click event and from
a mouse up event on the leftmost column.

I'm assuming you can code up mouse events on datagrids. I don't use data
grids so I could be wrong.

"Gary Kahrau" wrote:

How do I programatically apply a click to a particular row and column
0 of a datagrid?

I want to do this in code as if the user did a mouse click on the
leftmost column.

-----------------------------------------------------------
Gary Kahrau
ka****@monair.com
-----------------------------------------------------------

Nov 21 '05 #4

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

Similar topics

1
by: Zaidan | last post by:
I am running Excel2000 under WIN98 2nd edition, and I am writing a VBA code (I will consider using javascript if I have to) that does the following, at the user command: 1- Start MS Explorer and...
2
by: Serge | last post by:
Hi, in my windows.forms application I have added a goupBox control to my windows.form. Now I want to know the x,y-position from the mouse cursor when I click on the groupBox. The strange thing...
3
by: jcrouse | last post by:
I have created a form designer type application (with a lot of you peoples helpJ). It has label controls that are draggable at runtime. The user is also allowed to change some properties such as...
24
by: aam | last post by:
hi, im trying to figure out how i can program the mouse to automatically click on a button of a web page that i'm viewing.i do not have control over the page.i would also like to set up an...
7
by: RobKinney1 | last post by:
The subject line sounds a little funny, let me quickly explain: I have created a custom control using ComboBox. But inside my class, I need to know when the user does NOT click my control. Of...
0
by: mmcd79 | last post by:
I'm wondering if anyone else is having this issue. It's driving me batty. It seems my mouse wants to "double click" on items when I'm just doing a single click. I thought it was the mouse so I...
4
by: Pucca | last post by:
How can I tell a mouse right clicks over a listview item that's in a container panel. I only want to display a popup menu if the user right click the mouse over an item on the Listview. I don't...
3
by: Ryan McFall | last post by:
Hi: I am trying to write a short program that demonstrates switching between two different event handlers when a mouse click occurs. Here's the relevant code: public delegate void...
5
by: moonie | last post by:
I have an msn style c# windows application with a form and panel on it. A news list is drawn from the database and dynamically added via labels, link lables during form loading. In this...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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: 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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.