|
thank you!
i didn't find this anywhere.
|
|
|
|
|
I have made a custom control, which have a property named Items. Items is a collection. This collection can in the designer be changed by using the collection-editor accessed from the property viewer.
My problem is when I add items through the designer(collection-editor) in the property viewer. After adding a new item, it is shown in the control, but do I reload the form(by closing the window, and open it again), the item is not present - not visually in my control and not in the collection-editor.
I see that after adding items using the collection-editor, no code are added to the InitializeComponent function. I wonder if you need to do something specific to have it added correctly to the parents InitializeComponent function?
Thanks in advance,
Gooky
|
|
|
|
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
does the trick...
Gooky
|
|
|
|
|
What do you add this to, the control's class or the property itself?
Thanks,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|
|
the property
Actually, you also need to make a typeconverter. I found an excelent article about it:
http://www.divil.co.uk/net/articles/designers/collectioncontrols.asp
Gooky
|
|
|
|
|
hello
i search how to detect the connection and the deconection of the modem .
because i want to make an application who can tell if the connection is on or no?
|
|
|
|
|
check out a search on your pc for wininet.h
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
[System.Runtime.InteropServices.DllImport("wininet.dll")]
public static extern bool InternetGetConnectedState(IntPtr lpSFlags, int dwReserved);
|
|
|
|
|
I created a dataviewmanager because i have dataset and want to provide different views on that that dataset. Is it possible to get the rows in a dataviewmanager? That is, I want to see the contents of the dataviewmanager. Does any one have any sample code?
|
|
|
|
|
I have ccoCustomers and cboStoreLocation
Customer has multiple store Locations
if I have 2 DataTables one CUstomer(ID) and the other SotreLocation(CustomerID)
what is this best way to bind these together?
nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Just reading up on "active directory - DirectoryEntry", come across this code fragment:
DirectoryEntry de = new DirectoryEntry();
String schemaNamingContext = de.Properties["schemaNamingContext"][0].ToString();
String defaultNamingContext = de.Properties["defaultNamingContext"][0].ToString();
What's:
a. schemaNamingContext
b. defaultNamingContext
Don't have anything from MSDN...
norm
|
|
|
|
|
|
|
Funny, I'm using active directory to log people on my application and I was looking for something like that.
nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
But, what is "naming context", it seems to me it means nothing more a LDAP path - therefore the phrase "context".
norm
|
|
|
|
|
1
2
3
probably mopre of what your looking for
nick
From what I see you get the schema for the container which maps out the organization like a xml schema.
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
i got it:
schemanamingcontext = schemanaming "container"
man, "context" is confusing, they really should named it "container" instead
norm
|
|
|
|
|
yeah ms and thier hype words
securitycontext = securitycontainer for the object (DCOM)
MTScontext == the container for the MTS object thats acts as a proxy much like Eneterprise Java Beans
need I go on...
now that I think about in my COM+ book for c++
COM+ wraps every thing with a container to proxy calls and what not and they call that...guess... ObjectContext
go figure
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
"context": something of interest resides in contexts (make sense doesnt it)
After you explaining it, I begin to look at the word "context" (and the world) differently: context==container. or more precisely, container==context (gee, that feels a lot better now)
norm
|
|
|
|
|
funny though how I didnt undertsand that I did understand so-called "Context"
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Here's a reference from MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netdir/ad/serverless_binding_and_rootdse.asp
norm
|
|
|
|
|
Guys,
How can I call a c++ function from c#?
Many other sites say "call it as a DLL using InteropServices", but this seems like hard work. I have a single solution with two projects. One is in C++ the other is in c#. Why can't I just compile them together and have the linker resolve the references between them.
People are suggesting that you can't do this at compile time - only at run time via a DLL. But that seems crazy. Has anybody worked out how to do it>
Rob
|
|
|
|
|
|
Leppie,
So I think that you are saying that the only way to do this is at run-time - is that right? I am suprised that I can't declare a C++ function as public and have the linker resolve across the two languages.
I have given up trying to learn Microsoft C++, I think that the compiler are environment are awfull. When ever I try to use it I end up spending days trying to understand bizare error messages from the compiler or linker that give very few clues as to what might actually be wrong with the code. I am much happier with c#.
Regards
Rob
|
|
|
|
|
just expose your C code as managed C++ lib, then Add Reference. i think if you know what you're doing, it's like a hour's work. If your c++ code is managed code, just compile the "managed c++ class library". If not, just cut and paste your c++ code into a managed c++ class library - then compile and get your dll/assembly. After that, you have two options:
1. shared dll (you need to install assembly into GAC - perhaps forget it for now)
2. private dll (That's what you will do, for now)
With option 2, just do this:
1. Project menu
2. Add Reference
3. Browse (select your dll/assembly)
Then, just use it in your c# code:
using namespace XXXXX;
...
...
MyCPlusPlusClass obj = new MyCPlusPlusClass();
...
Just in case you get confused... in your managed class library (which compiles to dll):
namespace XXXXX
{
public class MyCPlusPlusClass //REMEMBER "public"
{
//your stuff
};
}
I don't think you need interop. YOu didnt develop a COM/ATL-server. For newbies, what I described is easiest and it's more efficient (by passing layers of framework code). But, if you wish to explore:
subject: RCW (Runtime callable Wrapper) - Interop
teach yrself C++/VC.net in 24 hours book (publisher: Sams)
good_luck
norm
|
|
|
|