I creat a button with image menually, like below
Dim aImageButton As New Button
tpgContact.Controls.Add(aImageButton)
aImageButton.Name = entity
aImageButton.Text = ""
aImageButton.Image = Image.FromFile("C:\vb.net\client\images\checkbox_checked.gif")
aimagebutton.ImageAlign = ContentAlignment.MiddleCenter
aimagebutton.FlatStyle = FlatStyle.Flat
aImageButton.Location = New Point(10, y)
aImageButton.Width = 20
aimagebutton.Height = 20
AddHandler aImageButton.Click, AddressOf ImageButtonclickHandler
the problem I have in here is "aImageButton.Image = Image.FromFile("C:\vb.net\client\images\checkbox_checked.gif")" this line of code. If the app install in other computer, then it won't be able to find the same location. What should I do? Is there any way to change the location to fix the need?
Dim aImageButton As New Button
tpgContact.Controls.Add(aImageButton)
aImageButton.Name = entity
aImageButton.Text = ""
aImageButton.Image = Image.FromFile("C:\vb.net\client\images\checkbox_checked.gif")
aimagebutton.ImageAlign = ContentAlignment.MiddleCenter
aimagebutton.FlatStyle = FlatStyle.Flat
aImageButton.Location = New Point(10, y)
aImageButton.Width = 20
aimagebutton.Height = 20
AddHandler aImageButton.Click, AddressOf ImageButtonclickHandler
the problem I have in here is "aImageButton.Image = Image.FromFile("C:\vb.net\client\images\checkbox_checked.gif")" this line of code. If the app install in other computer, then it won't be able to find the same location. What should I do? Is there any way to change the location to fix the need?