Click here to Skip to main content
15,917,808 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Reading a txt file in textbox from listview Pin
WetRivrRat26-May-05 15:31
WetRivrRat26-May-05 15:31 
GeneralRe: Reading a txt file in textbox from listview Pin
Christian Graus26-May-05 15:33
protectorChristian Graus26-May-05 15:33 
GeneralRe: Reading a txt file in textbox from listview Pin
Dave Kreskowiak27-May-05 2:14
mveDave Kreskowiak27-May-05 2:14 
GeneralRe: Reading a txt file in textbox from listview Pin
Dave Kreskowiak27-May-05 2:15
mveDave Kreskowiak27-May-05 2:15 
GeneralRe: Reading a txt file in textbox from listview Pin
Christian Graus27-May-05 2:45
protectorChristian Graus27-May-05 2:45 
GeneralConnect to MS Outlook Pin
dw192825-May-05 16:01
dw192825-May-05 16:01 
GeneralRe: Connect to MS Outlook Pin
pfalco26-May-05 10:48
pfalco26-May-05 10:48 
GeneralImages in a Usercontrol Pin
tibmark25-May-05 15:57
tibmark25-May-05 15:57 
I am trying to develop a new usercontrol that has a default image I need to load. I have an embedded bitmap and using the following code to retrieve it.

Dim executing_assembly As System.Reflection.Assembly = Me.GetType.Assembly.GetEntryAssembly()

' Get our namespace.
Dim my_namespace As String = executing_assembly.GetName().Name.ToString()

' Load three pictures.
Dim picture_stream As Stream
Dim bm As Bitmap

picture_stream = executing_assembly.GetManifestResourceStream(my_namespace + ".Checked.bmp")
If Not (picture_stream Is Nothing) Then
bm = New Bitmap(picture_stream)
picturebox.Image = bm
picture_stream.Close()
End If

When i reference my control(dll) and try to use it in another app. it does not work all i get is Object Reference not set to an instance of an object.

But when i use the code by its self in another project it works.

What it boils down to is how can i store/embed an image in a usercontrol dll.



Thanks in advance.

Mark Thibodeaux
GeneralRe: Images in a Usercontrol Pin
Christian Graus25-May-05 16:05
protectorChristian Graus25-May-05 16:05 
GeneralRe: Images in a Usercontrol Pin
tibmark25-May-05 16:18
tibmark25-May-05 16:18 
GeneralRe: Images in a Usercontrol Pin
Christian Graus25-May-05 16:22
protectorChristian Graus25-May-05 16:22 
GeneralRe: Images in a Usercontrol Pin
tibmark25-May-05 16:47
tibmark25-May-05 16:47 
GeneralRe: Images in a Usercontrol Pin
Christian Graus25-May-05 16:49
protectorChristian Graus25-May-05 16:49 
GeneralRe: Images in a Usercontrol Pin
tibmark25-May-05 16:54
tibmark25-May-05 16:54 
GeneralRe: Images in a Usercontrol Pin
Christian Graus25-May-05 17:00
protectorChristian Graus25-May-05 17:00 
GeneralRe: Images in a Usercontrol Pin
tibmark25-May-05 17:21
tibmark25-May-05 17:21 
GeneralRe: Images in a Usercontrol Pin
Christian Graus25-May-05 17:36
protectorChristian Graus25-May-05 17:36 
GeneralRe: Images in a Usercontrol Pin
rswipe26-May-05 5:04
rswipe26-May-05 5:04 
GeneralRe: Images in a Usercontrol Pin
tibmark26-May-05 13:20
tibmark26-May-05 13:20 
Generalvalidation on controls bound to well defined datatables, vb.net Pin
Anonymous25-May-05 13:20
Anonymous25-May-05 13:20 
Questionvalidating data entry in vb.net forms, use regular expressions? Pin
blah engineer25-May-05 13:14
sussblah engineer25-May-05 13:14 
AnswerRe: validating data entry in vb.net forms, use regular expressions? Pin
Scott Page25-May-05 14:55
professionalScott Page25-May-05 14:55 
GeneralLearning programming using VB.NET Pin
Kettlewell25-May-05 10:37
Kettlewell25-May-05 10:37 
GeneralRe: Learning programming using VB.NET Pin
Scott Page25-May-05 15:05
professionalScott Page25-May-05 15:05 
GeneralRe: Learning programming using VB.NET Pin
Kettlewell25-May-05 20:22
Kettlewell25-May-05 20:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.