473,654 Members | 3,078 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to capture right click ...

38 New Member
Hello ,

I'm doing project in vb 6 and i have a flex grid now i need to right click on the cell of a flexgrid and after right click it should open a msgbox .The problem is what should i write in flxgrid Click event in order to capture right click of the mouse button.
Please halp me with the code..

Thanks in anticipation...
Oct 18 '07 #1
9 2266
kadghar
1,295 Recognized Expert Top Contributor
Hello ,

I'm doing project in vb 6 and i have a flex grid now i need to right click on the cell of a flexgrid and after right click it should open a msgbox .The problem is what should i write in flxgrid Click event in order to capture right click of the mouse button.
Please halp me with the code..

Thanks in anticipation...
In the event mousedown and mouseup you'll have the parameter Button, so if its 1 its the left one, 2 is for the right one.

so just write in any of those events something like:

if button = 2 then msgbox("Hello world")

HTH
Oct 18 '07 #2
sumuka
38 New Member
In the event mousedown and mouseup you'll have the parameter Button, so if its 1 its the left one, 2 is for the right one.

so just write in any of those events something like:

if button = 2 then msgbox("Hello world")

HTH


Thanks 4 replying but im not using any buttons here im using a flexgrid and when the user right clicks on the cells of 3rd column it should open the msgbox.
how should i do this .

Regards,
Oct 19 '07 #3
sumuka
38 New Member
Thanks 4 replying but im not using any buttons here im using a flexgrid and when the user right clicks on the cells of 3rd column it should open the msgbox.
how should i do this .

Regards,

Thank You so much it 's working like anything..
It helped me a lot.
Thanks once again.
Oct 19 '07 #4
Killer42
8,435 Recognized Expert Expert
Thanks 4 replying but im not using any buttons here im using a flexgrid and when the user right clicks on the cells of 3rd column it should open the msgbox.
:) Priceless!

That was "button" as in "mouse button". As in "right mouse button". Which is what you want to detect.

EDIT: Nuts! You were too quick for me. :(
Oct 19 '07 #5
kadghar
1,295 Recognized Expert Top Contributor
All that was too weird for me.

Im glad it helped.
Oct 19 '07 #6
sumuka
38 New Member
All that was too weird for me.

Im glad it helped.

Hello everyone,

I'm able to establish right click but now i need to achieve for left double click . The user has to left double click on the flex grid's cell and the msgbox is to be displayed .
So how can i do this.

Thanks in anticipation,
Oct 22 '07 #7
Killer42
8,435 Recognized Expert Expert
I'm able to establish right click but now i need to achieve for left double click.
You should be able to just use the DoubleClick event.
Oct 22 '07 #8
sumuka
38 New Member
You should be able to just use the DoubleClick event.


Thanks a lot it's Working...
Thank you so much
Oct 23 '07 #9
Killer42
8,435 Recognized Expert Expert
Thanks a lot it's Working...
Thank you so much
Glad we could help. :)
Oct 23 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
415
by: Madestro | last post by:
Hi guys, I have a little problem. I have a class that uses Windows API to capture a snapshot of the screen. I have this class in a library that I include in my projects. When I try to use this class in a windows service, the snapshot comes up as a black screen. Any idea why? or how do I get around it? The class works fine if I use it in a regular windows forms application.
1
14697
by: Sakharam Phapale | last post by:
Hi All, How to capture Mouse Single click and mouse double click event on Commnad Button. I am doing as follows. Private void Button1_MouseUp(Object sender, System.Windows.Forms.MouseEventArgs e) {
5
3121
by: ewillyb | last post by:
Hi, ASP.NET has some interesting behavior when the user hits the Enter key. If there are multiple ASP:Buttons (rendered as HTML submits) on the form, when the user hits enter, the first button's click event will fire and the page will submit. I have a series of pages with Previous and Next navigational Btns. The Previous button is the first button, so when the user hits enter, the previous page is served up. Enter should result in...
8
2572
by: Ken Sturgeon | last post by:
I have a button inside a panel control. Apparently I can't expect VB to respond to the button's _Click event. How do I capture the click event? Thanks Ken
7
5589
by: Lit | last post by:
Hi, How can I capture the vertical scroll bar position for a Listbox. I have a Listbox of 100 items + when I click on it I post back remove the item selected. After returning to the client browser the list box scroll position is at the top.
11
7370
by: Randy | last post by:
I have a MonthCalendar on one of my forms. I have disovered that the DateChanged event is triggered not only when the user clicks on a new date, but also if they click on the Previous or Next Month arrows (meaning they click on either of the left or right pointing arrows in the top corner). If the user changes the month, it messes up some of the date logic that I have in the DateChanged event. Does anybody know how I can capture this...
3
2488
by: dolittle | last post by:
Hi, I want to create a screen capture using java. I'm new to java and I'm overwhelmed by the so many terms: SE, EE, FX, Swing... I saw a nice product written in java that let you start the Java program from the website (java web start) and then it sits in your system tray. When you right click on it you see several capture options: full screen, area, window... After you capture it opens a window with your screen capture and you can...
6
3244
by: Don | last post by:
How can I capture the name of the file a user right clicks in the open file dialog using the common dialog box control? I can capture the name if a file is double clicked, or OPEN is clicked after selecting a file, or CANCEL clicked, but if they choose to right click on a file and choose OPEN WITH option, then I can't seem to get the name of the file they selected. Don
5
3155
by: vasilis | last post by:
I have a list box in a site with which I capture a selected value with the onChange event using the capture_value() function (code listed below). This function passes 2 arguments, i.e., 'str' which is the selected list box value and 'passed_url' which is a passed url for running a php script (which contains some url query parameters, e.g. 'somescript.php?var1=value1&var2=value2&var3=value3'). The capture_value() function actually sends a...
0
8814
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8475
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
8591
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
7304
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5621
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
4149
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
4293
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1915
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1592
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.