How to specify relative path to resource file in sVB .xaml file?

Absolute Beginner 171 Reputation points

(translated by Google translator)

Please tell me how to specify in sVB .xaml file relative path to image file that I want to make the background for the form?
Right now, I know how specify only an absolute path in the Form Editor. If I move the project folder, then the absolute path doesn't work.


A programming language created by Microsoft that serves a stepping stone for beginners from block-based coding languages to more complex text-based languages.
279 questions
0 comments No comments
{count} votes

Accepted answer
  1. Small Visual Basic 411 Reputation points

    I created the ultimate fix for this. Now you can use the designer to create an image brush for the form and controls backgrounds, foregrounds and even borders, and sVB will copy the image to the project flder, and save its relative path. The Save As commands no copy images with .sb and .xaml files to the new destination.
    Please download the latest update of sVB v2.6.8

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. WhTurner 1,611 Reputation points

    You can just as in SmallBasic use as the start of the filename "Program.Directory" which is the directory in which your program runs.
    You can alwways point to another directory relative to the current one, e.g. with Program.Directory/.. to use the parent directory.

  2. WhTurner 1,611 Reputation points

    How and why do you want me to talk to you?

    0 comments No comments