DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   VB.NET (http://www.daniweb.com/forums/forum58.html)
-   -   How to Set Application Path (http://www.daniweb.com/forums/thread156516.html)

sganandhsg Nov 11th, 2008 1:15 am
How to Set Application Path
 
hi friends

How to set application path using VB.Net using MySQL.....

The same function using VB 6.0 as
Public AttnPath As String
AttnPath = App.Path & "\Data" this type, i need vb.net help me plz...






Regards
Anandh

Pgmer Nov 11th, 2008 4:04 am
Re: How to Set Application Path
 
In vb.net u need to use the property called Application.StartupPath="path u want to give"

sganandhsg Nov 11th, 2008 4:17 am
Re: How to Set Application Path
 
Quote:

Originally Posted by Pgmer (Post 733078)
In vb.net u need to use the property called Application.StartupPath="path u want to give"



Thanks for ur replay.. I`ll use this but error msg displayed for " Property is "startuppath " is Read only"

Renukavani Nov 11th, 2008 5:24 am
Re: How to Set Application Path
 
Quote:

Originally Posted by sganandhsg (Post 733093)
Thanks for ur replay.. I`ll use this but error msg displayed for " Property is "startuppath " is Read only"

hi
u have specify like
Quote:

Application.StartupPath + " u can specfy remaining path here"
Application.startuppath means it wil show upto bin folder then concatenate with this " u can specfy remaining path here"

if ur probelm solved plz mark as solved

Pgmer Nov 11th, 2008 5:25 am
Re: How to Set Application Path
 
yes Ur correct application.startuppath will give you the path where Ur executable files are there in the machine.
Application.StartupPath + " the desired path u want to be"

sganandhsg Nov 11th, 2008 5:35 am
Re: How to Set Application Path
 
Quote:

Originally Posted by Pgmer (Post 733142)
yes Ur correct application.startuppath will give you the path where Ur executable files are there in the machine.
Application.StartupPath + " the desired path u want to be"

Any Declare Variable contain This Path

Renukavani Nov 11th, 2008 5:49 am
Re: How to Set Application Path
 
hi
i tried like this for ur ?
Quote:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.Text = Application.StartupPath()
End Sub
or

Application.StartupPath & "\\DataBase\\dbname.db"


All times are GMT -4. The time now is 10:21 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC