can you read an icon's location from windows xp registry and once it get identified then set it anywhere on desktop programmatically?
The desktop is a list view control. You can get the position of an individual icon by finding the desktop window and sending it LVM_GETITEMCOUNT and LVM_GETITEMPOSITION messages to it.
Unfortunately, LVM_GETITEMPOSITION requires that lparam is set to a POINT struct within the address space of the process owning the list view (i.e. explorer.exe) so in order to do any of this you need to open the explorer.exe process, allocate some memory within that process, calculate the address of that memory relative to the explorer process, send the LVM_GETITEMPOSITION message with the freshly allocated memory as the lparam and, finally, read the contents of that memory. It's been a long time since I've done any of this, so I don't remember the details but hopefully this helps you along.
Related
So if I have a directory /dir which can contain any number of files N and these files can be in any sub-directory in /dir. How can I watch /dir such that I get notified when a file in dir or any of its sub-directories is opened? I don't want to watch all files and check if a lock is acquired for that file.
I have looked at FSEvents, but I am pretty sure that I cannot do it with that.
It is for the macOS operating system
So can anyone point me in the right direction or know a solution
One method would be to write a Kernel Extension and use Apple's Kernel Authorisation (KAuth) framework.
You'd then subscribe to the File Operation scope and the KAUTH_FILEOP_OPEN action.
This would also require a user-land application to communicate with the kernel extension, to receive the notifications of file operations, so this method would depend upon your requirements for watching the files as to whether or not this is just overkill.
You could use kqueue, and based on the events that you would like to monitor you could get "notified", for example in your case you could use the EVFILT_VNODE filter:
EVFILT_VNODE Takes a file descriptor as the identifier and the
events to watch for in fflags, and returns when one
or more of the requested events occurs on the
descriptor.
To get a list of all events you could monitor check the man: https://www.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2 (The implementation is pretty similar in all the BSD's including macOS), check this answer to see some differences: https://stackoverflow.com/a/49521218/1135424
I have a slight annoyance on my hands. I have an interactive online PDF form that multiple users very actively and routinely use. The problem is, anytime a user clicks on any part of the form, the form goes blank and reloads again. It's still usable, in the sense that the options chosen are being displayed on the reload, but it's still very aggravating and time wasting.
I recently saved a copy of the form so I could test out the form locally, and the issue is still persistant, which crosses out the company issued Internet Explorer 8 as being the culprit, which I thought might be the case.
So, anyone else experience this and know how to fix this?
UPDATE 4/8/2015
On further tickering, it seems that the dropdown boxes do contain quite a bit of options. This seems to be slowing down the form considerably. What's odd is when testing on an older PC, the issue is non-existant. Further investigations needed.
This seems to be the known bug in Adobe Reader if you are using Adobe Reader or Adobe Reader X to view PDF in the browser.
One of suggestions to try the following:
Go to (in Adobe Reader) Preferences : Forms,
Then untick the "Show focus rectangle" checkbox.
You may also want to try Foxit Reader that is also capable of working as plugin in IE and other browsers.
Does this form have many fields with calculations, and some of them leading to change display properties (border, background, text, text size etc.)?
Acrobat often does refresh the appearances, which, when it takes longer than just a few milliseconds, leads to a flickering effect.
In order to provide more help, I would have to have a look at the form.
This is mostly seen in systems without any GPUs or with iGPU. Monitor color profile and iGPU are bottlenecking in this case.
Solution:
Set threshold transition framerate to 30fps (con: RAM consumption may increase by 2-3 MB per 100 MB PDF file)
For no GPU/ iGPU systems use Software based rendering instead of DirectX (under Multimedia and 3-D section, Adobe Acrobat).
Set Monitor colour profile to sRGB.icm or sRGB.cdmp or scRGB.cdmp or use my colour profile. Restart your PC. You should see noticeable difference now.
PRIMARY/ONLY SOLUTION is to install a dedicated GPU for your PC. This removes the problem completely.
NOTE: 1, 2 & 3 are temporary solution.
I have attached my sRGB.icm (.icm are ICC profile and they are best) colour profiles here: "https://ln4.sync.com/dl/ca43fd730/actxknji-3t3c5krs-ifagdfin-bppsxinh". Open colorcpl.exe (Microsoft Colour management profile control) and load the files. You are all set.
Cause:
Adobe uses dynamic allocation. Microsoft edge/ chrome transfers the whole PDF to RAM but Adobe doesn't. When you jump to a particular section of the PDF what's happening is Adobe is collecting the data from the PDF and transfering it to RAM, now when CPU processes your data the GPU is lagging behind which is causing the flickering. In most cases this is the problem. The problem is not seen in other applications because they transfer the PDF completely to RAM occupying the size of the PDF file. But Adobe has lower RAM consumption for this reason. Don't open 500MB PDF files in Edge or Chrome because your PC will hang and they will crash, instead open with Adobe, Adobe is well optimized for all purposes, lower RAM consumption. So for this you need a decent GPU.
Monitor Color profile mismatch with iGPU.
Calibration error.
GPU rendering problem(old GPU).
Threshold fps and other settings to change in Adobe Acrobat Reader/Pro
Color Profile Management for monitor
One Recommendation from me: Don't ditch ADOBE ACROBAT. It is so well optimized. Microsoft Edge looks good in GUI but when you open a 500MB PDF file it will consume 1GB of RAM, I've seen it, I solve past year questions from a PDF which is of 629MB and edge transfers the whole PDF to RAM and takes 1GB or more RAM. But in Adobe, RAM consumption is about 130MB even when I am editing the PDF. Adobe softwares are designed for professional use. So, don't ditch Adobe because of this silly flickering problem. Thanks.
Hello and thank you for helping!
I created an Access form that has a few button on it that when clicked format a textbox below the buttons (basically different colors). The idea is for employees to not lose track of important issues to discuss while they are on a phone call with clients. I know Access is typically for database-ing if you will, but I don't need it to track anything or update records as there are none.
This works fine on my computer, however when I try to send it via email or put it on a shared drive, the form appears, but the buttons do not work. I even tried copying the database file along with it to the shared drive, but it still did not work. It seems the VBA code that is connected to the button clicks does not work on a shared drive.
The drive itself is mapped to a letter (Y) on my computer, but may be mapped to Z or another letter on employee computers. Would this be the issue? Or better yet, is there a way to isolate the form so it works like a standalone program on each new machine using it?
I am relatively new to Access, what am I missing?
TL;DR Press button on Access form, textbox turns blue. Send to friends, they try to do the same, nothing happens.
As always, thank you for your time!
EDIT: There are two scenarios that can happen when another user tries to access this form:
1) The form appears perfectly, but when they click the buttons, nothing happens, no text box is formatted.
or
2) It throws this error: 'blah blah drive X' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
Try the UNC (Universal Naming Convention) instead of the drive letter (Y:)
The format is below.
\servername\sharename\path\filename
The servername and sharename information can be found on "My Computer" for Windows
Finally, this was solved! I changed the Form Record source to be the linked table, and it worked. It was still referencing a table on the computer I created it on. Thank you to everyone who helped!
I know about key loggers and root kits. I know it is possible for these programs to know what keys a user is pressing and what programs a user has open at any given time but, is it possible for a program (or background process) to know what commands (functions) with in a program are being executed?
e.g. A user is in Photoshop and does the following:
Opens the file called mountain.jpg
Crops 103 pixels off the top
Increases the Contrast by a value of 50
Saves the file as mountain-EDIT_1.jpg
Can a background process (daemon) understand that a user ran Photoshop's Open, Crop, Contrast and Save functions?
To be more specific, can a background process:
gain access to those unsaved edits like Crop and Contrast
take that data and save it else where
Also how does one locate where a program like Microsoft Word, Photoshop or ProTools is saving each of the edits a user makes?
The more close you would get to this functionality would be by using the photoshop's built-in scripts. I do not have enough knowledge to talk about this more, and I also doubt its the place to discuss this functionality.
On a more programming oriented point of view, you would need to look at memory photoshop is allocating for this image file and reverse-engineer photoshop's code to understand what happens on every edits you mentionned. I doubt its humanly possible.
If the user is saving the image after each edits though, you could watch for changes in the image, and try to look for the what you want to understand.
You may create a Photoshop plugin or script. But a generic software in such detail I don't think is possible.
I was requested to put a pop-up window on each 3rd usage of an app but I have to control this pop-up so I can take it off whenever I want or change it remotely.
I don't want an alert view, just a background that I will insert myself, that can be controlled from a server.
What's the easy way to do that? Do I need my own server that the app connects to and get a "boolean number" whether to remove it or play it?
The way I handled this was with a configuration file on an amazon s3 bucket. The application downloads the configuration file, and checks the appropriate values for how to behave. It's worked fairly well so far.
http://www.bucketexplorer.com/documentation/amazon-s3--how-to-use-Amazon-s3-for-web-hosting.html
As for the window, you should just use a modal.
http://www.informit.com/articles/article.aspx?p=1771684&seqNum=5