[RESOLVED] App.path in VB2005 mobile app
Hi!
1. What's the conversion or codes of App.path of vb6 to vb2005 mobile application?
2. What's the best to practice in mobile application in database connection?
- Hard coded or by object (direct connect)
hope i deliver it right!
Thanks guys! :wave:
Re: App.path in VB2005 mobile app
Hi,
for app.path do...
AppPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase )
Sorry - don't think I understand 2, but hard-coding generally is a no-no :)
I keep my connection strings in an XML file
Pete
Re: App.path in VB2005 mobile app
thank sir! Now i got the path but the problem i cant apply it to a picturebox. You see i need to load a picture in a specific path. When i search on an item i have to load the designated picture. Why my picturebox cant load picture by path?
my code is: (ofcourse error occur)
ImageViewer.Image = System.Drawing.bitmap(sFullPath)
Thanks sir!
Re: App.path in VB2005 mobile app
Try
imageviewer.image = new bitmap(sfullpath)
Pete
Re: App.path in VB2005 mobile app
Thanks sir i think its going to work. I just cant test it cause i dont know how to path the location of Storage card of the device in emulator. but the path you gave works.
------------------------------------------------------------
thanks for the help sir pete. Its working now! thanks a lot sir!