|
You're the kind of people that make people shy away from using forums- let us take the following example:
I ask (trusting that someone with your wisdom in this language will help me, offer a hint in the right direction, or give an example):
What is 2+2.
You say:
It would be better if you understood what addition is before moving on to advanced topics.
I can understand that understanding these topics better would help me, that's why I'm here. The method in the code I posted works fine from within the same namespace just when I make it into a DLL and try and use it and the arguments reference a class and method from outside the DLL it doesn't work, so I guess what I need to do is figure out how to make the dll see the class or namespace that is calling the method from within it...if you can help me and offer up anything that is actually considered help it would be much appreciated.
I also understand that I am probably not explaning this very well, but what I am looking for is someone who has run into a similiar problem and what their solution was for it.
|
|
|
|
|
You're the kind of people that think they can learn to run before they learn to walk- let us take the following example:
wait I have an idea that is a more appropriate use of my time....
|
|
|
|
|
Finally something we agree on, next time don't post a response to someone's question unless it's to offer help. These kind of responses devalue the title of MVP.
|
|
|
|
|
Taicho2k wrote: the title of MVP.
When you become one then you can tell me all about it ... until then ...
Taicho2k wrote: unless it's to offer help.
I did offer help, you didn't like it, so what it was free.... so once again.... f*** off loser
|
|
|
|
|
led mike wrote: f*** off loser
Come now we can be better than this.
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: Come now we can be better than this.
Good statement! (Got my 5)
I don't know if it should be the responsability of a CP MVP which shouldn't let him make this kind of statements.
But for me, vulgaritys and personal abuse have no place in a forum like this!
All the best,
Martin
|
|
|
|
|
Thank you, you are correct vulgaritys and personal abuse have no place in this community no matter who they are from.
only two letters away from being an asset
|
|
|
|
|
Don't tell people who have more experience than you what to do. Period. And while you are at it read the forum guidelines. Message titles should not include words 'urgent' or 'help.'
______________________
stuff + cats = awesome
|
|
|
|
|
Taicho2k wrote: since it isn't referenced I get an error
Standard question #2:
What error message do you get?
Taicho2k wrote: There has to be a way the dll can reference a class in my other namespace without having to hard-code the reference right?
Then you have to load the assembly from the dll.
---
single minded; short sighted; long gone;
|
|
|
|
|
When you say "load the assembly" do you mean like [DllImport]? If so, I am currently trying to use DllImport and it finds the DLL, however, it says it can't find the entry point in the DLL, and I've made the function I'm importing the same name as the method in the DLL so I thought it would find it and it doesn't, so then I tried to specify the entry point by doing
[DllImport("myDll.dll", Entrypoint="myMethod")] public static extern void myMethod()
and it still can't find the "entry point" when I run the method in the code later? Do I have to specify something within the DLL?
Thanks for the help,
Taicho
|
|
|
|
|
Taicho2k wrote: I have a solution that contains 2 projects one is the executable and the other is a DLL that I wrote that the application uses... the problem is that method I am using from the dll tries to reference a class and/or method from the application but since it isn't referenced I get an error here is the code:
Ok, I'm not clear on what you're trying to do, but it sounds like you have a circular reference. You have an executable that uses an assembly and an assembly that tries to use the executable. Correct? The solution lies in breaking the circular reference.
|
|
|
|
|
I am trying to add some key down events to a form. It works great until I add a radiobutton to the form, at which point it focuses on the radiobutton and ignores all the keyboard commands. Any ideas on how to make the keys affect the form instead of the radiobutton?
Thanks,
Matt
|
|
|
|
|
|
Thanks for the help,
It works now for all of the keys except the arrow keys and tab key. Is there any way to have it run the keydown function when the arrow keys are pressed instead of jumping between the radiobuttons?
Matt
|
|
|
|
|
Sure, read up on ProcessCmdKey and IsInputKey
|
|
|
|
|
Hi, I'm trying to bind a lookup table to a comboBox. Well the contents of the ComboBox binds ok, but the binding on the SelectedValue doesn't work! Here's my code:
DataTable table = new DataTable();<br />
table.Columns.Add("Name", typeof(string));<br />
table.Columns.Add("Value", typeof(int));<br />
for(int i = 0; i < namesArray.Length; ++i)<br />
{<br />
table.Rows.Add(new object[] {namesArray[i], i});<br />
}<br />
<br />
combo.DataSource = table;<br />
combo.DisplayMember = "Name";<br />
combo.ValueMember = "Value";<br />
<br />
combo.DataBindings.Add("SelectedValue", dataset.LoadModule, "MyColumn");<br />
<br />
numericUpDown1.DataBindings.Add("Value", dataset.LoadModule, "MyColumn");
What am I missing? This is going to drive me nuts!!!
|
|
|
|
|
I am thinking that you may have a sorting problem. Do you have the combo box sort set to accending or decending. If so I think that is your problem. Try the following after adding all the rows...
table.DefaultView.Sort = "Name";
combo.DataSource = table.DefaultView;
Chris
|
|
|
|
|
Also make sure you set the sort on the combobox to none.
|
|
|
|
|
If that doesn't work then try combo.DataBindings.Add("SelectedValue", table /*or dataset.Tables["MyTableName"]*/, "Value");
|
|
|
|
|
Thank you for the help! Now the right item is selected, but when I change it, it doesn't change the data source!
For example:
private void myCombo_SelectedValueChanged(object sender, System.EventArgs e)<br />
{<br />
MessageBox.Show(dataset.LoadModule[cm.Position].MyColumn.ToString());<br />
}
In this code above, the MessageBox always displays '5', which is the initial SelectedValue.
I'm really having a hard time with this!
|
|
|
|
|
I dont have much experience with a currency manager. I am guessing the same datatable isn't getting bound to the currency manager. How are you binding the code to the currency manager?
|
|
|
|
|
I use the CurrencyManager because its Position property represents the index of the current record being viewed. FYI this is how I use it and it works fine:
cm = BindingContext[dataset.LoadModule] as CurrencyManager;<br />
dataset.LoadModule.DefaultView.Sort = "SerialNumber";<br />
cm.Position = dataset.LoadModule.DefaultView.Find(serialNumber);
But this is not a CurrencyManager issue, since the program gives me the right value (5), it just doesn't update it!
|
|
|
|
|
AFAIK there is no ComboBox.SelectedValue
did you mean SelectedText ?
|
|
|
|
|
This should be pretty easy but I'm having so many problems with it.
I'm following someone elses code and cant figure out how he did this.
One of the webmethods returns 3 parameters and it uses a class of somesort to do it. We had to reverse engineer to get the code so its not complete.
[WebMethod]
Public Class1 HelloWorld(int i1, string str1, string str2)
{
try
}
//Code
}
Catch
}
return Class1(1,2,3)
}
{
return Class1(0,0,0)
}
}
How is this possible? Thanks in advance.
|
|
|
|
|
why would it not be possible ? Importing a web service will import the types it exposes, including enums and classes.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|