|
I was wondering if anyone had a chance to use DockPanel Suite for dockable windows from sourceForge. I have a question about the modal feature. The problem is with a floating form (not docked). When this form throws a message box, the message box is not modal as it should be. When the form is docked, the message box displayed is modal. Is this by design or am I doing something wrong?
Thank you in advance
|
|
|
|
|
you have to take information by windows messages.
Tkae a look here:
WndPrc()
|
|
|
|
|
thanx for the answer but can you elaborate on this topic, just a bit more detail of where to start to fix this problem.
|
|
|
|
|
Hi,
I have to perform a specific action using several windows like hundreds of times. I could speed it up if could do this automatically:
When an Internet Explorer window is open, look for a specific regular expression match on the displayed content. If it is found, copy it to the clipboard and close the window.
The tool should not be triggered automatically and check on every window. It can, but it doesn't have to. I can as well focus the specific IE window and start it using a shortcut...
Just don't have a clue on what is the best way to start. Should i use win32 api calls, and which or is there a better C# (.NET) way to do it?
Thanx
|
|
|
|
|
Hello all,
I have searched alot on "Windows API hooking". Most of the articles that I found are either theoretical or out-dated (or ASM or C++/C code). What I want to do is to hook the winsock32.dll for my *almost-firewall*. Any hint where I can learn about this?
Many thanks in advance,
tmp0
|
|
|
|
|
Well, if you're trying to this from entirely from C#, then you're out of luck as it isn't possible. You're going to need something that will give you a non-managed interface for you to call into. You could look into madshi's madCodeHook at http://www.madshi.net/. I've used it before and it works, but you have to know what you're doing.
--
Joel Lucsy
|
|
|
|
|
Hello Joel,
I did find many products for *ready-to-use* API hook SDK. But I wanted to do it my self and not rely on someone's else's work.
It doesn't have to be entirely in C#.
Many thanks for your response,
tmp0
|
|
|
|
|
I have a set of points in a space (in OpelGL) and a DataGrid, in which I keep coordinates of these points. I would like to highlight a specific point in this space, whenever user gets his mouse over the row, that represents coordinates of exactly this point. How to capture this event in DataGrid (so the event that mouse is over eg. 4th row of the DataGrid)
2nd question - how to highlight a specific row in DataGrid?
thank you for your help and time
|
|
|
|
|
Hi...
How can i get the filename of my application?
I can get the startup path with the Application.StartupPath, but not the filename!
Can anyone help me?
Thanks
QzRz
|
|
|
|
|
|
Thanks, that would do it.
|
|
|
|
|
How do I play sound from raw data?
I got some a byte array that I want to be played, do I need to make it a wav to play it?
Or can it be done in another way?
Niklas Ulvinge aka IDK
|
|
|
|
|
I want to iterate thru an xml file and I'm not having any luck. I'm very new to C# so I don't know if this is even possible, but it seems to me that it should be.
I want to display the parent nodes of an xml file in a combobox. Is that so difficult? There's plenty of examples when dealing with SQL Server or Access, but is it possible to get the same functionality via an xml file?
As soon as a particular parent node is selected, I want the datagrid on the form to update itself with the selected parent node (from the combobox).
I've looked at XPath queries but I don't see how that would work in this case.
Any ideas?
|
|
|
|
|
By parent nodes I assume that you mean the elements that are direct children of the root element. Then you just get the nodes in the root element an iterate through them, adding an item in the combobox for each node.
Something like:
foreach (XmlNode node in myXmlDoc.DocumentElement.ChildNodes) {
myCombo.Items.Add(node.whatever);
}
---
b { font-weight: normal; }
|
|
|
|
|
Thanks Guffa,
That helped a lot, atleast I saw a little action from the combobox. I'm sure my XML file might need a little work though.
Here's the XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book>
<title>Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book>
<title>Harry Potter</title>
<author>J.K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book>
<title>XQuery Kick Start</title>
<author>James McGovern</author>
<year>2003</year>
<price>49.99</price>
</book>
<book>
<title>Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
I still can't get the datagrid to show only one particular book at a time. Right now it just shows all of them. Also, the combobox displays "book" 4 times.
Here's some code:
private void btnLoad_Click(object sender, System.EventArgs e)
{
opener.Title="Load XML Data";
opener.Filter="XML files(.xml)|*.xml";
if(opener.ShowDialog()==DialogResult.OK)
{
string myData=opener.FileName;
DataSet ds=new DataSet();
ds.ReadXml(myData);
XmlDataDocument xdd=new XmlDataDocument(ds);
xdd.SelectNodes("/bookstore/..");
foreach(XmlNode xnod in xdd.DocumentElement.ChildNodes)
{
cboBookName.Items.Add(xnod.LocalName);
}
dataGrid1.DataSource=ds;
dataGrid1.DataMember="book";
}
}
This is almost working, except for combobox displaying "book" 4 times over and the datagrid showing everything instead of just info for selected combobox item.
Sorry for the long post
Regards
Dan
|
|
|
|
|
Instead of just using the node name, locate a child of the node with a specific node name, for an example "title".
As you have put the data in a DataSet anyway, it might be easier to loop through that instead of the xml document, or just use the DataSet as data source for the combobox.
Create a DataView for the DataSet to use as data source for the grid. Use the RowFilter property of the DataView to filter out one specific item.
---
b { font-weight: normal; }
-- modified at 14:01 Sunday 25th September, 2005
|
|
|
|
|
Hi Guffa,
I'm still not able to place only the book titles in the combobox and details in the datagrid.
When I set the datasource of the combobox to the dataset (which contains my xml file) I get some kind of datalistmanager line displayed in the combobox but that's it. Sorry, right now I'm at work and I'm away from my code.
I guess what I'm having problems with is how to segment out part of the dataset to the combobox.
Dataviews would work? Is it better to use a Dataset in this case instead of an XmlDocument?
|
|
|
|
|
Hi there....Does any body know how to capture images/video clips through a webcam/scanner in C#.
Thanks
The way
|
|
|
|
|
|
Hi,
Thanks for your advice!
|
|
|
|
|
Thanks Andrew!
|
|
|
|
|
Hello!
Can someone please explain me how to get the IShellFolder interface of a subfolder after calling IShellFolder.EnumObjects() and then IEnumIDList.Next() (an example will be helpful). The interface I have implemented is:
<br />
[ComImport]<br />
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]<br />
[Guid("000214F2-0000-0000-C000-000000000046")]<br />
public interface IEnumIDList<br />
{<br />
[PreserveSig]<br />
Int32 Next(UInt32 celt,<br />
[MarshalAs(UnmanagedType.LPArray)]<br />
IntPtr[] rgelt,<br />
out UInt32 pceltFetched<br />
);<br />
<br />
[PreserveSig]<br />
Int32 Skip(UInt32 celt);<br />
<br />
[PreserveSig]<br />
Int32 Reset();<br />
<br />
[PreserveSig]<br />
Int32 Clone(out IEnumIDList ppenum);<br />
}<br />
Thank you!
|
|
|
|
|
Hello
I need to Serialize an object containing a hashtable where each value in the hashtable is an object.
[Serializable]
class A{
public ushort[] UshortArray; // lets assume this points to an array
}
[Serializable]
class B{
public Hashtable HashOfA;
}
void Main(){
A A1 = new A();
A A2 = new A();
B B1 = new B();
B1.Init() // Set hashtable
B1.Add(1,A1); // add item
B1.Add(2,A2); // add item
byte[] Binary;
/////////////////////////////////
// Here I want to serialize B1 to binary format
//////////////////////////////////
B B2 = new B();
///////////////////////////////////////
// And ofcourse back to object B2
///////////////////////////////////////
}
I know how to do this where insted of <class a=""> I have <struct a="">. Is there a solution for objects ?
I'm using a MemoryStream and BinaryFormatter.
Gilad.
|
|
|
|
|
Shouldn't make any difference at all. What problem are you facing?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hello
I need to Serialize an object containing a hashtable where each value in the hashtable is an object.
[Serializable]
class A{
public ushort[] UshortArray; // lets assume this points to an array
}
[Serializable]
class B{
public Hashtable HashOfA;
}
void Main(){
A A1 = new A();
A A2 = new A();
B B1 = new B();
B1.Init() // Set hashtable
B1.Add(1,A1); // add item
B1.Add(2,A2); // add item
byte[] Binary;
/////////////////////////////////
// Here I want to serialize B1 to binary format
//////////////////////////////////
B B2 = new B();
///////////////////////////////////////
// And ofcourse back to object B2
///////////////////////////////////////
}
I know how to do this where insted of <class a=""> I have <struct a="">. Is there a solution for objects ?
I'm using a MemoryStream and BinaryFormatter.
Gilad.
|
|
|
|