Click here to Skip to main content
15,914,452 members
Home / Discussions / C#
   

C#

 
Questionhow to show out the photo from access database??? Pin
jasonyip_200530-Dec-05 3:15
jasonyip_200530-Dec-05 3:15 
AnswerRe: how to show out the photo from access database??? Pin
Guffa30-Dec-05 4:12
Guffa30-Dec-05 4:12 
QuestionPlace a form before show it Pin
Sasuko30-Dec-05 3:12
Sasuko30-Dec-05 3:12 
AnswerRe: Place a form before show it Pin
ika230-Dec-05 3:36
ika230-Dec-05 3:36 
AnswerRe: Place a form before show it Pin
Darryl Borden30-Dec-05 5:24
Darryl Borden30-Dec-05 5:24 
Questionhow to override the button draw event? Pin
Sasuko29-Dec-05 23:55
Sasuko29-Dec-05 23:55 
AnswerRe: how to override the button draw event? Pin
VPMahank30-Dec-05 4:06
VPMahank30-Dec-05 4:06 
QuestionForm return value and interface question Pin
john111333429-Dec-05 23:52
john111333429-Dec-05 23:52 
Hello, here are some beginners questions

First, how do i get a form to return a value? If i allow the user to select something, like a object of some kind, how do i return this object to the class that called the form?


Secondly, how do i determine if a class fulfills a certain interface?
To clarify this question, i have this function that loads DLL:s but theese contain many classes, and i wont it only to load those classes that implements the IMyForm interface, please advice

private Form loadPlugIns(String dllName) {<br />
            try<br />
            {<br />
                Assembly MyAssembly = Assembly.LoadFrom(dllName);<br />
                Type[] Types = MyAssembly.GetTypes();<br />
<br />
                foreach (Type oType in Types)<br />
                {<br />
                    try<br />
                    {<br />
                        if ((oType.IsClass == true))<br />
                        {                            <br />
                            object ibaseObject = Activator.CreateInstance(oType);<br />
                            //object[] arguments = new object[] { this };<br />
                            Form form;<br />
                            // Dynamically Invoke the Object<br />
                            form = (Form)oType.InvokeMember("getForm", BindingFlags.Default | BindingFlags.InvokeMethod,<br />
                                null, ibaseObject, null);<br />
                            return form;<br />
                        }<br />
                    } catch (Exception ex)<br />
                    {<br />
                        VirheHallinta.LogException("Failed to load module.", ex);<br />
                    }<br />
                }<br />
                return null;<br />
            } catch (Exception ex)<br />
            {<br />
                System.Windows.Forms.MessageBox.Show(ex.ToString());<br />
                return null;<br />
            }<br />
        }


Hm, looks awfull (my code) in the window...
R
Johan

-- modified at 6:01 Friday 30th December, 2005
AnswerRe: Form return value and interface question Pin
Robert Rohde30-Dec-05 2:09
Robert Rohde30-Dec-05 2:09 
GeneralRe: Form return value and interface question Pin
john111333430-Dec-05 3:15
john111333430-Dec-05 3:15 
QuestionForms messaging Pin
navvara the infantryman29-Dec-05 23:45
navvara the infantryman29-Dec-05 23:45 
QuestionProblem with InstallUtil Pin
User 189529729-Dec-05 23:22
User 189529729-Dec-05 23:22 
QuestionWindows Forms Tab Control Pin
Aryadip29-Dec-05 22:55
Aryadip29-Dec-05 22:55 
AnswerRe: Windows Forms Tab Control Pin
Darryl Borden30-Dec-05 3:54
Darryl Borden30-Dec-05 3:54 
AnswerRe: Windows Forms Tab Control Pin
Curtis Schlak.30-Dec-05 4:46
Curtis Schlak.30-Dec-05 4:46 
QuestionProblem with SQL Sentence !!!!! Pin
coloso29-Dec-05 22:52
coloso29-Dec-05 22:52 
AnswerRe: Problem with SQL Sentence !!!!! Pin
PrakashBhaskar29-Dec-05 23:11
PrakashBhaskar29-Dec-05 23:11 
GeneralRe: Problem with SQL Sentence !!!!! Pin
coloso29-Dec-05 23:27
coloso29-Dec-05 23:27 
AnswerRe: Problem with SQL Sentence !!!!! Pin
leppie29-Dec-05 23:25
leppie29-Dec-05 23:25 
GeneralRe: Problem with SQL Sentence !!!!! Pin
PrakashBhaskar29-Dec-05 23:48
PrakashBhaskar29-Dec-05 23:48 
GeneralRe: Problem with SQL Sentence !!!!! Pin
leppie30-Dec-05 0:03
leppie30-Dec-05 0:03 
AnswerRe: Problem with SQL Sentence !!!!! Pin
J4amieC30-Dec-05 0:27
J4amieC30-Dec-05 0:27 
AnswerRe: Problem with SQL Sentence !!!!! Pin
Werdna30-Dec-05 7:02
Werdna30-Dec-05 7:02 
QuestionImages Pin
Timothy_198229-Dec-05 22:31
Timothy_198229-Dec-05 22:31 
AnswerRe: Images Pin
Darryl Borden30-Dec-05 3:31
Darryl Borden30-Dec-05 3:31 

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.