J
JamesL
OK,
I am trying to create a form in VB.NET program for the pocket PC. I want to
display my logo on the form. I put a picture box on the form. I get the
application path. I attach the filename to the path. But, the visualstudio
help tells me to use the command:
picturebox.image = image.fromfile(filename)
However, fromfile is not an option for the pocket_pc, only desktop VB.NET.
Below is the code I have:
Imports System.IO
Imports System.Reflection
Private Sub frmLogo_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
' This is the full directory and exe name
Dim fullAppName As String =
[Assembly].GetCallingAssembly().GetName().CodeBase
' This strips off the exe name
Dim fullAppPath As String = Path.GetDirectoryName(fullAppName)
' This adds a file name to the path
Dim fullFileName As String = Path.Combine(fullAppPath, "Logo.bmp")
Now how do I put the Logo.bmp on the image of the picturebox?
Or is there a better way to get my image to appear on the form, maybe as a
background image on the form itself?
James
End Sub
I am trying to create a form in VB.NET program for the pocket PC. I want to
display my logo on the form. I put a picture box on the form. I get the
application path. I attach the filename to the path. But, the visualstudio
help tells me to use the command:
picturebox.image = image.fromfile(filename)
However, fromfile is not an option for the pocket_pc, only desktop VB.NET.
Below is the code I have:
Imports System.IO
Imports System.Reflection
Private Sub frmLogo_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
' This is the full directory and exe name
Dim fullAppName As String =
[Assembly].GetCallingAssembly().GetName().CodeBase
' This strips off the exe name
Dim fullAppPath As String = Path.GetDirectoryName(fullAppName)
' This adds a file name to the path
Dim fullFileName As String = Path.Combine(fullAppPath, "Logo.bmp")
Now how do I put the Logo.bmp on the image of the picturebox?
Or is there a better way to get my image to appear on the form, maybe as a
background image on the form itself?
James
End Sub