Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
In ADO, the path to the database has to be exact be it in varible format or "C:\whatever\whatever.mdb". I was wondering if picture boxes are the same. Do I need to define in code where the image is "application.startuppath" or does the elipses use the app startup path?
Posted
'this should default to the directory the application is in
PictureBox1.Image = New Bitmap("MyBitmap.bmp")

'if it doesn't work use this little function
Public Function AppPath() As String
       Return System.AppDomain.CurrentDomain.BaseDirectory()
End Function

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

  • Leaders
Posted

If I were you then I would change the .bmp to .png.

 

Regardless of the image format, you still use the same Bitmap constructor and the behavior is the same.

[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...