Click here to Skip to main content
15,926,507 members
Home / Discussions / C#
   

C#

 
GeneralAutofill Dropdownlist Pin
greglh3-Feb-05 2:10
greglh3-Feb-05 2:10 
GeneralRe: Autofill Dropdownlist Pin
MyThread3-Feb-05 6:22
MyThread3-Feb-05 6:22 
Generaldiffrent results everytime Pin
Ahmed Galal3-Feb-05 1:42
Ahmed Galal3-Feb-05 1:42 
GeneralRe: diffrent results everytime Pin
Christian Graus3-Feb-05 8:37
protectorChristian Graus3-Feb-05 8:37 
Generalbitmap background issue and resources Pin
Aviv Halperin3-Feb-05 0:48
Aviv Halperin3-Feb-05 0:48 
GeneralRe: bitmap background issue and resources Pin
Judah Gabriel Himango3-Feb-05 5:03
sponsorJudah Gabriel Himango3-Feb-05 5:03 
GeneralRe: bitmap background issue and resources Pin
Aviv Halperin3-Feb-05 6:48
Aviv Halperin3-Feb-05 6:48 
GeneralRe: bitmap background issue and resources Pin
Christian Graus3-Feb-05 8:41
protectorChristian Graus3-Feb-05 8:41 
1. TRy creating an imageattributes class instance and setting the transparent key on that. I didn't know bitmaps had a MakeTransparent method, I've never used it.

2. Yes, absolutely. Just make the bitmap part of your project, then change it's properties so that it is an embedded resource. Then you can load it as a resource, using code like this:

		private static Bitmap GetImageFromResources(string name)<br />
		{<br />
			// get a reference to the current assembly<br />
			Assembly a = Assembly.GetExecutingAssembly();	<br />
<br />
			string my_namespace = a.GetName().Name.ToString();<br />
<br />
			Bitmap image = new Bitmap(a.GetManifestResourceStream(my_namespace + "." + name));<br />
<br />
			return image;<br />
		}


Put that functions somewhere and call it to load your bitmaps. The name can need qualification by namespace, depending on where in the project it is.


Christian

I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
GeneralRe: bitmap background issue and resources Pin
Aviv Halperin3-Feb-05 22:57
Aviv Halperin3-Feb-05 22:57 
GeneralODBC Programming Pin
Adnan Siddiqi2-Feb-05 23:45
Adnan Siddiqi2-Feb-05 23:45 
GeneralRe: ODBC Programming Pin
Heath Stewart3-Feb-05 0:17
protectorHeath Stewart3-Feb-05 0:17 
GeneralMulti-monitor Pin
SquallBlade2-Feb-05 23:19
SquallBlade2-Feb-05 23:19 
GeneralRe: Multi-monitor Pin
Heath Stewart2-Feb-05 23:23
protectorHeath Stewart2-Feb-05 23:23 
GeneralTransparent tabcontrol Pin
Member 8094092-Feb-05 22:54
Member 8094092-Feb-05 22:54 
GeneralReflection question Pin
Christian Graus2-Feb-05 18:25
protectorChristian Graus2-Feb-05 18:25 
GeneralRe: Reflection question Pin
Robert Rohde2-Feb-05 20:15
Robert Rohde2-Feb-05 20:15 
GeneralRe: Reflection question Pin
Christian Graus3-Feb-05 10:09
protectorChristian Graus3-Feb-05 10:09 
GeneralRe: Reflection question Pin
Heath Stewart2-Feb-05 23:19
protectorHeath Stewart2-Feb-05 23:19 
GeneralRe: Reflection question Pin
Christian Graus3-Feb-05 10:08
protectorChristian Graus3-Feb-05 10:08 
GeneralRe: Reflection question Pin
Christian Graus3-Feb-05 11:00
protectorChristian Graus3-Feb-05 11:00 
GeneralRe: Reflection question Pin
Heath Stewart3-Feb-05 11:10
protectorHeath Stewart3-Feb-05 11:10 
GeneralRe: Reflection question Pin
Christian Graus3-Feb-05 11:13
protectorChristian Graus3-Feb-05 11:13 
GeneralComputer name and IP Pin
Luis Alonso Ramos2-Feb-05 16:05
Luis Alonso Ramos2-Feb-05 16:05 
GeneralRe: Computer name and IP Pin
mav.northwind2-Feb-05 22:44
mav.northwind2-Feb-05 22:44 
GeneralRe: Computer name and IP Pin
Luis Alonso Ramos3-Feb-05 5:59
Luis Alonso Ramos3-Feb-05 5:59 

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.