Click here to Skip to main content
15,910,211 members
Home / Discussions / C#
   

C#

 
GeneralRe: CheckedListBox and Which Forum [modified] Pin
Mike Poz15-Jun-06 14:42
Mike Poz15-Jun-06 14:42 
GeneralRe: CheckedListBox and Which Forum Pin
Malcolm Smart15-Jun-06 21:09
Malcolm Smart15-Jun-06 21:09 
QuestionSo is there anyone who has been able to draw transparent on winforms? Pin
Ista15-Jun-06 11:09
Ista15-Jun-06 11:09 
AnswerRe: So is there anyone who has been able to draw transparent on winforms? Pin
Josh Smith15-Jun-06 11:18
Josh Smith15-Jun-06 11:18 
GeneralRe: So is there anyone who has been able to draw transparent on winforms? Pin
Ista15-Jun-06 15:50
Ista15-Jun-06 15:50 
QuestionDatabinding to the correct Row Pin
Drew McGhie15-Jun-06 11:02
Drew McGhie15-Jun-06 11:02 
AnswerRe: Databinding to the correct Row Pin
Drew McGhie15-Jun-06 11:31
Drew McGhie15-Jun-06 11:31 
QuestionFairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) [modified] Pin
ThisIsMyUserName215-Jun-06 10:45
ThisIsMyUserName215-Jun-06 10:45 
I'll try to be as clear as humanly possible, forgive me if my termonology is off, here goes...

I created a class library.

The class library consists of 2 classes.

Class 1 -> A form.
Class 2 -> a "gateway" class allowing me to modify the form.

Class 2 has 2 methods.

Each method spawns a new instance of the form and sets a few form properties.

Fairly easy so far right?

Here's a concept method of class 2.

<br />
        public void ShowA(string defaultValue)<br />
        {<br />
            MainForm form = new MainForm();<br />
<br />
            form.DefaultValue = Convert.ToDouble(defaultValue);<br />
            form.Title = "A";<br />
            form.picWindow.Paint += new PaintEventHandler(form.PaintA);<br />
            form.Show();<br />
<br />
            WindowsAPI.ActivateWindow("Form1");<br />
        }<br />


Basically when I call this method, the form's picture box draws a line at an angle I specified. Then I re-activate my non-class library form using API (I'm not sure how to communicate between class library classes and non-class library forms -- this isn't the problem though).

So yeah...

Back to what I originally mentioned, I only want 1 instance of each form open. A and B can be open, but 2x As cannot be open. I was able to do this with more API, pretty much checking for the hWnd of the window based on its title.

Now, here's the problem...

If the form is currently open, instead of doing nothing (I told it to not to call the class 2 method if it detects an open window already) I want it to UPDATE the value of the current open form (it would draw a new line and update the picture box).

How in the world can I do this?
AnswerRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
Josh Smith15-Jun-06 11:14
Josh Smith15-Jun-06 11:14 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
ThisIsMyUserName215-Jun-06 11:20
ThisIsMyUserName215-Jun-06 11:20 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
Josh Smith15-Jun-06 11:43
Josh Smith15-Jun-06 11:43 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
ThisIsMyUserName215-Jun-06 12:30
ThisIsMyUserName215-Jun-06 12:30 
AnswerRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
Alexander Wiseman15-Jun-06 11:24
Alexander Wiseman15-Jun-06 11:24 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
Alexander Wiseman15-Jun-06 11:29
Alexander Wiseman15-Jun-06 11:29 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
ThisIsMyUserName215-Jun-06 12:12
ThisIsMyUserName215-Jun-06 12:12 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
Alexander Wiseman15-Jun-06 12:22
Alexander Wiseman15-Jun-06 12:22 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
ThisIsMyUserName215-Jun-06 12:39
ThisIsMyUserName215-Jun-06 12:39 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
Alexander Wiseman15-Jun-06 12:47
Alexander Wiseman15-Jun-06 12:47 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
ThisIsMyUserName215-Jun-06 13:21
ThisIsMyUserName215-Jun-06 13:21 
QuestionUsing RPC (with IDL) from C# Pin
BambooMoon15-Jun-06 9:55
BambooMoon15-Jun-06 9:55 
QuestionDataGridView custom Column Pin
Mike0915-Jun-06 8:56
Mike0915-Jun-06 8:56 
Questiondatagrid and databinding (long due to code) Pin
leckey15-Jun-06 8:51
leckey15-Jun-06 8:51 
AnswerRe: datagrid and databinding (long due to code) Pin
Josh Smith15-Jun-06 9:18
Josh Smith15-Jun-06 9:18 
QuestionSending info to command line Pin
ddpn4215-Jun-06 8:47
ddpn4215-Jun-06 8:47 
AnswerRe: Sending info to command line Pin
Alexander Wiseman15-Jun-06 8:54
Alexander Wiseman15-Jun-06 8:54 

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.