Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




[VB] Click Event On WebBrowser Control


Hello all I am using the webBrowser control on an vb 6 form and want to have a click event... basically if they click on the WebBrowser1 control it will bring the same page up in a real web browser.

regards,
Jay




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How Handle Click Event On Link In Webbrowser Control?
How handle click event on link in webbrowser control?

I use webbrowser control in VB. I want handle click on link.

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.

Raising The ActiveX Control's Event On The Click Of The ActiveX C Ontrol's Sub Form Buttton Click
Hi Friends,

I am designing one ActiveX Control with a lot of sub forms which r shown on
calling the methods or from some other events.
I want to raise few event of this ActiveX Control on the click of any button
of ActiveX control's sub form.
I want to give the user of the activex control some development control
with the help of these events.
I am not able to access the events (defined in the user control at design
time) of the activex control from the sub form of the activeX control.
Can anybody tell me how to do that.

Thnx in advance,

Naveen !!!!!

Raising The ActiveX Control's Event On The Click Of The ActiveX C Ontrol's Sub Form Buttton Click
Hi Friends,

I am designing one ActiveX Control with a lot of forms which r shown on
calling the methods or from some other events.
I want to raise few event of this ActiveX Control on the click of any button
of ActiveX control's sub form.
I want to give the user of the activex control some development controls
with the help of these events.
I am not able to access the event (defined in the user control at design
time) of the activex control from the form.
Can anybody tell me how to do that.

Thnkx in advance,

Naveen !!!!!

WebBrowser Event Control
Hi,

How to print a message upon DownloadComplete event of VB Webbrowser DownloadComplete Even??
The Codes below brings up www.microsoft.com Webpage, but the 'WebBrowser1_DownloadComplete = True ' may not be coded correct
ly.

Pls help. (Do we need to use event handler? Or is the Return Value not Boolean?)


Private Sub Command1_Click()

WebBrowser1.Navigate "http://www.microsoft.com"

If WebBrowser1_DownloadComplete = True Then
MsgBox "WINNET"
End If
End Sub

Mouse Click On Webbrowser Control?
I'm using the webbrowser control and i need the position x,y of the mouse and to be able to click on a link of a specific position.

so pretty much mouse needs to go to a link position and click the link.

How Do I Disable Right Click On Webbrowser Control?
How do i disable right click on Webbrowser control?

Disable Right Click In A Webbrowser Control
How can i disable the right click of the mouse in a webbrowser control?

Disable Right Click In Webbrowser Control
How can I disable right clicks and scroll bars from webbrowser component in VB 6 ?

Click A Link With Webbrowser Control
How can I click a link with the webbrowser control after I have navigated to a page?

WebBrowser Control, Right Click Menu
Hi! I use a WebBrowser control. I use WebBrowser.Navigate to display a web page. The usual IE right click menu is displayed when I right click over the page. Can I disable the right click menu directly from Visual Basic? I'm very grateful for comments!

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 Can I Click On A Link With WebBrowser Control?
I have a page which has a frame with this source code:

