Question:
Open Program in current directory? (VB)?
?
2010-11-22 02:44:10 UTC
Need to know how to open a program from the VB program's current directory. I know how to open a folder in the current directory:


Shell("explorer.exe " & My.Application.Info.DirectoryPath, vbNormalFocus)

Can't work out how to open a ".exe" though :S
Three answers:
?
2010-11-23 09:27:47 UTC
You just need to type:



Shell ("file name")



where 'file name' is the name of the file you want to open, with the file extension



This will make the program search for the file in its own directory
anonymous
2010-11-23 08:25:37 UTC
Process.Start
?
2016-11-29 06:05:53 UTC
you need to use a context as given decrease than to shop your background archives...in basic terms shop each and each occasion of this way in an array/sequence and then write the information to record whilst remaining by using iterating throw each and each merchandise and calling the .ToCommaSeperatedString() approach and writing to each and each line in record.... once you desire to load it, in basic terms circulate by using each and each line of record and bypass it to the shared function .parse to get a sparkling occasion of the class..it is likewise possible to objective it by using using TryParse approach.... Imports device.text fabric Public type VisitedWebPage Dim mVisitDate As DateTime Dim mURL As String Dim mTitle As String Public sources identify() As String Get return mTitle end Get Set(ByVal fee As String) mTitle = RemoveComma(fee) end Set end sources Public sources URL() As String Get return mURL end Get Set(ByVal fee As String) mURL = RemoveComma(fee) end Set end sources Public sources VisitDate() As DateTime Get return mVisitDate end Get Set(ByVal fee As DateTime) mVisitDate = fee end Set end sources inner maximum function RemoveComma(ByVal Expression As String) As String return replace(Expression, ",", "") end function Public Shared function TryParse(ByVal Expression As String) As Boolean attempt Parse(Expression) return actual capture ex As Exception return fake end attempt end function Public Shared function Parse(ByVal Expression As String) As VisitedWebPage Dim str() As String str = cut up(Expression, ",") attempt If str.length <> 3 Then Throw New Exception("Invalid style of fields") If DateTime.TryParse(str(2), New DateTime) = fake Then Throw New Exception("Invalid DateTime container.") Dim tVWP As New VisitedWebPage tVWP.identify = str(0) tVWP.URL = str(a million) tVWP.VisitDate = DateTime.Parse(str(2)) return tVWP ultimately str = not something end attempt return not something end function Public function ToCommaSeperatedString() As String Dim str As New StringBuilder str.AppendFormat("{0},{a million},{2}", mTitle, mURL, mVisitDate.ToString) return str.ToString end function end type additionally you may attempt using XML format to shop archives yet i don't know on using XML.....


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...