i got idea, from task manager u get from GINA got me , okay....i want to get opened applications..i know code of Process but i dont want all running exe on computer as most of them are services..i just want only applications running...breifly, all appear in taskbar as opened..got it
The Task Manager isn't part of GINA. But, it can be launched by it...
You'd have tp do some detective work to fish out the services from the applications. All a service is is a windowless application that runs in the background under a different user and desktop.
bool is a value type, therefore it cannot be null. bool is either true or false. There is no other state.
By the way, when using out, the variable must be assigned a value before the method returns. The value of your variable going in wouldn't matter because it will be assigned a value before you get it back. Passing null (even if you could) wouldn't have any affect.
FYI .NET 1.2, set to be beta'd this year and released next year, will utilize 1.2 generics feature for a Nullable value type, defined as Nullable<T>. This would allow you to pass a null value into a value parameter. See here[^] for more info.
He who knows that enough is enough will always have enough.
It will be .NET 2.0, not 1.2. The file versions are only labeled as 1.2, just like the file versions for 1.1 are 1.1 but the assembly versions are still 1.0.5500.0. ".NET 2.0" is mentioned in many places on Microsoft et. al. sites.
I believed they used ".NET 1.2" for a while but that started changing a few months ago.
[EDIT] Oh, and rightly so. A LOT (as I'm sure you know) is changing between 1.1 and 2.0, unlikes the few changes between 1.0 and 1.1. It's still mostly backward compatible, but it includes a lot of bug fixes, performance enhancements, control adapters (new way to provide owner-drawing that's truly aweseom!), many new ASP.NET enhancements including some for WSS/SPS, and - of course - generics.
publicstaticexternvoid myfunc(int a, int b, out MYSTRUCT output);
Now...this doesn't work, I don't even get returned the correct size of MYSTRUCT. I've tried quite a number of different variations as well. I've tried passing an array of IntPtr too, all to no avail. How does one deal with this? Do I need to get back the array of pointers and actually deal with the pointers themselves?
And here is the call (allong with forming up the data after the call is made:
IntPtr outArray;<br />
BaseP2P.PeerGetNextItem(something, numItems, out outArray);<br />
MYSTRUCT pairs = new MYSTRUCT[numItems];<br />
ArrayOfPtrs ptrs;<br />
IntPtr current = outArray;<br />
IntPtr structure;<br />
for(int i=0; i < numItems; i++)<br />
pairs[i] = new MYSTRUCT();<br />
ptrs = new WinP2P.BaseP2P.ArrayOfPtrs();<br />
Marshal.PtrToStructure(current, ptrs);<br />
structure = ptrs.ptr;<br />
Marshal.PtrToStructure(structure, pairs[i]);<br />
current = (IntPtr)((int)current + Marshal.SizeOf(ptrs));<br />
That works great. There should be a call to Marshal.DestroyStructure(...) made in there to clear up the unmanaged memory, but there is a function in the dll that clears this memory for me, so I do not use Marshal.DestroyStructure(...).
You should declare MYSTRUCT as a struct, not a class. Structs (value types) are allocated on the stack while classes (reference types) are allocated in the heap. When you pass this struct around, you don't want to keep a reference to it in most cases. As a struct (value type), it is passed by-value unless ref or out is used.
The answer to both questions is to apply a DataGridTableStyle.
DataGridTableStyle style = new DataGridTableStyle();
style.MappingName = "MyTableName"; // Name of the DataTable
DataGridColumnStyle colStyle = new DataGridTextBoxColumn();
colStyle.Width = 85;
colStyle.NullText = "";
colStyle.MappingName = "Column1"; // Name of the column in the DataTable
colStyle.HeaderText = "First Name"; // This will be displayed as the column header
As an answer to your first question: you can add DataGridStyles to your Grid, in the designer and in code. Do this before you point the Grid to its datasource. If you program the available columns manually, you can set their Width and headertext too. All columns you want invisible, set the respective widths to 0.
You can also define a methodthat returns a DataGridStyle and add that to the Grids style, possibly deleting the old style (DataSource has to be null to do that I believe)
Last Visit: 31-Dec-99 18:00 Last Update: 3-Oct-23 5:28