|
PeterJensen wrote:
My problems is, that im in need of perfomance..
I dont think i simple class like the Node you describe would have much of a performance impact, there are much better and easier ways of gaining performance. Heck i'll mail you the zip from MSDN i downloaded on performance tweaking.
PeterJensen wrote:
I cant really see why MS has decided to use pointers?
Compatibility with non-managed systems AFAIK.
Who is this miscrosoft, and what devilish plans have they for us?
|
|
|
|
|
Thank you, for sending me the perfomance tweaking..
There is definetly alot to learn!
Its hard to start in a new "World"
Thanks again
|
|
|
|
|
just wondering.. is there a way to turn the console on...in a application through a commandline argument (-console) even though the program is compiled as a winexe or do i have to make my own console type app to show this ?
|
|
|
|
|
don't think so.
what you can do is compile as a console app and launch you application window, then hide the console window until you need it.
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
how do you hide the console ? Console.Hide() or something ???
|
|
|
|
|
How to create a word document with sections' content combined from
other word documents?
What I mean is,
I've got 2 word documents and there are a certain identical
sections(header is identical) in those documents.
I want to create a third document with the content combined from both
of these word documents.
How do I do this in C# using winforms?
I have already tried dabbling with "Word" namespace, and the
DocumentClass()
No results...
So can any one help me out in this.
Thanks in advance....
Cheers/-- Vin
|
|
|
|
|
Record a word macro. Then translate the VBA code to C# code using the Word namespace (from the Office Primary Interop Assemblies, distributed by MS).
|
|
|
|
|
I tried to integrate a flex program with C# the way I used to integrate with VB6 but nothing is happening.
I want to know he correct way to do it. Is there any DLLs I have to attach?
Pls help me.
Thanks.
kind rgds,
Anjana Aluthwala
|
|
|
|
|
hi....
I would like to know whether there are any Web Form(ASP.NET) Controls which cant be used in Window forms & vice-versa?
regards,
sujith
|
|
|
|
|
Web Forms and Windows Forms are like Canada Dry. Looks like the same, smells like the same, but isn't the same at all. For instance, currently there is no ASP.NET treeview.
In fact, MS is releasing shortly a package[^] known as Internet Explorer Web Controls 1.0 which, unlike the name suggests, adds a few controls to the ASP.NET Toolbox.
But again, the only thing in common between Web forms and Windows forms is that you manage them in the same IDE, and they can be written using the same language (ie C# for instance).
We could say the same about the .NET compact framework controls. Canada dry.
The bad news is, yes, the code is different, then the bugs and behaviors are different as well. Business opportunity here for a company who would code a set of controls which would at run-time dynamically bind to the right context (ASP.NET, Windows, Pocket PC, ...).
|
|
|
|
|
Exactly correct, Win and Web Forms programming are not similar, in fact they are entirely different namespaces.
I worked with the asp:DataGrid and then thought working with DataGrid in windows would be easy, however, I had to relearn the DataGrid for WinForms.
Maybe it was too much work for Microsoft to dynamically bind to the correct context as mentioned in .S.Rodd's comment. I'm thinking since the WinForms probably resolves straight to WinAPI calls, it would be hard to keep same functionality between ASP controls and Win controls.
R.Bischoff | C++
.NET, Kommst du mit?
|
|
|
|
|
Soliant wrote:
I worked with the asp:DataGrid and then thought working with DataGrid in windows would be easy, however, I had to relearn the DataGrid for WinForms
I can understand it as the DataGrid is not at all what we would have thought it was, i.e. the famous FlexGrid (ActiveX) control.
|
|
|
|
|
I have a control I am making that I want to sit in the System try until F7 is pressed. Anyone know how to go about looking at all the keys being pressed on the system...
Thanks very much,
Scan
|
|
|
|
|
Look Cp and MSDN with the hotkey keyword.
|
|
|
|
|
|
Are properties slow or fast to use? What I mean is: Isn't
class A
{
int i;
A()
{}
public int I
{
get { return i; }
set { i = value; }
}
}
A a = new A();
a.I = 5;
int b = a.I;
// slower than:
class A
{
public int i;
A()
{}
}
A a = new A();
a.i = 5;
int b = a.i;
And another question: if a function is called 100x a second (or more) which creates/returns objects (structs and classes) as data, won't this have an impact on performance (for real time stuff - for example user input) ?
If it is not efficient, what optimizations are possible or how should it be done properly?
Thank you in advance and don't kill beginners for stupid questions
|
|
|
|
|
The JIT compiler (only on the release version of your assemblies) will inline any method with less than 32 bytes of IL.
I see dumb people
|
|
|
|
|
Can you call processes on another machine via SSH using the C# base class library? I'm looking to be able to access Unix on another box and am ONLY allowed in via SSH or web services using SSL. I'm planning to build some web services, but would like the ability to get in via SSH.
Chuck King
|
|
|
|
|
|
Ok, something worries me about array types in C#. Two things actually, the first being the concrete type of an array of C# objects. The following:
SomeClass[] myArr = new SomeClass[10];
creates an object myArr that is of a type derived from System.Array , and specialised for objects of type SomeClass . My first question regards the [] operator. Where does it suddenly spring into the picture? It doesn't exist on objects of type System.Array . The type of the indexer for myArr above is SomeClass it seems, as the compiler won't let me make a statement like:
myArr[0] = new string;
and quite rightly so, complaining that string cannot be converted into SomeClass . Thus the indexer must be part of the interface of the automatically generated derived array type. The wierdness begins when I do this:
object[] mySameArr = myArr;
Console.Write (mySameArr[0]);
Now, this compiles and runs without a problem. How? The interfaces of the derived object[] and SomeClass[] types must be different, because each declares an indexer with a different signature. This probably shouldn't compile, or at least, shouldn't run, because despite SomeClass being derived from object , SomeClass[] is NOT derived from object[] ! What's going on? Does the C# compiler fudge this some way, or does the .NET CTS have different relationships between array types that doesn't fit my (somewhat C++ skewed) view? Is this some kind of mock-up of generics that seems like it will be broken once real generics are implemented?
My second, and maybe not so confusing, question regards pointers and arrays. This appears in MSDN:
public unsafe int Read(byte[] buffer, int index, int count)
{
int n = 0;
fixed (byte* p = buffer)
{
ReadFile(handle, p + index, count, &n, 0);
}
return n;
}
Can anyone tell me where the conversion is made between the byte[] specialisation of System.Array and byte* ? Is there a conversion operator defined in that subclass, or is there some other compiler funk going on?
Should I be poring through the C# standard? Thanks for any help, and please, if this has come up before (as I'm sure it would have) point me towards the old posting.
|
|
|
|
|
|
I need a way to get network status like connected or disconnected.
I have generated a class with mgmtclassgen and it throws exceptions
when tring to create the class. What is the best way to do this?
Thank you
Bo Hunter
Me
|
|
|
|
|
Are you using the System.Management and System.Management.Instrumentation namespaces? If so, then you can just use a WQL query with the ManagementQuery object and query whatever you want.
Hey, what can I say? I'm a chick magnet...a babe conductor...a logarithm for the ladies.
-Strong Bad from HomeStarRunner.com
Essential Tips for Web Developers
|
|
|
|
|
I am assuming you are using WMI to get the network status. The problem you may be that certain adapters do not have an actual instance when you check the status. For example the WAN Miniport (PPTP) will not have a status all the time (if it does at all). WHen you loop through your ManagementCollection you will get a NullReferenceException -
Bo Hunter wrote:
object ref not set to an instance
object ref not set to an instance. To get around this you should catch the error, or narrow your WQL. If there is a certain adapter you are checking for let me know. I will post some code. I hope this is along the lines of what you are after.
Matt is a network administrator for an insurance company in the midwest. He is shamelessly looking for Windows programming side work.
|
|
|
|
|
Hi,
I want to add my application to the registry for it to start at Windows startup (don't worry, user configurable).
I just can't find a way to get the fully qualified path of my main executable (including filename).
Any ideas?
-- LuisR
──────────────
Luis Alonso Ramos
Chihuahua, Mexico
www.luisalonsoramos.com
"Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein
|
|
|
|