Code:<HTML>
<HEAD>
</HEAD>
<BODY BGCOLOR=#000000 TEXT=#FFFFFF LINK=#FFFFFF VLINK=#FFFFFF leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
<IMG SRC="http://207.200.11.37/utopia/gr/uttitle.gif" WIDTH=80 HEIGHT=30 BORDER=0><FONT SIZE=-1>
<MAP NAME=menu>
<AREA SHAPE=rect TARGET=utomain HREF="/menu.cgi?" COORDS=1,3,80,15>
<AREA SHAPE=rect TARGET=utomain HREF="/council.cgi?" COORDS=1,16,80,28>
<AREA SHAPE=rect TARGET=utomain HREF="/explore.cgi?" COORDS=1,42,80,54>
<AREA SHAPE=rect TARGET=utomain HREF="/build.cgi?" COORDS=1,55,80,67>
<AREA SHAPE=rect TARGET=utomain HREF="/science.cgi?" COORDS=1,68,80,80>
<AREA SHAPE=rect TARGET=utomain HREF="/military.cgi?" COORDS=1,81,80,93>
<AREA SHAPE=rect TARGET=utomain HREF="/magic.cgi?" COORDS=1,107,80,119>
<AREA SHAPE=rect TARGET=utomain HREF="/thievery.cgi?" COORDS=1,120,80,132>
<AREA SHAPE=rect TARGET=utomain HREF="/attack.cgi?" COORDS=1,133,80,145>
<AREA SHAPE=rect TARGET=utomain HREF="/aid.cgi?" COORDS=1,146,80,158>
<AREA SHAPE=rect TARGET=utomain HREF="/readmsg.cgi?" COORDS=1,172,80,184>
<AREA SHAPE=rect TARGET=utomain HREF="/msg.cgi?" COORDS=1,185,80,197>
<AREA SHAPE=rect TARGET=utomain HREF="/forum.cgi?" COORDS=1,198,80,210>
<AREA SHAPE=rect TARGET=utomain HREF="/politics.cgi?" COORDS=1,211,80,223>
<AREA SHAPE=rect TARGET=utomain HREF="/status.cgi?" COORDS=1,224,80,236>
<AREA SHAPE=rect TARGET=utomain HREF="/scores.cgi?" COORDS=1,250,80,262>
<AREA SHAPE=rect TARGET=utomain HREF="/leaders.cgi?" COORDS=1,263,80,275>
<AREA SHAPE=rect TARGET=utomain HREF="/news.cgi?" COORDS=1,276,80,288>
<AREA SHAPE=rect TARGET=utomain HREF="/news.cgi?yesterday=true?" COORDS=1,289,80,301>
<AREA SHAPE=rect TARGET=utomain HREF="/dragon.cgi?" COORDS=1,302,80,314>
<AREA SHAPE=rect TARGET=utomain HREF="/pref.cgi?" COORDS=1,328,80,340>
<AREA SHAPE=rect TARGET=_blank HREF="http://games.swirve.com/utopia/help" COORDS=1,341,80,353>
<AREA SHAPE=rect TARGET=utomain HREF="http://games.swirve.com/utopia/help/faq.htm" COORDS=1,354,80,366>
<AREA SHAPE=rect TARGET=_top HREF="/logout.cgi?" COORDS=1,370,80,385>
</MAP>
<CENTER><IMG SRC="http://207.200.11.37/utopia/gr/newmenu.gif" USEMAP="#menu" HEIGHT=385 WIDTH=80 BORDER=0>
<a href="sidenogr.htm"><font size=1 face=verdana><B>No Graphics</B></FONT></A>
</BODY></HTML>

I want to the webBrowser to automatically click the HREF="/attack.cgi?" link. How can I do this? Also, remember this is in a frame, so I also need to know how to select a specific frame before attempting to click the link.

Disable Right-click On WebBrowser Control
How to disable right-click on webBrowser control?

Webbrowser Control/Keyup Event
Hi,
I'm trying to disable the CTRL-N function from the webbrowser control I have on a form. I tried using the KeyUp/KeyDown/KeyPress events but they dont work when the webbrowser control has the focus.

Any ideas how I can disable this functionality?

Thanks

Capture Event In Webbrowser Control
Using the Webbrowser control when a user for example clicks a submit button, is it possible to capture that event?

