Any Event Triggered For The Max && Min Button
I want to do some extra control when the user press the maximum & the minimum button. Is there any event triggered when the use press these two buttons ?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Why AsyncProgress Event Is Triggered Twice When Press Print Button Once?
As normal when i press the print button in datareport, it will trigger AsyncProgress event once,parameter PageComplete=0.
But if the printer is off line,and i print it,and i received a message from system that the printer can not be accessed.
In this case , AsyncProgress event will be trigged twice.
first time parameter PageCompleted=0;and in second time PageCompleted=1.
Why it will be trigged second time? what's the exact meaning of parameter PageCompleted ?
In the PageCompleted Event i attached codes that only can be run once.If then event trigged more than once ,the codes will not bring out my results.
Event Not Triggered?
Hello everyone.
I seem to be having a problem with the Winsock_connect event not being handled
I need to send data from a client to a server just after the connection is made without the user needing to press sth.So I try to make use of the connect event. The strange thing is that the connection is made but the event is not triggered. As a result i never get the chance to send this data. Even if I try to force the event to be handled with Call Winsock_connect after the connection is made, even though the data is sent(?), when I monitor the server it shows the no data is arriving.It's even more strange If you take into mind that the same piece of code is used several times in the app with great succes, and only when I try to send this specific data the event is not handled. If noone could help with that I would post the code I use.
Thnx in advance
Triggered Event
Is there any way I can trigger an event, when someone or I move the mouse.
I.e. I want to be able to start the program, and when someone moves the mouse, it triggers off my special event!
Thanks for any advice!
Always-triggered-on-shutdown Event?
I've got two questions for you
-What is the difference between the Form_Unload and the Form_Terminate events?
-Is there an event that ALWAYS triggers when the app is terminated, even if it's done via TaskMgr?
The deal with the last one is to place a program on my computer, that prevents use without my knowledge. One of the functions is, that when you try to terminate it, even with TaskMgr (CtrlAltDel), it shuts down the entire machine.
Time Triggered Event
I want to create a macro that imports a couple of hundred files into a table in Microsoft Access, carries out some basic formatting, then exports the files back out to another folder as text files. I can work out how to do most of this, but I want this process to run at a specific time i.e. 3am, and to do this without having to open Access.
I am sorry if my request is a bit vague, but can this be done? and if so, where would be the best place to start?
Any advice would be greatly appreciated.
Knowing If An Event Triggered
Hey Guys,
how do i know if a button is clicked in another program window. and when it is clicked then i will want to process my code from my program.
Thanks in advance
How Does An Event Get Triggered By Activex?
I'm using this DMFitter ActiveX: http://fitting.datamaster2003.com/
here is my code:
Code:
Public Lambda, hindex, lindex, sindex, RVal, La, Ta, Ra, Ma, FilmP, I, datasheet, Paramters, Sigmas, X, Y, Options
Public WithEvents myFitter As Fitter.DMFitter
Sub Command1_click()
Set myFitter = CreateObject("Fitter.DMFitter")
myFitter.X = X
myFitter.Y = Y
myFitter.Expression = -2
myFitter.ParamCount = 2
myFitter.Parameters = myParameters
myFitter.Sigmas = mySigmas
myFitter.Iterations = 30
myFitter.WeightType = 0
myFitter.Options = "no"
If myFitter.LMFit Then
Else
MsgBox "myFitter error " & myFitter.ResultCode 'Debug.Print myFitter.ResultCode
End If
End Sub
all the variables are defined elsewhere.
event OnGetLMFunction(X, Parameters) is supposed to be fired by LMFit when it starts its process. I placed a breakpoint at
Code:
Sub DMFItter_OnGetLMFunction(ByVal X As Variant, ByVal Parameters As Variant) 'As Double
FilmP(3) = Parameters(0) 'index
FilmP(4) = Parameters(1) 'thickness
myFitter_OnGetLMFunction = Rpc((Lambda), (Si), 2, FilmP)
End Sub
Sub DMFitter_OnGetLMDerivative(ByVal X As Variant, ByVal Parameters As Variant, ByVal Sigmas As Variant) 'As Variant
Dim Result(3) ' Notice: in THIS case, Parameters and Sigmas not used
Result(0) = 1 ' (because model is linear, and fix flags not used)
Result(1) = X
Result(2) = X ^ 2
Result(3) = X ^ 3
myFitter_OnGetLMDerivative = Result
End Sub
but nothing happens, and I get FitResult = 3 "Incorrect parameters or data to be fitted" so I'm guessing it never gets to function definition.
Quote:
event OnGetLMFunction(X, Parameters): double
This event handler must return the value of NLSF model function. X is an independent variable (array or single double precision float), Parameters is of type OleVariant and contains array of double precision values of fitting parameters. Notice that X is always of type OleVariant and if you set 2D array for X property, X parameter will be an array with appropriate number of elements.
event OnGetLMDerivative(X, Parameters, Sigmas): OleVariant
You define this event handler if you wish to calculate LM partial derivatives analytically. X and Parameters are the same as in OnGetLMFunction, Sigmas is of type OleVariant and contains array of double precision values of parameter fix flags: if Sigmas[i]<0, you can leave zero value of appropriate partial derivative. You must return an array of double precision values of partial derivatives. See TestLMFitEvents.htm and TestLMFitEJS.htm examples for more details.
I'm going straight from the example, and nothing..
I'm guessing I did not define the event handler for DMFitter that will point to the example Sub shown above, can someone please explain how this is can be done?
Vb6 Time Triggered Event
hello,
i tried to make an program with simple animation.
the first picture moves with vbkeyup,keydowm etc.
the second i wanted to move with an timer.
bit every time the picture comes to the form border it disappears and the program freezes.
here is the code:
VB Code:
Private Sub Timer1_Timer() x = Int(Rnd * 500) Picture2.Move Picture2.Left - x, Picture2.Top Picture2.Move Picture2.Left, Picture2.Top + x If Picture2.Left < 0 Then Picture2.Left = Picture2.Left + x End Sub
what's wrong?
thnx
greetings,
kreator666
Timer Event Not Triggered
Hi,
I want to use a vb timer to update a "Waiting Message" every few milliseconds while a heavy process is running. The problem is the
Timer event is never triggered coz the process is locking the other
processes (e.g. the Timer) down. Is there a way to avoid this problem?
And why the hell is there no thread support in VB?
Thx in advance,
RaKKeR
Time Triggered Event
Does someone out there have a canned method of triggering an event (in this case a file copy) based on time. I would like to trigger a module that I have created, at 11:59 PM everyday.
Event Triggered In Excel's Cell By DDE
Hi.
I'm trying to trigger an event by using DDE to change a specific cell in EXCEL.
First, i tested my own code (manually, without DDE) by changing that cell's (cell B1) value and it worked. The code is as below:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$1" Then
DoSomething
End If
End Sub
However, i tried to use another application and change the cell B1's value via DDE, that event can't be triggered.
Can anyone give any suggestions? My intention is whever there's a change in that cell's value, do something.
Thanks a lot.
Winsock SendComplete Event Is Not Being Triggered
When I send a UDP message using the VB-6 Winsock control, the remote server
receives the message OK, but the SendComplete event of the Winsock is not
triggered. This is true also of the SendProgress event.
I'd appreciate any help.
Tom Reidy
DTPicker Click Event, When Does It Get Triggered?
Does anyone know when the click event for the DTPicker control gets triggered? I can not seem to trigger this event at all.
As far as I understood it the click event should trigger only when a person clicks/selects a date from DTPickers popup calendar. If a person clicks anywhere outside of the popup calendar area the even shouldn't trigger. This is the exact functionality I am looking to produce.
AlanG
What Event Will Be Triggered After I Exit My Program?
I am programming with VB6.0. As a class is destroyed, there should raise some events, like class_terminate, form_onload, form_terminate, etc. Otherwise, when the whole project, or my program ends, what event will be triggered? Or, if there is not such an event, can I define one? Besides, how can I utilize the event to fulfill some purposes.?For example, I'd like to back up some files when the program terminates, what should I do? I do appreciate if there is any sample. Thanks beforehand!
Edited by - kickbone on 8/29/2002 5:06:24 AM
Event Triggered By Any Keyboard Input
Is there a way to know when someone presses a key in the base application (i.e. not in a form). In a form I can use the keypress property but I'm trying (in Project98) to prevent a user from entering in any data into a certain cell. When the user trys to enter data, I want to activate a form that will aid the user in data entry. Any ideas would be greatly appriciated.
Winsock - How To Detect If DataArrival Event Is Not Triggered?
Hello,
I have a network monitor app that i am creating in VB6. I want to be able to detect if a connection is NOT made, and then call a subroutine based on that. If the connection is good, then I want to ignore it, and loop to the next socket to poll for a service.
The problem that I am faced with, is that I can not figure out how to get an event or create a function that will return if the socket does NOT connect..... Only if it does....
I tried to use the Winsock1_Connect function, however, it still returns true even if there is no server on my LAN with the specified address!
If anyone has any advice, it would be greatly appreciated... Thanks!
Userform Event Triggered While A Thread Running
I am embedding a userform within an existing VBA app (Excel). When the user clicks on "OK" button on the form I want to execute certain commands (writing to textfile and to an excel workbook).
The issue is that the program makes frequent and lengthy calls to an outside data vendor (Bloomberg) to download stock prices. Each of these calls can take 3-7 seconds.
What would happen if a user clicks on "OK" while the program is in middle of one of these data download process? Would the OK_Clicked event execute after the download is finished or does Excel invoke the code behind the event immediately?
Enter Triggered Text-box Event Problem
Is there a way to set a text box up so that pressing enter doesn't trigger an event on it?
Here's my code:
Code:
Private Sub GetName(Source As Integer)
cmdStart.Enabled = False
cmdExit.Enabled = False
txtHighScoreName(Source).SetFocus
txtHighScoreName(Source).Locked = False
txtHighScoreName(Source).Text = ""
Do
DoEvents
If (GetKeyState(vbEnter) And KEY_DOWN) Then
Exit Do
End If
Loop
If txtHighScoreName(Source).Text = "" Then
txtHighScoreName(Source).Text = "Anonymous"
End If
txtHighScoreName(Source).Locked = True
cmdStart.Enabled = True
cmdExit.Enabled = True
cmdStart.SetFocus
End Sub
I don't want the enter to trigger a text box event, because now when I press enter it just beeps at me, instead of continuing with this code.
What Event Is Triggered When The Task Bar (taskbar) Is Resized?
Hi all,
New to this forum and relatively new to VB6 although i've had quite a bit of experience with VB.NET (wierd way of learning VB I know but hey, do what the job demands and all that!). Any way, nice to meet you all.
I have a problem designing an application that has to sit at the bottom of the screen. I've been able to get it resize itself when the screen size is changed using the WorkAreaWidth/WorkAreaHeight property of the err..., can't remember the object, but you know what I mean. This is great and when I change my screen size, there's the app stuck above the task bar like a good little executable. That's not my problem though. When I make my task bar bigger (when I need to view my quick launch toolbar, or I have many applications running, for example) then my application moves up with the task bar, and again sits perfectly where it should, but when i move the task bar down again it just stays where ever it was.
Am i correct in thinking that expanding the taskbar vertically will cause WorkAreaHeight to be changed like a complete resize, and that shrinking the taskbar will not fire it?
Is there an event that i can handle when the task bar is resized?
Searched MSDN like a fool and not found anything so any help would be great.
Thanks loads,
Jonny Tooze
ItemClick Event Not Triggered When Setting SelectedItem Property
Hi all!
I've built a VBA user form with a ListView control and some textBox controls. When a item is selected from the ListView, the TextBox controls display detailed information relating to the selected ListView item.
This works great when manually selecting an item, but I don't get it to behave in a similar way when I programmatically set the ListView's SelectedItem property in an attempt to display the detailed data for the first element in the list...
I did notice that the first element is actually selected in grey, but when you manually click it is selected in blue and the TextBoxes are correctly refreshed...
Does that make sense to anyone?
Thank you in advance!
Cheers,Edgard
Embedded Chart Selected - Workbook Deactivate Event Not Triggered In VBA
It seems that if you have an embedded chart selected on a worksheet that the Workbook_Deactivate() event is not triggered.
Originally I thought this behavior was a coding error, so I set up a simple sheet with 1 chart on it and the Workbook_Deactivate() and Workbook_Activate() events with a Msgbox command in both events to indicate when I enter them. Turns out that if the chart is selected, the Workbook_Deactivate() event doesn't trigger when switching workbooks, but the Workbook_Activate() event does trigger when coming back in. When the chart is not selected, both trigger. This is really non-intuitive to me as you can't set a chart event on an embedded chart without creating an event class (as far as I know).
I did create an event class just to check it out and it works (myChartClass_Deactivate()). However, that means I would need to set every embedded chart in my workbook to the class??? and also set a Workbook_SheetActivate event to catch for when I just deselect a chart and do not leave the workbook ("If ActiveWorkbook.Name <> ThisWorkbook.Name Then ..." works as I only care about the chart deactivate event to indicate that I left the workbook).
This can't be correct. Am I missing something here or is that what you really need to do?
thx in advance
Run Event When Button Is Clicked, And Stop Event When Button Released
Hi There!
I have a program that needs to run some code when a command button is clicked (and held down) and to stop running when the mouse button is released. I have tried using the mousedown and mouseup events but can't get it to function right.
I have put some code in a sub procedure in a module that runs a stepper motor connected to the parallel port - this code runs the motor for one revolution only. Works fine. But I want the motor to run continuously when the button is clicked and held down, and to stop when released. So I put some code in the mosedown event handler with a Do loop to call the sub, and sure enough the motor runs continuous, but I can't get it to stop when the mouse is released. I have tried a few ways to exit the loop with variables set by the mouseup event, but no luck.
Any ideas?
Command Button Event Occurs Only When The Button Is Double Clicked !
Hai,
I am using a MonthView Control and Two Command Buttons (Ok & Cancel) inside a Frame, Its designed as the MonthView Control will display 2 Columns and 1 Row. Now what happens is when i change a date in the MonthView Control, then i need to double click the Command Button, then only the Command Event occurs (Either its Ok or Cancel Button). If i didn't change the Date in the Monthview Control, then i am able to do the CommandButton Event work with the single MouseClick. I think if i change Date in the Calendar (i.e MonthView Control), then there is some thing affected in the Focus of the Command Button, after I change the date and press the command button, the button seems to be selected (marked) but the event didn't occured. I tried with the BreakPoint also. Can any one help me regarding this.
Thankyou,
Chock.
Command Button Event Occurs Only When The Button Is Double Clicked !
Hai,
I am using a MonthView Control and Two Command Buttons (Ok & Cancel) inside a Frame, Its designed as the MonthView Control will display 2 Columns and 1 Row. Now what happens is when i change a date in the MonthView Control, then i need to double click the Command Button, then only the Command Event occurs (Either its Ok or Cancel Button). If i didn't change the Date in the Monthview Control, then i am able to do the CommandButton Event work with the single MouseClick. I think if i change Date in the Calendar (i.e MonthView Control), then there is some thing affected in the Focus of the Command Button, after I change the date and press the command button, the button seems to be selected (marked) but the event didn't occured. I tried with the BreakPoint also. Can any one help me regarding this.
Thankyou,
Chock.
Button Down/up Event?
Hi there!
I was just wondering if there is a way to do something like PUSH button (with Command button) in VB.
It should behave like this:
1. When I push the button down (like click event) the counter should increment ( and go incrementing itself while the button is being pushed down)
2. When I let go of the button, the counter should stop
This should look like UP/Down control but with holding the button instead of clicking it the number of times.
I've tried this by using Button_mouseDown/Up event, but it didn't work!
Any suggestion will be really appreciated!
Regards! Ales Zigon
What Event Of Button ?
I am trying to make a listbox visible when a button is clicked.
And I want it to become invisible if any other part of the form other than the listbox is clicked on .. ?
Button Event
I want to create a button similary to the down or up button found in scroll bars. The specific feature in these types of button is they generate the click even in continuous loop once the mouse button is down. I can do it using do while or for loop but is there any other technique to achieve the similar thing. a spinner control is another example where one doesnt need to click everytime to change the value but once the mouse button is donwn on up or down arro the number keeps incrementing. any ideas.
Getting An Event From Command Button
I have a command button and a picturebox. My problem is as follows. I need to know how is it possible for a mouse event in the picCanvas(which is a picturebox control) to find out whether a command button is clicked or not and execute the lines of code if it is clicked
Private Sub cmdClick_Click()
End Sub
Private Sub picCanvas_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If cmdClick_Click = True Then
'Execute some lines of codes
End If
End Sub
Private Sub picCanvas_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If cmdClick = True Then
'Execute some lines of code
End If
End Sub
Private Sub picCanvas_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If cmdClick = True Then
'Execute some lines of code
End If
End Sub
Forms Button Event
If you add an option button onto a worksheet using the "Forms" toolbar in Excel 2003, how can you raise an event for a click on that control?
Cmd Button Click Event
hello
in my project ........ i have a cmd button called next
each time the user clicks it ...... i need different sets of code to execute
and it should be done in a certain order
for eg .....
after the first click .... frame 1 appears
then after the second click ....... frame 2 appears and frame 1 disappears
and so on
can someone tell me how it can be done
thanks in advance
ASP Button Onclick Event
Hi to u all,
i'm new to asp and vbscript here is my prob when i click a button i want to retrieve stuff from a db but when i use call myfunction it comes back with the error myfunction type mismatch not handled can someone please help me here how do you call a function or procedure when jou click on a button
thanx alot guys
Click Event Of Button
hie,
i want to know if one application can send a click event to another application. BTW...just incase, this click event willl be for a button lying in App2 and App1 has to send the event Message....
if it can .... how???
Button Click Event Within Another
Hi Guys,
Is it possible to call a Button click even within another button click event?
Something Like the following
VB Code:
Private Sub CmdAdd_click()If Mode = "Edit" then CmdMod_clickEnd IfEnd Sub
Map The Focus Event Of The Button
hi all,
i have one application in which i have two text box i am checking the validation on lost focus of each text box and if there is any error i set errorflag is 1 and on textchange of bothtext box i chage flag to 0 and check the validation, purpose of this flag is that untill user enter valid data we are not allow him to leave the filed
so i check her that is the flag is set to 1 then setfocus back to the control which occure the error.. it's work fine now i have clear button and exit button on my form. if there is error and i cleck clear button or exit button the focus will set back to the control which cause the error and not allow to exit or clear fileds is there any why that i find out the cleck event of clear and exit button like if btnclear.cleck then do this operation ...??
how can i identfy that clear button is cleck in the lostfocus of the textbox event is there any why pls help me regarding this thanx in advance...
Button Event On Label
Is there an easy way to make this work?
Private Sub Label1_Click()
If Button = vbKeyRButton Then
MsgBox "Success"
End If
End Sub
Thanks
Button Click Event
Hi All,
I've got an MDI form with a toolbar populated with button images from an
image list.
Does anyone know what to pass to the Toolbar1.ButtonClick event ?
Everything I try results in a "type mismatch".
Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
The event looks at the button.key to determine which code to process, I'm
trying to call the Toolbar1.ButtonClick via "hot keys" on a child form.
Thanks much in advance for any help,
Dave Tucker
Click Event For ANY Button
Hello:
Is it possible to catch the click event for ANY button on a form - instead of writing the same piece of code for each individual button??
If so how do I collect the name of the button clicked, and does VB then ALSO process the event for that individual button afterwards??
Thanks
Icarusbop
Close Button Event
Is there a possibility to get the event from the close button (the 'x'-button, right of the minimize and maximize button) in the window frame?
Code would be useful!
Thank you for any help!
Event For The Corner [X] Button.
I have made a number of small appletts in VB6 that use the MSCOMM control to support serial I/O functions. It is possible for the COMM port to be opened and sitting idle waiting for RS232 input or poised to do output that is initiated by some user action or from a timer. The problem that I have is that if the user clicks the [X] button in the upper right corner of the main form in my application the program closes but the part of the program that had MSCOMM open stays resident leaves the port open under Windows. This creates great havoc for the users of my appletts because if they try to run the applet again they get an error message that says that MSCOMM is already open and the new instance of the program abends.
Here is my question. How do I attach an xxx_Click() type event
processing routine on the [X] button so that I test to see if MSCOMM is open at exit time and if so force MSCOMM to be closed which would then lead to that part of the VB program unloading correctly.
Thanks for reading.....and if you know anything about this subject your help would be much appreciated.
MJ_Karas
How To Disable Right Mouse Button Event
I have to utilized both mouse button click event in my program. Right mouse button click event is already using by Windows (when we press Right Mouse button over Text box, Windows display popup menu Cut, paste, delete , select all), I want to use my own menu instead of windows. How can I disbale windows default Right mouse click event?
Thanks
Syed
Mouse Button In Keydown Event
How can I recognize which mouse button is clicked using the keydown event. In MSDN is mentioned that there is a keycode.
If the Left mouse button is clicked then the keycode should be :vbKeyLButton
but this doesn't work
Has anyone a suggestion?
Click Event Of Invisible Button
Hi guys a bit of a puzzler...
I have a button on my form that is invisible. I don't want the user to be able to see the button. But I do need the button to be able to excute it's click event if someone does click the invisible button?
Is their anyway of doing this with out making the button visible?
|