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

PictureBox with shortcut possible?

My Windows Form (VB2005) contains PictureBox on it. This PictureBox has
click-event in use to do something. Now I need to know Is it possible to
set Shortcut for this PictureBox? I mean if user clicks for example "F2"
then it fires PictureBox_Click-event.

--
Thanks in advance!

Mika
May 18 '06 #1
1 1612
hi Mika

There is no way to be trace key press event with picture box but we
can handle it by another method.

You can do it by this method

Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles PictureBox1.Click
MessageBox.Show("Hello")
End Sub

Private Sub Form5_KeyUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp
If e.KeyCode.F2 Then
PictureBox1_Click(sender, e)
End If
End Sub

May 19 '06 #2

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

Similar topics

0
by: Stephen Williams | last post by:
Does Microsoft have a comment the possible bug on the PictureBox Class. Here is the exchange I had on the Experts-Exchange regarding this issue: From Z_Beeblebrox: Hi, I believe it is...
27
by: aa | last post by:
Thought this question might be out of this NG's scope, there are always knowledgable people who might hava an answer. A hyperlink to a shortcut to a file returnes an empty screen, and the source...
2
by: Daniel | last post by:
Hi all, Is it possible to output the contents of a panel as a graphic file? -- Daniel MCSE, MCP+I, MCP in Windows 2000/NT --------------------------------------
7
by: kebalex | last post by:
Hi, I have an app (written in .NET 2.0) which updates a picturebox according to some user input (a slider control). when the user makes a change i loop through all of the pixels, do a...
5
by: toby | last post by:
Hi there, Is it possible to create an array of picturebox controls during run-time. I wish to create a new image/picturebox everytime a user clicks the button on a form, and they need to be...
0
by: Jerry West | last post by:
Coming from VB6 a PictureBox was a container for other controls. This doesn't seem to be the case with .NET. In light of that can someone comment on the following.... I'm creating an app that...
3
by: kirk | last post by:
I have a form with a PictureBox control on it. The .Image property is set to a PNG file(which shows the picture of the US map) with some transparency in it. The .BackColor property is set to...
10
by: Matthew Wells | last post by:
I'm trying to make a shortcut that will open an mdb in the same folder as the shortcut - regardless of where the file/shortcut may be. In other words, I want to be able to copy and paste the two...
5
by: AWW | last post by:
XP VB 2005 running an example from help that creates a picturebox in code - the picturebox is not created. If I comment out the "Dim Box as New PictureBox" and create it in Design mode - the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.