Event Mouse Up/Down Over Webbrowser Control
How should I get the message when left button is up/down over the
webbrowser control? (let's say Label1.Caption="Up")
Something is missing or wrong?

THX


'------------------------------------------------------------

Private Declare Function SendMessage Lib "user32" _
Alias "SendMessageA" _
(ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) As Long

Private Const BM_SETSTATE = &HF3
Private Const WM_LBUTTONDOWN = &H201
Private Const WM_LBUTTONUP = &H202

Private Sub Form_Load()
WebBrowser1.Navigate "C:Test.htm"
End Sub

Private Sub Timer1_Timer()

Static currButton As Integer
Static currHwnd As Long

'restore the last button state to normal
Call SendMessage(currHwnd, BM_SETSTATE, 0, ByVal 0&)


currHwnd = WebBrowser1.hwnd

Call SendMessage(currHwnd, WM_LBUTTONDOWN, 0, ByVal 0&)
Call SendMessage(currHwnd, WM_LBUTTONUP, 0, ByVal 0&)
Call SendMessage(currHwnd, BM_SETSTATE, 1, ByVal 0&)

DoEvents

End Sub

'------------------------------------------------------------

MouseOver Event For The WebBrowser Control
Hi,

I've had an idea in my head for a while so while I was at home alone tonight I thought I'd get it out of my head and into vb. All was going swimmingly, designed a lovely interface for a web browser with the actual web page taking up 100% of the form and a toolbar that shows itself when you move your mouse to the top of the window. Got all that working and then added the webbrowser control on to the form and sent it to the back. So far so good. Now I open up the code view and scroll down to where the MouseOver event should be only to find that there isn't one. Any suggestions on how I can get some sort of MouseOver event on the webbrowser control or at least a reliable method of finding out when the mouse has left the toolbar so I can hide it again? The workaround I used was to use the toolbar's (which is actually a third party frame control) mouseover event to check whether the mouse was over the last 2 pixels at the bottom of it and then hid it but going off the form at the top or sides or moving the mouse quickly down buggers it up.

Also, on a sort of related note, is there any way I can make a label sit over the top of the webbrowser control? Sending the label to the front still leaves it behind the webbrowser control as does sending the webbrowser control to the back.


Remember to use [code=vb][/code] tags around code.
| Posting rules | How to get your questions answered | Wonko's Blog | Twerps Peerage |
vbCity Recent Topics RSS feed

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?

Referencing A Control On The Click Event
I have numerous labels in a project. when i click on one of the labels i want to change the backstyle of all the labels in the form except the one i clicked on. i was able to use "for each ctrl in controls... next ctrl" function to change all of the labels, but could not identify which label was clicked. I don't want to "hard-code" the label since i would have to do this for each labels click event. any suggestions?

Click Event In Control Array
Hey there,

I created an image control array (at design time) and associated a different picture for each one to create a custom toolbox, like this:

image1(0)
image1(1)
image1(2)
.
.
.

Well, when I double-click over any image object to codify the click event, it goes to the code and shows Private Sub Image1_Click(). When I try to run the program, the compiler show the "Procedure declaration does not match description of event or procedure having the same name" error.

I know that it occurs because I have an array but the click event is referring to the images at generic way. What I don't know is how to solve that.

Any clues?

Thanks!

Control Array Click Event
i have an array of command buttons, how would i do a click event for them?

Help With User Control And Click Event
Hey everyone, I got a user control, not created by me, and the problem is the author of the control never really finished it, it looks as if he kinda just quickly put it together. I need to have a click event on the user control but dont quite understand how it works.

Here is an example of how the author used the KeyDown event:

VB Code:
Public Event KeyDown(KeyCode As Integer, Shift As Integer) Private Sub UserControl_KeyDown(KeyCode As Integer, Shift As Integer)' all keydown coding here...doesnt really matterEnd Sub

The thing is, there is no where through the rest of the code that triggers the KeyDown event...is this an event that vb will automatically trigger? And if so, it shouldnt be hard to make a click event..

So any suggestions on what I should do to make a click event for the user control? Thanx everyone for the help.

***Resolved*** Control's Click Event.
Hi,

Here's the question.

If I have the control's name stored in a string, can I call it's click event?

I don't want to iterate through the controls on the form and compare the names.

Is there an api call? SendMessage?

Click Event And Timer Control
Hello to all:

Being a novice at Visual Basic, I am trying to create a private sub that
will repeat or loop every 10 seconds that starts when a "Start" button is
clicked and stops when a "Stop" button is clicked. I am not sure if I need
to incorporate some kind of loop routine or can I use a timer control?

Any help would be appreciated.

Thanks,
Ken

Click Event In PictureBox Control
Hi,

I want to utilize click event on PictureBox Control. The name of the PictureBox in my code is Display1. The following is the function triggered by Click Event.

Private Sub Display1_Click()
MsgBox "Reached Here"
End Sub

This works fine. But when I open a avi in this PictureBox using mcisendstring, the function is not reached on clicking the PictureBox. What is the reason.

Thanks in advance.

Webbrowser Control Experts - Need To Click This Auto
Code:
INPUT id=coc type=checkbox name=Conduct><LABEL for=coc><FONT class=ThmFgStandard face="Arial,Helvetica,Sans Serif" size=2>I accept</LABEL></FONT>


its basically a tickbox on the page to accept the rules, 'I accept'

seeing as its an input type with id 'coc' can someone tell me how to click this checkbox

wb.getvaluebyid or something, not to sure guys, hope someone can help

How To Remove The Right Click Menu From WebBrowser Control?
Hella proggers!
I hope one of you could help me with my prob:

How to edit the WebBrowser control so I can remove the right click menu?
I tried to add to References the MS HTML Object Library [MSHTML.TLB],
But I don't know how to turn it on design/edit mode.

I need this so I could view text that contains images(like emoticons ) and links for my ActiveX lil' chat program, and I don't want ppl to see the "View Source" or "Save Picture As.." or "Download with DAP" etc...

Any other alternatives for my program are welcome too..

Thanx!

How To Block The Right Mouse Click On Webbrowser Control
How to block the right mouse click on webbrowser control?

I don't want the user to be able to click F5(Refresh) or BackSpace(Back)...How can I go about doing that?

Also, I would like the user not to be able to right mouse click on the WebBrowser control.

I don't need it using API's please! I just need away around it!

Thank you all Any help will definately do!

Selectively Disabling Right Click In Webbrowser Control
With the webbrowser control I want to disable the right click popup menu, but not the context popup menu associated with selected text (the menu that contains: Copy, Paste, Delete, Select All).

There are currently 2 extremes I am aware of:
1. The EXTREME WBCustomerizer.dll that Microsoft released that allows you to disable ALL context menus.. and interestly enough BLOCKS ALL attemps to select text with the mouse or keyboard... so that's not an option.

2. Disable ALL right clicks via USER32 hooks (which works fine, but how do you then make a new context menu with the above options for the situation when text is selected? I am not familiar with how to call the Copy, Paste, Delet commands from within another person's controls).
(The source code I am using for USER32 Hooks is listed here.)


Any help would be appreciated.

Click Radio Buttons With Webbrowser Control...
Ok, i looked in all of the forum for the answer to my question, but none seemed to be sufficent.Please excuse me if it was already answered or it's a stupid question.Thanks ...On a page that i opened in a webbrowser window, there are 2 radio buttons and a submit button.I need to check one of the radio buttons and then click the submit button by using the htmlevent.click ... I know how to click the submit button, i got that code from a post elsewhere on here, how do you click the radio button though?The code from the site is:
                    
            Code:<input type="radio" name="accept" value=1 CHECKED>Accept (+1 RAD)<br>

            <input type="radio" name="accept" value=0>Decline<br><br> <-i need to check this radio button
        
    <input type="submit" value="Submit">
    </form>

The code i have so far is:
Code:For i = 1 To WebBrowser1.Document.All.Length
        Set HTMLElement = WebBrowser1.Document.All.Item(i)
        If Not (HTMLElement Is Nothing) Then
            If StrComp(HTMLElement.tagName, "INPUT", vbTextCompare) = 0 Then
                If StrComp(HTMLElement.Type, "radio", vbTextCompare) = 0 Then
                    htmlelement.value = 0
                                            HTMLElement.Click
                        Exit For
                End If
            End If
        End If
    Next i

Can anyone help me with this?Thanks in advance.



Edited by - pr0phect on 6/13/2003 12:56:09 PM

How Do I Disable The Right Click Menu In A Webbrowser Control
I would like to disable the right click menu that appears on the webbrowser control(which is the same as the IE browser) anyway in which i could do it.

Capturing Button Event In VB Webbrowser Control.
I am using the VB Webbrowser control. I need to capture the button click event from an html page. An ideas how would be great.

Webbrowser Control Fully Loaded Event
Quote:





Originally Posted by Zuffi


While webBrowser.ReadyStatus <> READYSTATE_COMPLETE
DoEvents
Wend
..Do what you want..

Thanks to Helen for teaching me this..

Hope its helpful to you too.




I have a similar problem and The While Wend loop doesn't fix it. It does seem to allow the page to finish loading but then it gets hung on the DoEvents. There are several Iframes in the initial document and I'm wondering if their loading is what is causing the problem. So far the only way I've been able to get the page to completely load is to insert a MsgBox statement, which after clicking on it the page goes on and the rest of my code runs as designed. ls there a specific limit we can put on DoEvents so it only "does so" for a specified number of time slices? Is there a way to create the same state that the msgBox does without having it actually appear? I thought about doing a sendkey's command to programmatically close it but it seems that there should be a more elegant way.

Webbrowser Control Fully Loaded Event
Man, I really don't know what to do... I know there are many good and talented programmers here who knows how to solve this, Help me please...

My problem is that The Document_Complete Event is triggered even before the Page is Fully Loaded. I needed something like a "Page Fully Loaded" Event. Is there something that can be done to simulate or an alternative way to come up with a solution to this?

The logic looks like this:

Private Sub WebBrowser1_PageFullyLoaded()
Msgbox(Pagenumber & "Page is fully loaded")
pagenumber=pagenumber+1
webbrowser1.navigate str(Pagenumber)
end sub

Is there a way to achieve this?

How Can I Use NewWindow3 Event Using A WebBrowser Control In A VB6 Application ?
Hi everybody,

In a VB6 application I use the WebBrowser Control (shdocvw.dll). I need to
check the URL as a new window is being opened. The only way is to get the
URL when the NewWindow3 event is fired. When I try to select the NewWindow3
event in the IDE, a popup message told me:

"Function or interface marked as restricted, or the function uses an
Automation type not supported in Visual Basic".
Does anybody know if it's possible to bypass this problem, and if yes, how
is it possible?

Please help me....
Thank you very much in advance and best regards.

How Can I Use NewWidow3 Event Using A WebBrowser Control In A VB6 Application ?
Hi everybody,

In a VB6 application I use the WebBrowser Control (shdocvw.dll). I need to check the URL as a new window is being opened. The only way is to get the URL when the NewWidow3 event is fired. When I try to select the NewWidow3 event in the IDE, a popup message told me: "Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic". Does anybody know if it's possible to bypass this problem, and if yes, how is it possible?

Please help me....
Thank you very much in advance and best regards.

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.

Trying To Get A Control To Fire A Double Click Event
I have taken over the development of a control that has a MaskEdBox and a button on a user control.

On my application form I am trying to get the control to fire an event when I double click the MaskEdBox element of the control (to populate it with "todays" date). The trouble is that the MaskEdBox doesn't have a double click event to expose. I tried to use the usercontrol's dblclick event for this but, naturally, nothing happens. Is there a way of getting the MaskEdbox to inherit the event from the user control?

Does anyone have any ideas.

Handling Click Event Of Shockwave Control
I am a beginner in VB. I want to use shockwave control in VB6. But the control does not have any event like click event associated with it. I want to handle it. If anyone can help me.

Thanks in advance. Any help will be appreciated.

Click Event Not Firing From User Control
OK...I was messing around with trying to make a simple card game type program, more for fun than anything. I created a single form and a user control of type Card. I implemented manual drag and drop...and this works fine, but I'm not getting the click event to fire...any direction you could give would be appreciated.

here's the code for the main form:


VB Code:
Option Explicit Dim OffsetX As IntegerDim OffsetY As IntegerPrivate Sub aCard_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)    aCard(Index).Drag vbEndDragEnd Sub Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)    Source.Move X - OffsetX, Y - OffsetYEnd SubPrivate Sub aCard_Click(Index As Integer)    MsgBox "We Clicked!!"End Sub Private Sub aCard_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)    'Test    OffsetX = X    OffsetY = Y    aCard(Index).Drag vbBeginDragEnd SubPrivate Sub Form_Unload(Cancel As Integer)    Dim i As Integer        For i = Forms.Count - 1 To 0 Step -1        Unload Forms(i)    NextEnd Sub Private Sub mnu_FileExit_Click()    Unload MeEnd Sub

