|
int x = Convert.ToInt32(10.0/2.4);
Live Life King Size
Alomgir Miah
|
|
|
|
|
Thank you,
I am so stupid I am already using Convert method.
|
|
|
|
|
Hi,
I am trying to use a C# Windows Forms application as a DDE Client.
At present I'm using the follwing code to initiate a session with the DDE Server...
ushort app = GlobalAddAtom(Marshal.StringToHGlobalAnsi(appname));
ushort topic = GlobalAddAtom(Marshal.StringToHGlobalAnsi(topicname));
this.packedParam = PackDDElParam(WM_DDE_INITIATE, (System.IntPtr)app, (System.IntPtr)topic);
SendMessage(dtaProcess, WM_DDE_INITIATE, Process.GetCurrentProcess().MainWindowHandle, this.packedParam);
This should return a WM_DDE_ACK message to the main thread as follows...
protected override void WndProc(ref Message m)
{
\\WM_DDE_ACK = 996
if (m.Msg == 996)
{
MessageBox.Show("");
}
else
{
base.WndProc (ref m);
}
}
I do not receive the WM_DDE_ACK message. Also, the PackDDElParam method (user32.dll) returns a negative value. Is this correct?
|
|
|
|
|
Hi,
Can anybody provide me documentation of Expression Evaluator Project implemented in C# by werdena,on this site ,please help me if you can.
Thanx.
|
|
|
|
|
You'll have to go to the article that you downloaded it from, scroll to the bottom of the page and you'll find a discussion board just like this one. Post a question asking for additional information there. Articles are, for the most part, supported by the people that wrote them.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi at all,
Im developing a custom control based on CF DataGrid. I added new functionalities like customizable rows height and another bit changes.
My problem is that i cant add the control in the toolbar because it appear disbled (gray colour).
I have read some articles, but im lost.
Anybody can help me?
Thanks in advance
Juan (sorry for my bad english).
|
|
|
|
|
when i use procedure
CommandType is procedure
and then run ExecuteNonQuery()
the return value of ExecuteNonQuery() is always -1
so the return value of ExecuteNonQuery is useless when use procedure?
|
|
|
|
|
It executes the query and just return the no of rows affected.
|
|
|
|
|
|
Hai
For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1. If a rollback occurs, the return value is also -1.
For more information See
SqlCommand.ExecuteNonQuery Method[^]
|
|
|
|
|
|
the procedure execute correctly and the data in DB changed.
but the return value is -1
why?
return value just useful when execute sql query?
|
|
|
|
|
I have a parent class, Base with 2 child classes, Child1, and Child2.
Base has a public int iNo. I init Child1 from another class. So Child1 inits Base.
Now, in Child1, I set Base.iNo = 10. Then i create the second child class, Child2 from Child1. Now, in Child2, when I call Base.iNo, i don't get 10.
I know the problem is that the child classes works with 2 seperate instances of the Base class, but how can i resolve this.
i want both child classes to inherit from the same Base instance. How do i do this.?
Thank you
There's someone in my head but it's not me - Pink Floyd
gunigugu
|
|
|
|
|
You inherit a class, not an object. Child1 and Child2 only inherits the definition of Base, Child1 objects and Child2 objects still are separeate objects. It's the same way as if you have two separate Base objects, they each have there own set of members, although they come from the same class.
If you want to share a member across objects, you have to declare it as static.
---
b { font-weight: normal; }
|
|
|
|
|
Thank you very much, I never thought of static variables...
There is someone in my head but it's not me - Pink Floyd
|
|
|
|
|
I have a C# Windows Forms application, where the executable really has to be small. It has about 5 or 6 forms, and the executable size is about 230 KB. By toggling the show all files in the Solution Explorer in Visual Studio, I can change the Build Action from Embedded Resource to None for the .resx files generated by the designer. With this, I shrank the EXE size to 100 KB.
My forms are not Localizable , and I haven't included any graphic files directly. The ImageList s I use are loaded from a bitmap strip with code, and not in the designer.
My code as it is doesn't break without the .resx files, but I wonder if there are other situations where they are used that I'm not aware of.
So, does anyone know?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Hi,
I want to create a Textfile in the remote system meaning(i'm having only the URL, where the file to be created e.g: http://url/folder ). Inside the folder i want to create a file. Is there any classes to create a file in remote system? And is it possible to make the file as hidden file. If anybody knows solution to my problem please let me know to solve it.
Thanks and Regards,
Vinoth
|
|
|
|
|
I want to control gamepad in C# but i don't know how!
Using directinput?
or else?
is anyone have any sourcecode about this?
please help me!
sorry because of my poor English
|
|
|
|
|
DirectInput is what you need to use.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thanks for your reply
But can tell me more detail?
i don't know how to use directinput in C# to control gamepad
thanks;)
|
|
|
|
|
Download, install and read the docs for the DirectX SDK. It has sample code.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Instead of the quite bulky DirectInput you can simply P/invoke the joy* functions. I've done this to support a footswitch that's behaving like a joystick and it works well.
THis MSDN article[^] might help you.
Regards,
mav
|
|
|
|
|
i did it!
Really Really thanks,
|
|
|
|
|
Hi,
Are there any tools(commercial or free) to convert c#
runtime intermediate output to those non-runtime intermediate
language exe so that user cant re-engineering the exe easily ?
thanks
|
|
|
|
|