Sinisterly
[Help] Codedom and recource file - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.ly/Forum-Visual-Basic-NET-Framework)
+--- Thread: [Help] Codedom and recource file (/Thread-Help-Codedom-and-recource-file)



[Help] Codedom and recource file - Zerr0 - 06-04-2012

Hi HC Biggrin

I have little problem with my application.

I created an application that use codedom to compile another application and Add picture in Recource and it works good.

But how I invoke that image in my application.

I tried this but it does not work.

Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim resslika As New System.Resources.ResourceManager("an.png", System.Reflection.Assembly.GetExecutingAssembly) PictureBox1.Image = resslika.GetObject("an.png") End Sub



RE: [Help] Codedom and recource file - Jacob - 06-04-2012

Wait...you want the a picture from your resources to be set to a Picturebox when you press a button?


RE: [Help] Codedom and recource file - Zerr0 - 06-04-2012

(06-04-2012, 12:31 PM)Jacob Wrote: Wait...you want the a picture from your resources to be set to a Picturebox when you press a button?

Yes, exactly


RE: [Help] Codedom and recource file - ArkPhaze - 06-04-2012

lol, why are you doing this?

Code:
PictureBox1.Image = Image.FromHbitmap(My.Resources.claw.GetHbitmap)

The image I had in resources was "claw.png", therefore in resources referenced as "claw"


RE: [Help] Codedom and recource file - Zerr0 - 06-05-2012

Don't work but Thanks anyway.

"resource is not member of My" in codedom


RE: [Help] Codedom and recource file - ArkPhaze - 06-05-2012

I'm not talking about CodeDom... Why do you need CodeDom to display an image from resources inside a picturebox? I didn't post any CodeDom in my example. It does work, I don't post solutions that don't work.


RE: [Help] Codedom and recource file - Jacob - 06-05-2012

What he wants is his codedom generated executable to have an image from resources. I looked as his code, his main form is a form with one big button. When pressed, it generates an executable with buttons and other controls alike.


To OP, you're better off uploading the image to your server or imgur/tinypic. Then grabbing the image directly and setting it.


RE: [Help] Codedom and recource file - Zerr0 - 06-05-2012

Actually I'm working on crypter, which uses image data storage method. Or Stenography


RE: [Help] Codedom and recource file - Zerr0 - 06-05-2012

Actually I'm working on crypter, which uses image data storage method. Or Stenography