Capture And Respond To A Right Click On An Image Control - Is There A Way?
See title - is there a way to detect and respond to a right click on an image control in VB6 (SP6)? Code please. Don't care if it uses API or whatever.
Thanks!
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Capture And Respond Other App's Msgbox
Hi , from my vb application i shell another application and click a menu item in that app. The moment i do that a mssgbox is displayed pertaining to that app.
I want like to know ( read ) what was the text displayed in that messagebox . Based on the message that was displayed i would pass certain commands to that app.
Shell "D:StrikeM_60M_managermmngrin1.exe", 1
SendKeys "%FD", True
SendKeys "{ENTER}"
-- some msgbox from other app is displayed
-- read the msgbox
-- send command based on the msgbox text
-- cont...
Capture Click Event Of Control Array Combobox
I have a control array combobox named PoolCombo. I am trying to capture the click event on any of the loaded ComboBoxes with:
Private Sub PoolCombo_Click(Index as Integer)
MsgBox "Got it"
End Sub
This does not seem to work, is this possible or (more likely) I am not coding it correctly. Thanks!
Treeview - Capture Click Of Treeview Image
Hi,
I have a treeview where I am using the node image to mimic the functionality of a checkbox. Initially the node image (for topmost nodes only) is set to an image of an unchecked checkbox.
Is there any way to determine if the user clicks on the node image (and not the node text). I need to be able to alter the image from unchecked checkbox image to a checked checkbox image when the user clicks this image. However, I still want to allow the user to click the node text to expand/collapse the node as is the standard for this control.
Any help would be much appreciated.
Child Form Doesn't Respond On The First Click
I had to replace Sheridan ActiveListBar control with DBI-Tech ListBar on MDI form in my VB6 app. I spent a lot of time on that replacement without paying attention on Children forms behavior. After click on a new ListBar one Child is replaced with another one (for instance there was Customer form and after click it was unloaded and Supplier form was loaded). The first click on Supplier form doesn't do anything. Form behaves as disabled. The second click works as it should. It doesn't matter where the first click is done - any button, check box, combo. Just no any reaction.
Any idea why it's like that?
I tried to find some work around by setting focus on controls, by calling Click event procedures. Nothing helps. Only manual click makes the form responsible.
Thank you
Vlad
Why Commandbuttons Didn't Respond To 'click' Event?
Hi,
I imported a form from my old app to build a new app. I commended out the old code for this form and created new one.
but when I clicked the commandbuttons I newly created, they didn't respond to the 'click' event.
Is there anyone know how to solve this problem?
Thanks.
Brad
Text Box That Respond With The Click Event When Enter Is Pressed
Hey Everyone,
I'm a password protected form using VB6, and I want the program to automatically activate the _click event when the user finishes typing in the password in the text box then hits the enter key. I am experimenting different things but nothing seems to work. Look at my best attempt to this problem and maybe you have a better solution.
CODE:
-----------------------------------------------------
Private Sub text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
Call command1_Click
End If
End Sub
-----------------------------------------------------
Q-Man
Capture Desktop Image And/or Wallpaper (not Screen Capture)
Hi all.
I have found several good codes for capturing the active screen. What I want to do is to capture the desktop, regardless of what programs are open or running, an image of the desktop as it looks with no other windows open, including the wallpaper if any.
Also, I am wondering where I can get the path to the picture being used as the wallpaper.
Any help?
Thanks
Wengang
Image Control Click Event
i am using VB .NET
I have an image control which contains a .ico file. (in a .aspx page)
on the click event of this control(in .aspx.vb page), i want to show another page, which is a web link.
how do i do it?
Web Browser Control! How To Click An Image.
i want to click a button on an html page that is in the form of a .gif image using a vb application.
i know how to click html buttons using this code
VB Code:
WebBrowser1.Document.All.Item("continueButton").Click
but not sure how to do a .gif
Webbrowser Control (click An Image)
That's it....i just want to click the image button that says Signin.png
i've figured out how to fill username and password but no idea how to click the image
Code:
<div id="signin">
<p class="imgAvatar"><a href="#"><img src="http://graphics.mypage.com/images/layout/avatarNone.png" alt="Avatar" /></a></p>
<form method="POST" action="/myp/login.php">
<dl>
<dt>Members</dt>
<dd class="medInput"><label>User Name:</label> <input name="username" /></dd>
<dd class="medInput"><label>Password:</label> <input type="password" name="password" /></dd>
<dd class="btnSignin"><input type="image" src="http://graphics.mypage.com/images/layout/btnSignin.png" /></dd>
<dd class="remember"><input type="checkbox" name="autologin" /><label>Remember Me?</label> <a href="/profile/profile.php?mode=getpasswd&sid=9a4726bd38b89254565f8a20951dba79" title="Forgot your password?">Forgot your password?</a></dd>
<dd class="btnSignup">New Here? <a href="/profile/character.php?&sid=9a4726bd38b89254565f8a20951dba79"><img src="http://graphics.mypage.com/images/layout/btnSignup.png" alt="Signup" /></a></dd>
</dl>
<input type="hidden" name="submit" value="Login" />
<input type="hidden" name="sid" value="9a4726bd38b89254565f8a20951dba79" />
<input type="hidden" name="redirect" value="http://www.mypage.com/" />
</form>
</div>
help is wanted
Edited by - Alec_Trevelian on 6/29/2006 11:50:51 AM
How To Cancel The Click Event In The Image Control
I inserted image control (to make it a background for some controls) on the sheet and then I placed some controls like command after I made the image "send backward" and controls "send forward" . When I run the project the controls appear on the image. But when I click on the image the controls disappear and then appear again when I move the mouse away from the image. How to fix this problem. By the way I tried to make the propert of image, Enable= false, But it didn't success .
thank you for help.
Image Control Mouse Click Event?
HIiiii
I am trying to use Image Control MouseDown and MouseUp event. It is responding for right mouse click. But not for left mouse click. Even it is not responding for Click and Double_Click event too.
What could be problem?
Hdave
Image Control Click Event Not Occuring?!
Hi All,
I am getting some strange behaviour with an image object.
I have some code that I run when the user clicks on an Image object but if you click quite fast... about ... I was just starting to write 'about as fast as a double-click' when it suddenly occurred to me what the problem is here!
I'll finish anyway because it might be instructive to someone else...
If you click too fast the program doesn't respond on some of the clicks (you sometimes need to click the same image up to 4 times).
As I was explaining this above I realised that the double-click event was probably being fired!... I just tested it and that is what's happening!
So now all I do is pass the event and it's index on to the standard click event and all is well!Code:Private Sub imgResponse_DblClick(Index As Integer)
imgResponse_Click Index
End Sub
Anyway, sorry for wasting your time but I thought it was quite amusing...
Mac
Simple Error {Click Event For Image Control}
hi guys,
I have this form and I want to check if the user has clicked on a image by means of a buttons. The following is my code.
-------------------------------------------------------
Private Flag As Boolean
Private Sub Command1_Click()
If Flag = True Then
MsgBox "True" else
MsgBox "False"
End If
End Sub
Private Sub Image2_Click(Index As Integer)
If Image2(Index) = 1 Then
Flag = True
Else
Flag = False
End If
End
------------------------------------------------
Can anyone check out my mistake please
Click .gif In File List And Preview In Image Control
Hello,
I have a file explorer with drive,dir,file boxes. The file box only displays .gif which is what i want. When a gif is clicked i want it to be displayed in an image control. this is what i have so far but i dont know how to get the gif clicked on into the image box.
Code:
Private Sub File1_Click()
Dim FilePath As Variant
FilePath = Dir1.Path & "" & File1.FileName
Label1.Caption = FilePath
End Sub
i have tried
Image1.Picture = FilePath but it said something about object required.
Any help would be great.
Chris
Image Click Event Stops Imagelist Control From Updating
Using Excel VBA
I cannot work out why the following is happening:
I have a form that is populated from the contents of a spreadsheet, with each row being read using a For Next Loop.
In addition to the form containing textboxes, buttons and labels it also has an imagelist control.
A mousemove event is linked to the image and this functions correctly (displays a form with an imagelist control and linked image). If I change the image event to anything else e.g. mousedown, click, doubleclick etc and run the same code as a result of this event I get a situation whereby the next line that is read from the spreadsheet updates the textboxes and labels but not the image (imagelist linked), the picture remains at the previous image. However If I click the image it displays the correct larger picture and when that form is closed the imagelist on the main form is updated correctly.
It appears that the image click procedure is stopping the variables being updated for the imagelist control until the sub form has been closed, yet using the same code I get no problems with mousemove event.
An example of the code is as follows:
Code:
For counter = 7 To 27
Image1.Picture = ImageList1.ListImages(counter - 6).Picture
pic_label1.Caption = Worksheets("Sheet2").Cells(counter, 4) & " - " & Worksheets("Sheet2").Cells(counter, 5)
.........
Next
'Private Sub Image1_Click() ---------------------------------------- code causes imagelist control to stop updated
'image2show = counter - 6
'imageshow.Caption = Worksheets("Sheet2").Cells(counter, 4) & " - " & Worksheets("Sheet2").Cells(counter, 5)
'imageshow.Show
'End Sub
----------- code works ok
Private Sub Image1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
image2show = counter - 6
imageshow.Caption = Worksheets("Sheet2").Cells(counter, 4) & " - " & Worksheets("Sheet2").Cells(counter, 5)
imageshow.Show
End Sub
Private Sub UserForm_Activate()
Me.Caption = Worksheets("Sheet2").Cells(image2show + 6, 4) & " - " & Worksheets("Sheet2").Cells(image2show + 6, 5)
image2.Picture = ImageList2.ListImages(image2show).Picture
End Sub
How To Detect A Click Event On Embeded Image Inside An Activex Control.
Hello All,
I need some help figuring this out. I am developing an ActiveX control that contain an array of multiple image boxes embedded inside a windowless transparent form (container). Based on property settings at design time, only one imagebox is visible, and all others are set to be invisible. I have a method (property) set in the control that decides which image is going to be visible. This is settable during a standard VB exe project development, and at run time via user selction. When I compile the OCX and use it to on a standard VB EXE project, I don't have an option available to write code for an Image click event. Only events available are control got focus, & lost focus etc. How do I go about adding the Image click event (to the Visible Image) inside my control?
Do I have to implement another method/event within my Activex control? If I did that, how would I then pass the name of the caller (name of the form where the control click was initiated) in to my activex event, and have the activex report back to the "SAME" calling form during run time?
Thanks
Annoying User Control (URGENT- PLEASE RESPOND)
Yes... So... I am working on this pretty big project and I made a "special" control in it that does the scrolling. The control is actually a User Control. Now the problem I am having is that, if I try to use the same control for more than one forms.... It somehow doesn't work and I am tired of trying to figure out why... So what I did for now was that I created each of the components seperately and created a seperate UserControl for them... However now that it is time for me to compile it and put it together... I tried putting a seperate UserControl for each of the forms that need the control to be present and it still doesn't work... Is there any way to get around this...
Please respond ASAP... the clock is ticking...
I'd really really appreciate the help...
Error : The Service Did Not Respond To The Start Or Control
hi all.....
I tried to set up an app as service under win2k, but i cant get it to work. It starts the server but
just opens for a few seconds and then it exits the program.
When i go in service managment prog and try to start the service i have added with dbsrv5 it sais that it tries to start the application, and it starts right but closes and give the following error:
The service did not respond to the start or control request in a timely fashion error 1053.
Anyone knows what this is
Thanx for your help
Custom Control Wont Respond To Mouseover
I am using a picture box as a dragable line between two other controls. Dragging will resize each control. I use the mouse over event to change the cursor and the background color of the picture box. But when I test the control the mouseover event doesn't fire.
Code:
Private Sub SplitterBar_MouseDown(Button As Integer, _
Shift As Integer, _
x As Single, y As Single)
If Button = vbLeftButton Then
SplitterBar.MousePointer = 9
SplitterBar.BackColor = SPLT_COLOR
curSplitPosX = CLng(x)
Else
If curSplitPosX <> &H7FFFFFFF Then
SplitterBar_MouseUp Button, Shift, x, y
End If
curSplitPosX = &H7FFFFFFF
End If
End Sub
Private Sub SplitterBar_MouseMove(Button As Integer, _
Shift As Integer, _
x As Single, y As Single)
SplitterBar.MousePointer = 9
If Button = vbLeftButton Then
With TreeView1
.Height = PicTray.ScaleHeight - (lstDrive.Height + lstFiles.Height + SplitterBar.Height) + x
End With
With SplitterBar
.Top = lstDrive.Height + TreeView1.Height
.Left = 0
.Width = PicTray.Width
.Height = SPLITTER_WIDTH
End With
With lstFiles
.Left = 0
.Top = lstDrive.Height + TreeView1.Height + SplitterBar.Height
.Height = PicTray.ScaleHeight - (lstDrive.Height + TreeView1.Height + SplitterBar.Height)
.Width = PicTray.ScaleWidth - 10
End With
End If
End Sub
Private Sub SplitterBar_MouseUp(Button As Integer, _
Shift As Integer, _
x As Single, y As Single)
SplitterBar.MousePointer = 0
SplitterBar.BackColor = vbBlue
End Sub
Is there something I am missing? I want the user to be able to resize the treeview and the file list during devlopment and during use.
As always, I thank you for looking.
Scott
The worst thing about wearing glasses is them being on your face.
Nothing is impossible, it just looks that way.
Capture Click?
Hi everyone!
I am revising a program of mine that I had written sometime ago. I am needing to capture when a user clicks on a button in an external program. The problem is I can't get the handle of the button. The button is inside of a dockable toolbar. I am unable to get the handle of the toolbar itself. Using Spy++ on the toolbar will not return a handle either. Currently, after clicking the button in the toolbar, another window appears. I am using a timer to check if that window is open and then I close it and open my window. I was just wondering if there was a way to go about this without using the timer to check ever so often, because sometimes there is a slight delay and the other window flashes up real quick before I can detect and close it.
I have attached an image of the toolbar that I am trying to capture. The button I am referring to is the paperclip button.
Any help or input is appreciated...
Thank you,
JDavis
VB6: App In SysTray, Capture Right-Click
OK, So I need a little help with this method. I had an example a long time ago that I manipulated into something similar to what I need, but I'm not able to find the example I manipulated, or the online example.
OK, I have an app(VB6), it opens in the SysTray.
Now, what I need to do is be able to right click on any file within the desktop or any other folder, and have accessible to me, an option within the standard right-click shortcut menu that I can click and pass in the file name to my App which is running in the SysTray.
I have the SysTray part already, what I need help with is the establishing the shortcut menu and passing in the filename.
Any help will be appreciated as I only did this once and can't find the file now or anything online talking about it.
Thank You.
Click.top/.left Capture
under the Form_Click sub, how would you say:
Code:
Private Sub Form1_Click
(click).Top = top 'variable
(click).Left = left 'variable
'where (click) is whatever the click is called
End Sub
Capture Click Event
Hi....
I am working on a project and in that project .I have a saparate exe. and when this exe runs ....in the first window it has OK button ....I want to fire this click event automatically....I got the handle of active window.....But not able to send any keystroke like enter key or spacebar key...Please give me any idea which can help me ...
Thx
V.Acharya
Capture Click On ShortCut
Can i know when the user clicked on a shortcut or an item on the windows menu?
I mean, as soon as the user click on a shortcut or an item, i have to capture(retrieve) the associate program to that shortcut or item menu.
Capture Double-Click On Shape
Does anyone know how to capture the double click of a shape in an Excel Spreadsheet? (VBA 6)
Using the sheet beforeDoubleClick does not work.
Thanks
Capture A Mouse Click Event
I have a login form with two fields, UserID and Password (duh !!)
It also has two controls, OK and CANCEL.
I also have a routine in the code that calls a message box routine if the UserID loses focus that activates if there is no UserID is entered (UserID="").
Is there a way to capture the mouse click on the CANCEL control that will set a flag or some other way bypass the LostFocus routine?
Thank you,
Jenn
Capture Double Click Event
I need to possibly capture the double click event on a form. Before you roll your eyes read on. I do not want to write out 125 possible click event handlers. So, if i can capture the double click event on each form, determine if the double click was executed on a text box i could open a user control - allow the user to use a larger text box version of the control and enter or read the contents of the box. Right click would work too.
As you may remember i have lots of controls on several forms. to save space i thought about removing all the text boxes designed for notes. several note boxes are located on each form. what would be a good way of hiding the box - opening the box - hiding the box when done? and saving its contents into my file (i can do that but thought i'd throw it in.)
Capture Click In LostFocus Event
Guys
Is there a way to capture the value, index, name or anything of the button you have clicked if clicking the button has fired a LostFocus event from a different control?
If that doesn't make sense, I have a textbox with a LostFocus event but I don't want it to fire if the user clicks the Exit button on the form which will obviously move focus from the text box to the button.
Cheers!
Capture Webbrowser Click Event
I'm using the Webbrowser control to show some animated gifs and it doesn't come with a click event. What could be the solution? My last hope'd be to capture clicks on the container form and check if the coordinates are from the webbrowser control but that's a bit time consuming if u have multiple animated gifs.
Capture Min Button Click, NOT RESIZE EVENT
hey,
I know tons of people have asked how to capture the minimize button click event, and the only answer Ive seen is using "form resize" event with windowstate = vbminimized, but is there another way?
Im using sysApp to work on a "minimize to tray" option in my application, using the minimize button on the form. If the form resize event shows "minimized", then it points to the "minimize to tray" routine. However,,, too many events cause a "form resize" and throw the app into unecessary looping, back and forth between the "resize" routine, and the "minimize" routine. For example, the following 2 lines are from the sysApp "minimize to tray" routine. Each one resizes the form and restarts the loop, exiting the "minimize" routine, and going back to the "resize" routine, thus sending it back to the "minimize" routine....etc,etc,etc.....
Me.visible = true
Me.windowstate = vbnormal
it eventually works, but its really "clunky" and takes a while (relatively speaking) to finish looping and finally either minimize or maximize out of the tray. Isnt there a way to use the shell or something? An API???
Capture Keyboard Or Mouse Click/movement
I have a compute intensive app I want to run when my PC is idle. I can start it up via the screensaver capability. At the same time, there may be other apps still running (e-mail, etc) which may occasionally steal the focus from my compute intensive app, which is in VB. I want to be able to trap any key press or mouse click/movement so I can shutdown the VB compute intensive app.
Suggestions on how to do this?
Bob
Capture The On Click Event From An Anchor Tag Through GetElementsById
Hello I am working on a VB application that needs to click on a save button on a web page. The tag that contains the link to the button is <a id=savelink style="text-decoration:none"> <img src="/images/employimg/jdstar.gif" border=0><font class=TEXT15BOLD> Save</FONT></a> when i click on the webpage it saves the page, but i am unable to do it through VB.I have used Set oObj = MyBrowser.web2.Document.getElementByid("savelink") but it did not do anything.Can anyone help.
Capture Keypress And Mouse Click Outside Of Form
Hey everyone,
I have a question, I didn't see it posted on here for exacty what I want to do, I have a program that when I use a keypress, or a mouse click, my program will do a certain task, however if something else has focus however, my program will no longer detect it, now I know that on .NET you are able to do it, however I haven't been able to find anything out on 6.0, if anyone can help me out, I would be greatly apprecitive.
Thank you very much
Aidanphoenix
Capture Window Of Other Application Via Mouse Click
Hi there:
I want to obtain the information of an window of other application via a mouse click.
After a little study of API, I found that the mouse position (outside my VB form) can be reported by
"getCursorPos", and all the windows can be enumerated by "EnumWindows", "EnumChildWindows", and "EnumThreadWindows". However, my problem is how can I catch the mouse position when I click the mouse outside my VB form. I tried to show a modal dialog. However, it's only application-modal, not OS-modal. The modal dialog lost focus once I moved outside it.
Can I monitor all the system mouse event to solve this problem, how?
Thanks in advance for any help.
Nice day,
--Changzhou
While I DOUBLE CLICK ON ANY IMAGE, IT'LL USE MY PROGRAM TO SHOW IMAGE~
While I DOUBLE CLICK ON ANY IMAGE, IT'LL USE MY PROGRAM TO SHOW IMAGE~
I HAVE MAKE A SIMPLE PICTURE VIEWER,AND I WOULD LIKE TO KNOW HOW TO DO LIKE ACDSEE DO, WHEN I DLB CLICK ANY PICTURE(*.JPG,*.BMP AND ETC IMAGE FILE) IT WILL AUTOMATIC USE MY PRGRAM TO BROSWER, NO NEED EVRY TIME OPEN MY PROGRAM TO VIEW PICTURE.
HOW TO DO IT?
How To Capture Mouse-click Event For A Paragraph In MS WORD.
Friends,
Some of the buttons in MS office toolbars have additional functionality when you double click them.. e.g. Format painter button in Word. When this button is double clicked it stays selected and subsequent document clicks are captured and the selected word/sentence are formatted. I want to make a similar button which remains pressed when it is double clicked and then inserts a word at the curser position whenever i click the document.
Would be glad if someone helps me in this.
Laila
Image Capture - How To Do It?
I'm looking for a way to capture an image from a microscope camera and use it in a VB program. I've done the easy bit - designed the form and displayed a bitmap image in a PictureBox. I'm hoping to intiate image capture using a Timer control set at approx 1 second and for the newly captured image to replace that already displayed. I do not need faster video streaming than that.
The question is - how do I capture the image? Does anyone know of a .dll /.ocx which will do this for me. Will the bitmap have to be saved to file then loaded using the LoadPicture command or can it just exist in memory being overwritten by the next captured image?
The microscope I have in mind has a digital camera with a USB interface. Do I need any more hardware than a PC with a USB port?
Thanks for any interest.
I Want To Capture An Image .....
i want to capture a image from a webcam and than process it for identification .
i am new in visual basic and i need guidelines to achive these things
i have to make a program which will interact with the camera and capture the image and than i need to process that image to comapre with a picture already in the data base
HELP guys need it badly
please pvt message me if this thread belongs to someother cat.
Thanks.
|