Here's the user control:

VB Code:
Public Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)Public Event MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)Public Event Click()Private Sub UserControl_Click()    RaiseEvent ClickEnd Sub Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)    RaiseEvent MouseDown(Button, Shift, X, Y)End Sub Private Sub UserControl_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)    RaiseEvent MouseUp(Button, Shift, X, Y)End Sub

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

Adding Click Event To Custom Control
I have a custom control that I purchased that does not have a click event. I have contacted the developer and am waiting a response. Is there a way that I can add a click event? maybe manipulate the forms click event some how? All it has is GotFocus, LostFocus, DragDrop, DragOver, and Validate events. Is the a mouse object that I can declare, something, anything??

Thanks,

Is It Possible To Disable The Double Click Event Of A Control?
I'd like the user to be able to click very quickly on a variey of controls (like labels etc) and catch the mouse up and down events (or click).

BUT, if the user clicks too quickly the double click event fires, skips the mouse down and then processors the mouse up!

so clicking 5 times very quickly on a label produces

DOWN->UP->DOUBLECLICK->UP->DOWN->UP->DOUBLECLICK->UP->DOWN->UP

instead of ....

DOWN->UP->DOWN->UP->DOWN->UP->DOWN->UP->DOWN->UP->

is there a way to kill the double click event?

Cheers?

