Jump to content

Getting the last folder Paint.NET has used.


Curtis
 Share

Recommended Posts

OK, So I was just wondering, and haven't found anything through searching, where can I get the path of the last folder that Paint.NET has used. The one that Paint.NET uses when it launches a new open file dialog. Thats if plugins are allowed to use it of course.

Link to comment
Share on other sites

So that, in the plugin I'm making, when I launch an open file dialog, the user won't have to navigate all the way back to the last directory they were in to open files, the same way you don't have to navigate around when you open two consecutive files in Paint.NET.

Link to comment
Share on other sites

OK, so I got it working using the registry key, I would prefer to just use a method already provided by Paint.NET, but I suppose this will work for the time being.

What would really be good is if Paint.NET had code for quickly making an open file dialog with all the file type filters and everything pre-set, by working out what file type plugins it has available.

Link to comment
Share on other sites

Please don't tell me your plugin looks directly through the computer's ram and gets the path from there?

How is that even feasible, much less practical?

By the way, Curtis, you can use PaintDotNet.SystemLayer.Settings.CurrentUser.GetString("LastFileDialogDirectory");

I'm not sure if that's legal, though.

Of course, there's nothing wrong with getting it straight from the registry, either.

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...