|
Hi!
I am looking into how possibly I could enable users re-arrange items in a listbox or listview by dragging an item from one index into the desired index.
Nana
|
|
|
|
|
Hello,
I am writing two programs, one in c++ and the other in c# and am using windows messaging for communication between them. As of now, the c++ program successfully sends a message to the c# program and the c# program receives it just fine. I need the c# program to send a reply message to the c++ program after it finishes its tasks. I have ran into some problems. First off, here is the code in c# that I am using to define the SendMessage function...
DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public static extern IntPtr SendMessage(IntPtr hwnd, uint Msg, int wParam, int lParam);
I did some research on this dll import and found multiple variations, here is one...
[DllImport("user32.dll")]
public static extern int SendMessage(int hWnd, uint Msg, int wParam, int lParam);
does anyone know the correct variables to used so a c++ program will accept the message.
further more...
I tried both declarations of SendMessage and the c# program still did not send a reply message. Note, I used spyxx.exe to find this out. I saw that the message from the c++ program was received but no reply was sent out by the c# program.
here is how I am sending the reply message in c# program...
Form1.SendMessage( Form1.FindWindow("ConsoleWindowClass", "camController"),
REPLY_PICTURE_READY,
0,
0);
I would greatly appreciate input on this, thanks
Roy K
|
|
|
|
|
hi
I know only basic of C# but not in depth like interfaces,delgates,polymorphism and methods in which i am very poor
Can anyone prescribed me any good book or websites .
thanks in advance
kal13na13
|
|
|
|
|
|
Jesse Liberty's Programming C#, on O'Reilly press. $40 new, probably can get used for $30ish. The approach is really one of "ok, so you know the basics of programming in general, here's how you program in C#." Its not C# for dummies, its C# for programmers.
|
|
|
|
|
Hi,
I have an XML file which has number of nodes(written using WriteXML() from a dataset)....
It looks like....(small sample)
- <newdataset>
- <schematable>
<columnname>F1
<columnordinal>0
<columnsize>8
<datatype>System.Double
- <schematable>
<columnname>General
<columnordinal>1
<columnsize>255
<datatype>System.String
- <schematable>
<columnname>Number
<columnordinal>2
<columnsize>8
<datatype>System.Double
- <schematable>
<columnname>Currency
<columnordinal>3
<columnsize>8
<datatype>System.DateTime
........(it continues till end of file).
Here ,i need the node DataType datas(sys.string,sys.double...) alone to fetched and stored in an array for further purpose ...
How to do it?Help me
Thanx...
|
|
|
|
|
I think you can read the contents of the nodes only as strings. Once you've read the content of a node, you could try Int32.Parse(), Double.Parse() and so on, and see if what you've read is an int or a double or a string.
HTH.
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
Vikram,
Actually its a XMl file with formats as in all normal XML files....
I want to read those contents of the Element <datatype>(here ,mistakenly printed as System.String,System.Double etc...They belong to <datatype>)...
I need to read the value(system.string,system.double...) alone from this tag...
This is for checking a condition...
Cud u tell me yaar?
Thanx
|
|
|
|
|
Assuming you'll be using DOM style parsing, load the document using XmlDocument[^] and iterate through the nodes, using the Value[^] property to get the actual value.
Something like
XmlDocument doc = new XmlDocument();
doc.LoadXML(strXML);
foreach(XmlNode node in doc.DocumentElement.ChildNodes)
Console.WriteLine(node.Value);
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I had created an MDI application for Touchscreen based dvpt using C# .net.
I have placed 3 panels in the MDI parent. The Top panel, left panel and center panels. The top panel displays the application name. the left panel displays the navigation buttons. The center panel displays the necessary details. Here i need to pop-up some windows to display some details. the pop-up windows are child forms. When i set the parent and pop-up these windows, they hide at the back of the panel and are not visible. If i do not set the mdiparent then they are visible. How can i overcome this problem?
Regards,
Madhu Srinivasan
|
|
|
|
|
Just get rid of the centre panel.
|
|
|
|
|
but then i need to display certain user controls in this panel. how am i to achieve this if i get rid of the centre panel.....
thanks and regards
Madhu Srinivasan
|
|
|
|
|
The centre panel is blocking the child MDI windows. You can either get rid of the centre panel and place your user controls elsewhere, say the toolbar, or set aside an area within the centre panel, maybe another panel, and set this as the parent of the child windows (the child windows would then be normal windows, not MDI children, and set the WindowState to Maximized.
I am leaaving for work now, but if you are still having problems, e-mail me a *small* sample project and I will take a look at it when I get there.
barkingtreeAT hotmail.com
|
|
|
|
|
is there no way to make the form visible in front of the panel when they are mdichildren forms??
they have to be clid forms as i need to have a reference to the mdiparent on each traversal....
thanks and regards
madhu srinivasan
|
|
|
|
|
If you only need to reference the main form from the sub-forms, then you could just set the Owner property after it is constructed.
ie from the main form:
NewSubForm form = new NewSubForm();<br />
form.Owner = this;<br />
form.Show();
...in the sub-form:
this.Owner.Text = "New Caption";
|
|
|
|
|
I recently found that you can associate a file type with an application through creating file types in a setup project. However, how do you handle loading the file when you double click it? Say to load all of the elements within the file into a dataset and then a sorted list?
Thanks
|
|
|
|
|
All the setup program does is associate the file type with an executable. It usually registers something like
YourApp %1
so that the file you double clicked on will appear as a command line parameter to your app. Assuming it's setup that way, all you have to do is check for the file name in Main and do the required action.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Could you post an example or point me in the right direction?
thanks
|
|
|
|
|
Would you need to create another static void main with a string as a parameter?
Thanks
|
|
|
|
|
Hi,
I've a activex browser control in a form. I've added proxy server support to the control by modifying the proxy server settings in the registry. This works fine before the browser control is created (the browser control is only created after a button on the form is pressed). However, once the initial proxy settings are commited and the browser control is created, the browser control does not respond to any new settings even though the registry shows the correct new settings. The browser control seems to be "stuck" on the old settings. How does IE apply any new settings?
Any suggestions?
Thanks
Pieter
|
|
|
|
|
I need to develop a system that can transfer data from 1 pc to another pc using dialup because the user dont want use any FTP service..
so i think i need to create a service at one side that can accept called from another side and get the transaction and stop the connection...
and i need to create i utlity that can dialup and get data and disconnect..
2 utility 1 dialup and 1 accept call..
how do transfer this to my coding any example or source that i can use.. in c#...
or is there any otherway for me to settle this issue.
thanks
joe
|
|
|
|
|
Hi
How I add double quotes to a string.
For instance, I have following;
string s1 = "first string";
string s2 = "second string";
Now I want to combine the two and the result should be:
"first string , second string" (Note: the stirng should contain the starting and ending double quotes")
regards
|
|
|
|
|
You have to escape them with \
string s1 = "\"first string";<br />
string s2 = "second string\"";<br />
<br />
string middle = " , "<br />
string combined = string1 + middle + s2 <br />
You get: "first string , second string"
HTH
Pompiedompiedom...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
You have to use escape characters.
string s1 = "first string";
string s2 = "second string";
string result = String.Format("\"{0}, {1}\"", s1, s2);
|
|
|
|
|
and this is one solution
char q = '"';
string one = "first string";
string two = "second string";
string result;
result = q + one + "," + two + q;
"first string,second string"
|
|
|
|