|
You ca also create a block of C# code with a static function that returns the value of the expression, such as 'return (12 * 25 + System.Math.Sin(System.Math.PI));', and compile it on-the-fly in a memory assembly, then call the method and obtain the result. Try this article:
DotNetCompiler
It is in VB.NET, but i'm sure you won't have problems...
|
|
|
|
|
Hello All,
I have added a bool check column to Datagrid.but i dont know how would i come to know that whether that checkbox is selected or not because depending on that checkbox value i have to change value in another column?
|
|
|
|
|
Hi amrutajoshi,
Probably this may help you
foreach(DataGridItem childItem in myGrid.Items)
{
CheckBox myBox = (CheckBox) childItem.FindControl("MSChecked");
if(myBox != null && myBox.checked)
{
Response.Write("Checked");
}
}
Srinivas
|
|
|
|
|
Well i dont know if the datagrid is in Web or Forms ?.
But if it is in Web do you want it clientside or serverside ?.
If Serverside its very simple
your CheckBox has a OnChangedEvent create a method and call it from there
asp:CheckBox OnCheckedChanged="doWork" id="myCheckBox" runat="server">
|
|
|
|
|
I'm doing some interop and passing a structure to managed code via an IntPtr.
I convert the structure to the IntPtr as follows, in a mixed-mode C++ program, which then passes it to the C# program:
System::IntPtr func(Event &e)<br />
{<br />
return __nogc new System::IntPtr(&e);<br />
}
I'm not too confident about my mixed-mode C++ skills, but I think that's right... right?
However, the data I get back from PtrToStructure gives me complete gibberish. It's not a member alignment problem either, because the data is supposed to be mostly nulls but I get numbers in the millions (Event contains mostly pointers to other structures).
What am I doing wrong?
|
|
|
|
|
Ok, I solved it.
In case anyone wants to know, the problem was caused by IntPtr.
Basically, IntPtr(void*) does NOT wrap a pointer into a managed pointer. Instead, it creates a managed pointer TO an unmanaged pointer. Very wrong.
The solution was to simply use static_cast to convert the umanaged pointer into a managed one.
|
|
|
|
|
Hi
I am now working in c# with infragistics.
I am new to infragistics. so
i feel very difficult .
pls anyone can tell me the tutorials for infragistics which r easy to learn (other than http://devcenter.infragistics.com site)
j o h n
|
|
|
|
|
Please ,give me some information
|
|
|
|
|
I already re-draw listview Frame ,code:
private void OverrideControlBorder(Graphics g)
{
Pen BorderPen = new Pen(Color.FromArgb(127,157,185), 1);
g.DrawRectangle(BorderPen, new Rectangle(0, 0, this.Width - 1, this.Height - 1));
}
protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case WM_PAINT:
IntPtr hDC = IntPtr.Zero;
Graphics gdc = null;
hDC = GetWindowDC(m.HWnd);
gdc = Graphics.FromHdc(hDC);
OverrideControlBorder(gdc);
if((this.Font.Height - 1) * this.Items.Count > this.Height)
{
OverrideVertScrollBar(gdc);
}
ReleaseDC(m.HWnd, hDC);
gdc.Dispose();
default:
break;
}
base.WndProc (ref m);
}
|
|
|
|
|
OverrideVertScrollBar(gdc);
about this function,How do I Write?
Thank you!
|
|
|
|
|
|
I used to know how to get a WinForm to display AND have the Console Window appear at the same time-
I don't really care if they overlap as long as both appear.
-- thanks in advance
|
|
|
|
|
Set the project type to Console Application.
There you go, you now have a console.
Then create any forms you wish.
There you go, you now have both.
|
|
|
|
|
i've created a form with 2 panels 3 button, 1 controlbox...
I need to draw a blue rect over all.
Can i do it directly using Graphics (no with picturebox)?
|
|
|
|
|
You can draw the rectangle in OnPaint, but I suspect you'd need to hide the controls, they will show through.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am killing myself trying to figure how to use something like AutoItDLL in C#. I posted the question to their forum, and they obviously don't seem to have a big C# following. Does anyone know of any tools like AutoItDLL.
(AutoIt is a simple tool that can simulate keystokes, mouse movements and window commands (maximize, minimize, wait for, etc.) in order to automate any windows based task (or even windowed DOS tasks).)
I am trying to avoid having to build this functionality from the ground by inheriting a bunch of stuff from the user32.dll (not lazy, but up against agressive timeline)
Any help would be GREATLY appreciated.
I am not apposed to using AutoItDLL but I can't find any sample code or produce and personal success with it thus far.
Thanks!!
|
|
|
|
|
Here's the deal:
I have a pointer to some unmanaged code, in the form of IntPtr.
It's a callback. Now how do I call it?
|
|
|
|
|
See if this helps
http://www.codeproject.com/csharp/Win32_to_NET.asp
Live Life King Size
Alomgir Miah
|
|
|
|
|
No, I'm afraid that is doing the thing in reverse. It is calling a .Net callback from unmanaged code. I, however, have the callback in unmanaged code and need to call it from .Net.
Every article about this seems to assume that the .Net app is "in control", which is really annoying, since right now, .Net is taking the orders from unmanaged code and I have no reference to go by
|
|
|
|
|
|
Nono, it's the opposite.
I don't need to make a delegate into an IntPtr, I need to basically make an IntPtr into a delegate.
|
|
|
|
|
Looks like a mixed-mode wrapper might be the answer. I haven't managed to get it to work yet, though (due to the PtrToStructure problem a few posts above).
|
|
|
|
|
Hi all,
I am building this GUI for a client I wrote some time back. I have done all the work on a Desktop machine in my office and it works fine. I have put it in a jumpdrive and tried still works fine (on the same machine). But when I bring it home and try it on my laptop, its has som weird problems.
My GUI has 2 dropdowns or the boxes called listboxes. When I run the program, these boxes are empty, they dont show me the items inside, tough they scroll and do take some random value from the list while excecuting. Is this some kind of property setting I am missing? Please do help me on this, as I am completed with everything else, and stuck here.
Sowmya Mulukutla,
UAB
|
|
|
|
|
|
Hello,
I have a datagrid: dataGridRevenues.
and tablestyles : styleLotYields.
How can I access particular cells in my datagrid, and how can I raise an
event on leaving a particular cell.
Thank you
|
|
|
|