Page 1 of 1

custom resources access from Macro

PostPosted: Thu Apr 06, 2023 9:11 am
by crashXpert
Hi,
I'm new both on this forum and on UCCNC.
I'm trying to customize my UCCNC adding/modifying some macros. In one of them, I display a Forms with a custom picture. But I have to put the Full Path of the image. I try to find a way to get a relative path, because if I duplicate my profile, my flashscreen or screens, I don't want to have to edit all macros. I try to find a way to have the full path of the Macros_<profile> directory by code, but I failed. System.IO.Directory.GetCurrentDirectory() give the root directory from where the UCCNC shorcut is started.
Did someone find a way to compute by code in macros a Path for custom resources (and not put the full path in clear) ?
Hopping my question is clear.
Thanks

Re: custom resources access from Macro

PostPosted: Thu Apr 06, 2023 11:20 am
by dezsoe
Use e.g. Application.StartupPath + @"\Screens\".