|
Erm... have a look at the DirectorySearcher and Directory Entry classes. They are mainly for Active Directory but I think WinNT which is a ADSI provider protocol (NT4) is supported so you might be able to use that... Otherwise it's Win32 API time... and at the moment I have no idea where to start...
Sorry!
I'll certainly give it some thought!!!
-----------------------------------------------------------------------
Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!!
|
|
|
|
|
Thanks..... will look into it!
Nick Seng (the programmer formerly known as Notorious SMC)
God, I pity me! - Phoncible P. Bone
|
|
|
|
|
No probs.. I'd be interested in knowing how you get on as I can't try the calls on a non-AD network... (AD city in this building!!)
-----------------------------------------------------------------------
Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!!
|
|
|
|
|
Hey,
I have a collection of objects. For each object in the collection I want to show a radiobutton on my windows.form.
ex.
O Object1.fieldname1
O Object2.fieldname1
O Object3.fieldname1
The problem is thatI have to create the radiobuttons dynamically, because I don't know how much objects are in my collection.
With a combobox there is no problem. I just use there a datasource, a displaymemeber and a valuemember.
But now, intead of having a combobox, I want it in radiobuttons.
I thought a radiobuttonlist was a solution, but that is only for webcontrols.
Or maybe I can play with the groupbox where the radiobuttons come in?
How I create a radiobutton at runtime??
Maybe somebody have an idea?
Thanks in advance,
Nic
|
|
|
|
|
I'd like to access files in remote computer.
However I hardly know how can I access..
What I want is,,
One client accesses to a server, and it checks some of files updated
(I think it is possible to identify modified date of file.)
And If some of file had changed, the client download the files from the server.
How can I do to make it? Thanks..
I'm not who I was
|
|
|
|
|
Not quite sure what it is you're trying to ultimately achieve but I would probably stick the file in a Web folder and then use the HttpRequest classes etc to get the file info and download the files.
It's certainly a better idea than just sharing a folder. Will it just be on a local network or reachable over the internet!?
Shaun
-----------------------------------------------------------------------
Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!!
|
|
|
|
|
Is there event before a window form closed? Is it BeforeClosing ? But I can't find it in C#.How to realize it ?
X4ever
|
|
|
|
|
There's Closing, Close, QueryUnload, and Unload. Look 'em up!
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Xpelive,
The event you're looking for is Closing . The best way I have found to locate an event handler that is supported by an object is to select it in VS and look at the events list in the Properties pane... (press the lightning bolt button)... you can then select interesting looking ones and press F1 to get help on it!!!
HTH
Shaun
-----------------------------------------------------------------------
Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!!
|
|
|
|
|
Take a look at this[^]article,that would give you better idea.
Cheers,
Kannan
|
|
|
|
|
Hi, Friends! Does C# have a string function like CString of C++ ? but the C#' String is too small or I must to inheritance String and write a new class ? thx!
|
|
|
|
|
Well there's the string class/type... which maps to System.String which has pretty much all of the functionality of the MFC CString.
The problem is that it is marked as sealed which means you can't derive a new class from it... you could contain a string object in another class then write your new methods to work with the contained string...
What is it you actually want to do?
-----------------------------------------------------------------------
Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!!
|
|
|
|
|
thx! I want to know a word is the word's substring ot not, but System.String have not the function!
|
|
|
|
|
Can't you use IndexOfAny()???
e.g.
<br />
string myString = "Hello Dave, how are you today?";<br />
string searchString = "Dave";<br />
<br />
bool isSubstring = (myString.IndexOfAny(searchString)!= -1);<br />
<br />
if(isSubstring)...<br />
HTH
Shaun
-----------------------------------------------------------------------
Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!!
|
|
|
|
|
;P O ... ya.. thx! But, I always feel the String is too small , thank you very much !!
|
|
|
|
|
Anytime.
-----------------------------------------------------------------------
Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!!
|
|
|
|
|
Had a look at StringBuilder?
System.Text.StringBuilder
In C++, CString does the job of both System.String and System.Text.StringBuilder.
"Je pense, donc je mange." - Rene Descartes 1689 - Just before his mother put his tea on the table.
Shameless Plug - Distributed Database Transactions in .NET using COM+
|
|
|
|
|
What size should I use to get an equivalent C struct for the type bool?
i.e.
struct
{
DWORD a;
bool b;
} s;
would be
struct s
{
int a;
// bool a; or char a; or byte a; ?
}
...what's the best way to marshal C bools?
|
|
|
|
|
grv575 wrote:
...what's the best way to marshal C bools?
bool is not a C data type. Look at the typedef of it.
<a TITLE="See my user info" href=http:
|
|
|
|
|
unsigned char or int?
What's more common (VC 6 i guess, if anyone can check)
|
|
|
|
|
What does it say in the header file? It all depends how that implementation is defining it.
<a TITLE="See my user info" href=http:
|
|
|
|
|
Wish I knew. I deleted VS6 and am not keen on reinstalling it. In any case I'm almost certain it's typedef int bool or typedef enum { false, true } bool.
Either way, it looks like I need a dword size field.
|
|
|
|
|
I am writing a utility to help deploy some applications.
This utility is used to check the pre-requisites on a PC before an install will be attempted.
One of these aplications uses MAPI.Session and CDO.Message to recieve emails and send emails via SMTP.
How can I detect if MAPI and CDO are installed on the PC using C#
Thanks for your help
Andy
|
|
|
|
|
Thanks WiB,
I know what MAPI and CDO are but I am trying to find a way of checking they are installed on a PC.
My current testing since posting the question is this - which seems to be working.
protected void CheckMAPI()
{
try
{
Type objMAPIType = Type.GetTypeFromProgID("MAPI.Session",true);
object objMAPI = Activator.CreateInstance(objMAPIType);
if (objMAPI == null)
{
txtMAPIStatus.Text = "MAPI not installed";
}
else
{
txtMAPIStatus.Text = "MAPI Installed";
}
}
catch (Exception e)
{
txtMAPIStatus.Text = "MAPI not installed";
//MessageBox.Show ("Exception - " + e.Message);
}
}
|
|
|
|
|
I am creating a ocx that is a treeview.
I am trying to capture the OnNotify with
NMHDR *phdr = (NMHDR *)lParam;
// Coming from listview?
if( phdr->code == NM_RCLICK )
MessageBox(NULL, "Right click found", "Click", MB_OK);
but i am only getting the calls when the mouse is clicked on the header, same goes for Double click, what am I doing wrong,
any help is really appreciated
shotgun
|
|
|
|