Click here to Skip to main content
15,913,854 members
Home / Discussions / C#
   

C#

 
QuestionHotkey to focus my TextBoxes Pin
anderslundsgard10-Jul-07 3:22
anderslundsgard10-Jul-07 3:22 
AnswerRe: Hotkey to focus my TextBoxes Pin
andyharman10-Jul-07 3:31
professionalandyharman10-Jul-07 3:31 
AnswerRe: Hotkey to focus my TextBoxes Pin
mav.northwind10-Jul-07 4:02
mav.northwind10-Jul-07 4:02 
GeneralRe: Hotkey to focus my TextBoxes Pin
anderslundsgard10-Jul-07 20:35
anderslundsgard10-Jul-07 20:35 
GeneralRe: Hotkey to focus my TextBoxes Pin
mav.northwind11-Jul-07 8:36
mav.northwind11-Jul-07 8:36 
QuestionBarcode Software Pin
Brendan Vogt10-Jul-07 3:13
Brendan Vogt10-Jul-07 3:13 
AnswerRe: Barcode Software Pin
mav.northwind10-Jul-07 3:35
mav.northwind10-Jul-07 3:35 
QuestionGetting image from resource file Pin
liqnit10-Jul-07 3:10
liqnit10-Jul-07 3:10 
Hi I am trying to get an image from a resource file into a picturebox.
using the following code:

using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
using System.Reflection;<br />
using System.Resources;<br />
<br />
namespace WindowsApplication16<br />
{<br />
    public partial class Form1 : Form<br />
    {<br />
        public Form1()<br />
        {<br />
            InitializeComponent();<br />
        }<br />
<br />
        private void button1_Click(object sender, EventArgs e)<br />
        {<br />
            Assembly Massem;<br />
            Image Mimage;<br />
            Massem = this.GetType().Assembly;<br />
            ResourceManager RM = new ResourceManager("WindowsApplication16.PH1", Massem);<br />
            Mimage = (Image)RM.GetObject("MIS_1.png");<br />
            pictureBox1.Image = Mimage;<br />
<br />
        }<br />
    }<br />
}


the form has 1 button & 1 picture box.
Resource name is : PH1.resx - inside there is the image file .

the problem :
When the code finsh i get a NULL image.

Please advise.

i used the explanation on the following MSDN:
http://msdn2.microsoft.com/En-US/library/aa984408(VS.71).aspx

Have a nice Day

AnswerRe: Getting image from resource file Pin
mav.northwind10-Jul-07 3:38
mav.northwind10-Jul-07 3:38 
AnswerRe: Getting image from resource file Pin
Luc Pattyn10-Jul-07 4:14
sitebuilderLuc Pattyn10-Jul-07 4:14 
QuestionFile Conversion from CSV format Excel format in C# [modified] Pin
liyakhat_shahid10-Jul-07 3:00
liyakhat_shahid10-Jul-07 3:00 
AnswerRe: File Conversion from CSV format Excel format in C# Pin
Not Active10-Jul-07 3:06
mentorNot Active10-Jul-07 3:06 
GeneralRe: File Conversion from CSV format Excel format in C# Pin
liyakhat_shahid10-Jul-07 3:16
liyakhat_shahid10-Jul-07 3:16 
AnswerRe: File Conversion from CSV format Excel format in C# Pin
rp_suman10-Jul-07 3:32
rp_suman10-Jul-07 3:32 
AnswerRe: File Conversion from CSV format Excel format in C# Pin
J4amieC10-Jul-07 4:13
J4amieC10-Jul-07 4:13 
GeneralRe: File Conversion from CSV format Excel format in C# Pin
liyakhat_shahid10-Jul-07 4:21
liyakhat_shahid10-Jul-07 4:21 
GeneralRe: File Conversion from CSV format Excel format in C# Pin
Martin#10-Jul-07 4:42
Martin#10-Jul-07 4:42 
GeneralRe: File Conversion from CSV format Excel format in C# Pin
liyakhat_shahid11-Jul-07 19:50
liyakhat_shahid11-Jul-07 19:50 
AnswerRe: File Conversion from CSV format Excel format in C# Pin
Ed.Poore10-Jul-07 5:15
Ed.Poore10-Jul-07 5:15 
Questionsearch dialog Pin
topksharma198210-Jul-07 2:59
topksharma198210-Jul-07 2:59 
AnswerRe: search dialog Pin
Luc Pattyn10-Jul-07 3:07
sitebuilderLuc Pattyn10-Jul-07 3:07 
GeneralRe: search dialog Pin
topksharma198210-Jul-07 4:07
topksharma198210-Jul-07 4:07 
GeneralRe: search dialog Pin
Luc Pattyn10-Jul-07 4:18
sitebuilderLuc Pattyn10-Jul-07 4:18 
GeneralRe: search dialog Pin
Luc Pattyn10-Jul-07 4:20
sitebuilderLuc Pattyn10-Jul-07 4:20 
AnswerRe: search dialog Pin
mav.northwind10-Jul-07 3:40
mav.northwind10-Jul-07 3:40 

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.