I am currently using
LicenseFile=
Is there a way to add a timer to the next button?
That way if a certain time period hasn't elapsed it will ask the user if they have actually read the agreement?
Thanks
There isn't anything built-in, but you can call the standard WinAPI GetTickCount function:
function GetTickCount(): Cardinal;
external 'GetTickCount#kernel32.dll';
Call it once from CurPageChanged(wpLicense) to save the current tick value in a global variable, and then again from NextButtonClicked(wpLicense) and subtract the new tick from the old tick to get the elapsed time.
Two points to note, however:
Just because the page has been open for a while doesn't mean that they've actually read it.
I haven't tested but I'm pretty sure NextButtonClick will be called even if they haven't selected "yes" (ie. the code handler is called before the internal validation). So you may want to check for this too, to avoid displaying the "have you read it?" message when they haven't even ticked Yes yet.
Related
Like the title says, I have an Excel file with a macro running on load and I'd like to make it so the user can't use the computer while the macro is running.
It's a simple form for data input. However, most of the time users, just ignore it and let it run in the background while they work on other things.
Is it possible to make it so that while the Userform is being displayed, they can't do anything else on the computer forcing them to input the data?
I've tried everything from alerts to make them unable to close the form if they do not input data, but so far, nothing worked.
You can't do that. Your form is living in the EXCEL.EXE process space, and there is no way to tell Windows that EXCEL.EXE is all it's going to be doing until EXCEL.EXE says so.
This isn't a VBA limitation - you can't have a process that hijacks all message loops in every other processes on a machine, that's a recipe for disaster. I don't expect the OS to let you do that in any way, shape, or form.
Inline with the above, its best practice not to irritate your users. However, if its an application on a machine with a sole function, i.e a visitor log then you could make the form a topmost form.
see for instance https://www.mrexcel.com/forum/excel-questions/386643-userform-always-top.html for an example, and https://www.jkp-ads.com/articles/apideclarations.asp for declarations of the windows API functions
Another approach is to set a timer and alert your user with a sound...
A couple of months ago I created and published over 50 reports. Each report used a stored procedure that accepted parameters.
Now when I try to create a new report with a stored procedure VS doesn't want to play nice. Instead of reading the parameters and fields of the stored procedure and populating the corresponding tabs in the DataSet properties, I am now encounting a new window titled "Define Query Parameters".
I even went back tried creating a new report with an old stored procedure (that still works in my old report).
What's changed in VS? Why is it all of sudden prompting this new window and how do I make it go back to the previous behaviour?
This happens to me sometimes. I don't know exactly why, but it seems to have to do with Visual Studio needing some dummy parameter values so it can test your stored procedure and get a sample output so it knows what fields to expect. Maybe it tries some dummy values on its own and if they work it doesn't have to ask you, but if it doesn't, it has to ask you to provide them.
What I do know is that when I get that "Define Query Parameters" dialog box, if I just type in some valid dummy values and click Ok, it works fine, lets me finish building the dataset, and I can finish building the report in peace.
So to summarize: I don't exactly why, but this isn't a setting that changed in VS. The potential for it to happen has always been there, but it only happens sometimes, and you just have to deal with it and move on.
I am a newbie when it comes to InstallShield. I have a Setup.RUL that I am guessing is driving the entire installation process. However, there is a function called OnInstalledXXX() (XXX is a randomly chosen name) that is called at the end of the installation. However, I cannot find the caller anywhere in the RUL. When I debug it and put a break in the function, it gets hit. But if I change the name of the function from OnInstalledXXX() to OnInstalledYYY(), then it won't be called.
Does anyone know how this thing works and where is the caller?
Thanks
It could be marked as a Feature Event. Those are linked by name, so changing the name of the function would break it like you describe. You can either search in the Direct Editor for the function's name, or you can visit each of your project's features to find it. (Of course the latter will only work if I guessed correctly.)
I have a ribbon button on the case entity that updates a single two-option field on the form via javascript. When this is used on a case that has been resolved/closed it returns an error as the form is now read only.
Is there a way in javascript that I could get it to re-activate the form, change the field and then put it back to the way it was before? I have tried to force the change on the form but even if i manage to make it appear that you can save it, it will return the error as the form record is still counted as de-activated, even though you can change the fields
Thanks
You should be able to use a SOAP call for this, its a little involved, I would suggest starting here. You have to generate XML that represents the request, the link provides some tools to do this.
I believe you will need to issue JavaScript versions of SetStateRequest (to open) and CloseIncidentRequest (to close).
On the other hand, which is a different approach entirely, is to disable the button when the record is deactivated, then users have to manually renable the record make the change and close again. This is closer to 'working with the system' which I have touched upon here, its a different situation but the principle still applies.
I inherited an very old application that I am in the process of updating it (I know, we should have rewrote it in VS 2008, but we purchased a company, which is how I was stuck with the relic). Using UpdateData(TRUE) to retrieve the changes made in the dialog controls, nothing is being updated. I have an edit control, with an integer variable, and an edit control with a string variable, assigned using the class wizard. Upon pressing the OK button, the UpdateData(TRUE) is executed to retrieve the new values from the disalog.
I seem to remember having a similar problem back when VS C++ 6.0 first came out, but have not used it since VS 2003 and C# became prevalent.
Thanks for any help in advance!
Bill
Check the DoDataExchange() method. It should have the logic for writing data to or reading it from the controls. If the programmers used the default implementastion, then there will be a DDX_... macro for each control that is being read/written. Just look at any other MFC dialogs (in your code or google) to see how the DDX commands should be written if they are missing.
Alternatively, if it's only 1 or 2 values you can easily just get the control and read it directly if you don't mind doing validation etc yourself. Get the ID of the control from the form designer and use something along the lines of:
CEditWnd *pWnd = GetDlgItem(ID_THECONTROL);
CString newValue = pWnd->GetWindowText();
...
You'll need to look at the content of the DoDataExchange method and see what it is doing. There is not sufficient information here to tell what could be going wrong other than that.