PDA

Click to See Complete Forum and Search --> : [RESOLVED] App.path in VB2005 mobile app


kryptonboy22
Mar 29th, 2008, 05:53 AM
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:

petevick
Mar 29th, 2008, 02:31 PM
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

kryptonboy22
Mar 30th, 2008, 01:06 AM
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!

petevick
Mar 31st, 2008, 02:16 AM
Try
imageviewer.image = new bitmap(sfullpath)

Pete

kryptonboy22
Mar 31st, 2008, 02:44 AM
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!