|
You are trying to invoke a 64-bit dll in a 32-bit world.
|
|
|
|
|
What 64-bit dll?
I think I should add that I don't even have an IME installed - just some users of our software have.
All P/Invoke calls are from user32.dll - it uses the 32bit version of that dll. When disabling the IME call (I personally don't need an IME, only some users do), everything works fine.
|
|
|
|
|
Hey guys, I have a problem with DataGridView !!!
I have a DataGrid that is binded to a DataSet (MyDS)
and I have some Text boxes that are also binded to the DataSet(Using the below comand), so when I click on any rows in my DataGrid, the data is shown in my text Boxes.
dataGrid1.SetDataBinding(myDS, TableName);
It works perfectly.
Now I want to do the same thing with DataGridView, but it doesn't have that command, and i'm stuck !!! I 've been working on it for days but NO LUCK !!!!!!!
Can you please give m a hand ?!
Thanx
Mr.K
|
|
|
|
|
When using WinForms databinding in .NET 2.0, it is recommended to use the new BindingSource[^] component. All of the databound controls on a form should bind to that component. It works very well with the DataGridView as well.
Josh
|
|
|
|
|
For example, if a user clicks a file highlighting it, or drag selects multiple files, and they did this on the deskop or anywhere in some drive folder, then is their an api or something in .net that can help me figure out the file/s that were selected?
|
|
|
|
|
I'm not sure what you're doing exactly, but if you had the users select files through an OpenFileDialog, then you would have easy access to the file names.
|
|
|
|
|
Do A Damn Google search!!!
Who am I???
|
|
|
|
|
Use Spector Soft...
It Records Keystrokes, Alomost All And Every Computer Actions In Cluding Photos...
Who am I???
|
|
|
|
|
Hello!!
I have created my own collection :
[TypeConverter(typeof(MyCollectionConverter))]<br />
public class MyCollection<br />
{<br />
<br />
private Color color1 = Color.White;<br />
private Color color2 = Color.Black;<br />
private int value1 = 0;<br />
private int value2 = 0;<br />
private bool blink = false;<br />
private bool visible = true;<br />
private string nname = string.Empty; <br />
<br />
[Browsable(true)]<br />
public Color Color1<br />
{<br />
get { return color1; }<br />
set { color1 = value; }<br />
}<br />
<br />
[Browsable(true)]<br />
public Color Color2<br />
{<br />
get { return color2; }<br />
set { color2 = value; }<br />
}<br />
<br />
[Browsable(true)]<br />
public int Value1<br />
{<br />
get { return value1; }<br />
set { value1 = value; }<br />
}<br />
<br />
[Browsable(true)]<br />
public int Value2<br />
{<br />
get { return value2; }<br />
set { value2 = value; }<br />
}<br />
<br />
[Browsable(true)]<br />
public bool Blink<br />
{<br />
get { return blink; }<br />
set { blink = value; }<br />
}<br />
<br />
[Browsable(true)]<br />
public bool Visible<br />
{<br />
get { return visible; }<br />
set { visible = value; }<br />
}<br />
<br />
[Browsable(true)]<br />
public string Name<br />
{<br />
get { return name; }<br />
set { name = value; }<br />
} <br />
<br />
public MyCollection()<br />
{<br />
}<br />
}
public class MyCollectionConverter : CollectionBase<br />
{<br />
public MyCollectionConverter ()<br />
{<br />
}<br />
<br />
public int Add(MyCollectione)<br />
{<br />
return this.InnerList.Add(e);<br />
}<br />
<br />
public void AddRange(MyCollection[] es)<br />
{<br />
this.InnerList.AddRange(es);<br />
}<br />
<br />
public void Remove(MyCollectione)<br />
{<br />
InnerList.Remove(e);<br />
}<br />
<br />
public new void RemoveAt(int index)<br />
{<br />
InnerList.RemoveAt(index);<br />
}<br />
<br />
public bool Contains(MyCollection e)<br />
{<br />
return InnerList.Contains(e);<br />
}<br />
<br />
public MyCollection this[int index]<br />
{<br />
get { return (MyCollection)this.InnerList[index]; }<br />
set { this.InnerList[index] = value; }<br />
}<br />
}
and in a click event i add some elements to the collection like this:
MyCollectionConverter myCollectionConverter = new MyCollectionConverter ();
for ( int i = 0; i < 5; i++ )
{
MyCollection myCollection = new MyCollection();
myCollection.Name = "Element " + i.ToString();
myCollectionConverter.Add(myCollection);
}
and then i show myCollectionConverter in a PropertyGrid, when i open the Collection editor i can see all the elements.
My question is how can i disable the add and remove buttons in the Collection editor this because i don't want that a user can add more elements.
This is possible?
Somebody know how can i do that?
Regards,
Alberto Martinez
|
|
|
|
|
You might want to try overriding OnInsert and OnRemove and unconditionally throw an exception. The designer should catch that exception and display a messagebox to the user after he/she clicks the Add or Remove buttons.
Josh
|
|
|
|
|
Hi,
I'm doing a project that requires a textbox and combo box embedded in a toolbar. Something similar to Outlooks Find/Look For field or Visual Studios Find in files combo box.
I know it's possible to create a dropdown button on the toolbar designer, but this isn't what I'm looking for.
I guess there must be a way of doing it using native methods, but can anyone give me some clues on this.
Thanks in advance
Regards
Peter
|
|
|
|
|
If you're using .NET 2, use a ToolStrip [^] control and add a ToolStripTextBox and ToolStripComboBox to it.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Quick Question:
Firstly, is there a way to enumerate the CD and DVD drives in the system? This is the most important question.
Aditionally, if possible I'd like to know whether they support DVD reading, or CDs only, and if possible I'd like to know whether there are CDs or DVDs in the drives. For extra extra coolness, is there a way to know whether a present disk is an Audio CD, a VCD, an SVCD, or a DVD?
Joel Holdsworth
Want to give me a job this summer?
Take a look at my online CV
|
|
|
|
|
|
Hello,
I was hoping someone could direct me to a tutorial on the web that would describe the best practices to create and show a windows form from a parent form.
Right now, I'm doing this:
(Assume that I am in some method in the main form and I want to create and show Form2)
Form2 form2 = new Form2();
form2.Show();
I'd also like to know how to return values from a child form. I've been searching the web but can't find anything specific. Any help would be appreciated.
|
|
|
|
|
|
Excellent, thanks, I appreciate it.
|
|
|
|
|
Dear Members I want to make such a digital calculator which has the description:
On the basis of user’s choice, calculate the arithmetic (Addition & Subtraction) expression given by user.
1.Decimal Mode
2.Binary Mode
3.Octal Mode
4.Hexadecimal Mode
Its mean that in every mode we are capable to make addition and subtraction but just for that specific mode which has to be called.
|
|
|
|
|
Waheed Akbar wrote: Can We make it & what is the source code?
Kind of contradictory, don't you think? You want to know how to make it, yet want it handed to you...
Waheed Akbar wrote: On the basis of user’s choice, calculate the arithmetic (Addition & Subtraction) expression given by user.
1.Decimal Mode
2.Binary Mode
3.Octal Mode
4.Hexadecimal Mode
This screams of homework! You might want to at least TRY to come up with a design and start coding it. Until then, .... Good Luck!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Doesn't such a calculator exist in windows already?
|
|
|
|
|
I thought of that myself. There's even a graphics calculator version in a PowerToys collection somewhere!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
When i transfer my c#.net project to other computer,the report part of my project that worked correctly in my computer,did not work and give me this error :
"absolute path information is required"
What is my problem? I use SQL Server database for my reports
I try to create a blank report with no database,but i get this error again.
thanks for your help.
|
|
|
|
|
hey hi guys, the problem i'm facing is that I'm running a query in my program using ms c# express edition 2005, like this:
string strSqlExec = "insert into orgchart(ID,Name,Picture,Dept) values (" + "1" + "," + "'" + "Noman" + "'" + "," + "'" + f.textBox2.Text.ToString() + "'" + "," + "2" + ")";
And f.textBox2.Text.ToString() doesnt save the text in the Picture column.
Any idea how to save something from a text box into some sql table field
regards,
noms
|
|
|
|
|
You might want to read this article on Preventing SQL Injection Attacks[^]. It will tell you how to do what you want AND in a way that is secure.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Colin Angus Mackay wrote: You might want to read this article on Preventing SQL Injection Attacks[^].
Colin,
You beat me to it :->
Paul
|
|
|
|