How Can I Dynamically Call An Event (e.g. Click) For A Control ?
I dynamically created a from with about 90 controls in it. To access the controls I use a simple loop like this:


Dim el As Control

For Each el In UserForm1.Controls
  If left$(el.Name,3) = "cmd" Then

    REM Code to access standard events of the control
    
  End If
Next el


How can i acces e.g. a Click-Event? Here i cannot write cmdButton1_Click.
The control is stored in the variable el. But (of cause) el.Name_Click doesn't work.
This isn't trivial, isn't it ????

How To Kill A Double-click Event For A WMP Control
When the user double-clicks on a WMP control then the currently playing video changes to fullscreen mode. This seems to be a default behavior of the windows media control itself which I can not figure out how to turn off. As a result, is there a way to receive the double-click event for the WMP control but not allow the OS to process it ? Basically, in the myWMP1_DoubleClick event, can I somehow not allow the functioning to continue through the OS (ie: kill the event somehow?)






Edited by - uncletr on 9/27/2004 5:10:27 PM

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

Double-click Event Firing Off Click Event Code?
For example:

In a listbox, I have a click event that changes a label's caption from 'Loaded' to 'Clicked' and changes the color from black to red.

I have a double-click event that shows a message box saying "I've been double-clicked."

You can re-set the label by clicking it.

When I click the listbox, the label's caption and color changes. This is what I expected.

When I double-click the listbox, the label's caption and color changes, and the message box is displayed. Why?????

Fire Onclick Event On Asp Page In Webbrowser Control
Hi all:
I am not a hardcore VB programmer so hopefully there are some experts out there who can help.

I have a VB6 form with a webbrowser control on it. When the form opens, the control is loaded with an ASP login web page. The user then logs in to the website and a second page loads. The second page has 3 frames. One of the frames has a disconnect button in it. If the machine is idle for a period of time I want to fire the onClick event of the disconnect button on the web page.

Tracking the idle time is easy enough but is there a way to fire the onclick event of a button in a frame on a web page in a webbrowser control?

Thanks for your help
Bill

Copyright © 2005-08 www.BigResource.com, All rights reserved