I have set a background image in page properties, then this function to change it:
For the new background image to take effect I need to restart the application, I have tried Page.Redraw () and Application.SetRedraw(true); but I still need to restart the application for the background to change, how can I do this in apms?
Thanks.
Code:
function backgrounds() -- Display a single-selection file browse dialog result = Dialog.FileBrowse(true, "Load Background File", _SourceFolder .. "\\AutoPlay\\Docs\\Backgrounds\\", "Png File (*.png)|*.png|All Files (*.*)|*.*|", "", "", false, true); result2 = String.Replace(result[1], [[\]], [[\\]], false); -- If CANCEL was not chosen, then let's get the file path if (result[1] ~= "CANCEL") then File.Copy(result2, _SourceFolder .. "\\AutoPlay\\Images\\Background.png", true, true, false, false, nil); end end
Thanks.
Comment