What is the difference between My.Computer.FileSystem.MoveFile and File.Move [closed] - vb.net

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
The question says it all really.
What are the differences between these two methods that appear to carry out exactly the same function?
Is there guidance to say which should be used or are there conditions when you may use either?

The FileSystem.MoveFile has some more options than File.Move, like for example optionally showing a progress dialog, and creating the destination folder if it doesn't exist.
If you just want to move or rename a file, the File.Move method will be called in the end whichever you use, so calling it directly means slightly less overhead.

I believe they have near-identical functionality. Most people I've seen would prefer to use the latter, because "MyComputer." is a VB.NET-only construct, whereas File.Move is used in both C# and VB.NET. This makes it easier to get help, and easier for C# coders to read the VB.NET code and vice-versa.

I haven't checked My.Computer.FileSystem.MoveFile, but you can state if they are differences moving html files with associated images directories., because File.Move just move the file, but doesn't move the associated directory

Related

Unreal Engine 4 In-game Screenshot [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
Is there a way to take a screenshot in UE4 while in-game and save it somewhere so that I can use it again as an image or something?
There is a HighResShot solution, but that saves it somewhere outside the range of the editor (you cannot reach it programmatically), is there another way of doing it, that allows me to access it in-game?
I would recommend using HighResShot for taking the screenshots. As you mention, it saves this outside the range of the engine, in the "saved" folder. (In packaged builds, the saved content is in the user's appdata.) You can actually get this with ProjectSavedDir(), which returns this saved directory. https://docs.unrealengine.com/en-US/API/Runtime/Core/Misc/FPaths/index.html
It's C++, but you can expose this to Blueprints fairly easily. You can get the ProjectSavedDir()/Screenshots directory and load the images in-game. For doing this, I recommend the Ramas plugin (https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/4014-39-rama-s-extra-blueprint-nodes-for-you-as-a-plugin-no-c-required?3851-(39)-Rama-s-Extra-Blueprint-Nodes-for-You-as-a-Plugin-No-C-Required=)

Is there a way to use VBA to modify other VBA code? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I don't know where to start with this. If there is a way, all I need is an object name or collection name, so I can look up the feature on Microsoft's site, and go from there. But, searching there directly didn't turn anything up.
You're probably looking for the VBE Extensibility Library.
However note that depending on what you're actually trying to do ("modify other VBA code"), it may be very hard, if not impossible to implement.
The library will let you iterate modules, locate their members, pull the actual code into strings (from entire modules or just a given procedure)... but that's as granular as it gets.
If you're trying to do anything that requires understanding of the code's semantics, the VBIDE API won't be enough: you need a lexer and a parser for that... and I've yet to see a successful lexer/parser for VBA, written in VBA.
Good luck!

Does Zerobrane provide an "include" mechanism? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
To Zerobrane users, since this is not a question on lua :
I use Zerobrane for editing lua programs that are to be used with LuaLatex. Very nice !
I make all tests there before using the developments in LuaLatex. So, at the beginning, the programs are run there. I need to tidy up this part, on ZeroBrane, by making files hierarchical, with a master file and slave files around.
Once again, it is a question about ZeroBrane, not about how I use the file within LuaLatex (I know enough about doFile, luaexec and co)
Does this exist ?
I saw PaulK passing by, if he could drop a line, it would be appreciated ...
An "include mechanism" as you call it is usually a language feature, not some feature of an IDE.
Lua provides various functions for running code from other files.
dofile, load, loadfile, require, ...
The most convenient and common is require which will find a file by its name in a given set of directories and execute its contents.
Read this:
https://www.lua.org/manual/5.3/manual.html#6.3
https://www.lua.org/pil/8.1.html
https://www.tutorialspoint.com/lua/lua_modules.htm

custom container [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
In SAP,
can we have a push button on custom container in ALV. Is it possible or is there any other possibilities for that.? Pls help me...
Thanks in advance
Well, I would rather use custom containers for things like tableviews. If you are working with the standard Dynpros you can just add a button in the dynpro designer and implement the behaviour you would like. To give a more detailled answer, I would need to know what you are planning to do. Of course you can also create a ALV grid and modify the buttons which are displayed there. Maybe you elaborate a little bit more what you're planning to do and then I can give you a recommendation.
Yes, this is possible - check out class CL_GUI_TOOLBAR and the associated documentation (like http://help.sap.com/printdocu/core/Print46c/de/data/pdf/BCCITOOLBAR/BCCITOOLBAR.pdf) and sample programs. AFAIR there's a demo program that lets you assemble a toolbar dynamically, I just don't remember the name. You'll usually want to insert some kind of splitter first, then add the toolbar to one side of the container so that you can place other elements like trees or tables next to it.

How do you decide which API function documentations to read and how seriously? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Suppose that you are writing or maintaining a piece of code that uses some API that you are not 100% familiar with.
How do you decide whether to read the documentation of a certain call target, and how much time to spend reading it? How do you decide not to read it?
(Let's assume you can read it by opening the HTML documentation, inspecting the source code, or using the hover mechanism in the IDE).
Ideally you should read all of it, but we know that's a pain in the... you know. What I normally do on those cases (and I did that a lot while I worked as a freelancer) is weight some factors and depending on the result, I read the docs.
Factors that tell me I shouldn't read the docs:
What the function does is easy to guess from the name.
It isn't relevant to the code I'm maintaining: for example, you are checking how some code deletes files, and you have some function that obviously does some UI update. You don't care about that for now.
If debugging: the function didn't change the program state in a way meaningful to the task at hand. As before, you don't want to learn what SetOverlayIcon does, if you are debugging the deletion code because it's dying with a file system error.
The API is just a special case of an API you already know and you can guess what the special case is, and what the special arguments (if any) do. For example, let's say you have WriteToFile(string filename) and WriteToFile(string filename, boolean overwrite).
Of course, everything depends on the context, so even those rules have exceptions.