Forms are already closed (with a save prompt if dirty) before the backup, but so far, I haven't been able to figure out how to do the same with Tables or Query windows. The best I can come up with is to detect them as open, and ask the user to deal with them appropriately (manually).
Anyway, found this documentation (with help from another guy), which once I understand it might help get this done.