GetLastPath Method (GdViewer)
In This Topic
Returns the file path of the latest loaded or saved file using this GdViewer control. The stored value is not erased after closing the file. It is only overwritten with each new file loading or saving operation.
Be aware that both AddEmbeddedImageAnnotInteractive(String,Boolean,Color,Single,Single) and %AddEmbeddedImageAnnotInteractive(string, bool, int, float, float)% methods overwrite the last used path with their ImagePath parameter.
Syntax
'Declaration
Public Function GetLastPath() As String
public string GetLastPath()
public function GetLastPath(): String;
public function GetLastPath() : String;
public: string* GetLastPath();
public:
String^ GetLastPath();
Return Value
The file path of the latest loaded or saved file.
Example
How to retrieve the file path of the latest loaded file.
'We assume that the GdViewer1 control has been properly integrated.
Dim status As GdPictureStatus = GdViewer1.DisplayFromFile("")
If status = GdPictureStatus.OK Then
MessageBox.Show("The loaded file path is: " + GdViewer1.GetLastPath(), "GdViewer.GetLastPath")
Else
MessageBox.Show("The file can't be loaded. Status: " + status.ToString(), "GdViewer.GetLastPath")
End If
//We assume that the GdViewer1 control has been properly integrated.
GdPictureStatus status = GdViewer1.DisplayFromFile("");
if (status == GdPictureStatus.OK)
MessageBox.Show("The loaded file path is: " + GdViewer1.GetLastPath(), "GdViewer.GetLastPath");
else
MessageBox.Show("The file can't be loaded. Status: " + status.ToString(), "GdViewer.GetLastPath");
Example
How to retrieve the file path of the latest loaded file.
'We assume that the GdViewer1 control has been properly integrated.
Dim status As GdPictureStatus = GdViewer1.DisplayFromFile("")
If status = GdPictureStatus.OK Then
MessageBox.Show("The loaded file path is: " + GdViewer1.GetLastPath(), "GdViewer.GetLastPath")
Else
MessageBox.Show("The file can't be loaded. Status: " + status.ToString(), "GdViewer.GetLastPath")
End If
//We assume that the GdViewer1 control has been properly integrated.
GdPictureStatus status = GdViewer1.DisplayFromFile("");
if (status == GdPictureStatus.OK)
MessageBox.Show("The loaded file path is: " + GdViewer1.GetLastPath(), "GdViewer.GetLastPath");
else
MessageBox.Show("The file can't be loaded. Status: " + status.ToString(), "GdViewer.GetLastPath");
See Also
Reference
GdViewer Class
GdViewer Members
AddEmbeddedImageAnnotInteractive(String,Boolean,Color,Single,Single) Method
AddEmbeddedImageAnnotInteractive(string, bool, int, float, float)
AddEmbeddedImageAnnotInteractive(String,Boolean,Color,Single,Single) Method
AddEmbeddedImageAnnotInteractive(string, bool, int, float, float)
DisplayFromFile(String) Method
SaveDocumentToJPEG(String,Int32) Method
SaveDocumentToPDF(String) Method
SaveDocumentToTIFF(String,TiffCompression) Method
AddEmbeddedImageAnnotInteractive(String,Boolean,Color,Single,Single) Method
AddEmbeddedImageAnnotInteractive(string, bool, int, float, float)