|
What exactly is your problem, getting the accounts or converting them to WindowsIdentity objects?
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Actually both, for now i don't know how to get the users so in mean while i just tested with filling in the username in a textbox. Then i tried to get a windowsIdentity object from that but it failed. The only thing i can do is get the SID from the username.
I want to have a WindowsIdentity object to use in this class: www.codeproject.com/useritems/UserFileAccessRights.asp
So if you could tell me how to get from sid to windowsIdentity or to get a list with users and windowsIdentity objects, it's the same...
Greetz,
Frederik
|
|
|
|
|
There is probably something you could use in System.DirectoryServices.dll . Regarding the second issue I'm sorry but I don't have time at the moment to even scan the article, but hopefully the DirectoryServices namespace might help you a bit.
The Welsh will always support two teams: The Welsh, and anyone playing England
|
|
|
|
|
Can anybody help me in disabling the pop up menu ie . (paste, cut, copy etc) thanx
Akhil
|
|
|
|
|
akhils wrote: Can anybody help me in disabling the pop up menu ie . (paste, cut, copy etc)
Why do you want to do that? Can you elaborate in more detail and maybe someone can help?
|
|
|
|
|
hi... thnx for the response
in my Application i hav a combo box . i dont want user to enter the values which are not there in the list . so i suppressed the key events . now user is not able to enter the values through key board. But the problem is user is able to right click on it and and cut the values, paste the values etc . can u help me in this problem ???
Akhil
|
|
|
|
|
You might want to look at this article, A Complete Read Only ComboBox[^]
Or search this site for read only comboboxes. This might help you and you won't have to worry about trapping mouse events.
Hope this helps some,
Paul
|
|
|
|
|
Hello my friend,
Just check "DropDownStyle" property of combobox.
Set the property to DropDownList.
Rahul Kulkarni
|
|
|
|
|
RahulRKulkarni wrote: Set the property to DropDownList.
That looks like it works just fine
|
|
|
|
|
Thanx All for the replies.. let me try it out
Akhil
|
|
|
|
|
akhils wrote: Thanx All for the replies.. let me try it out
Good luck to you
|
|
|
|
|
Hi All, I am trying to figure out how to use a VScrollBar within a Panel and a series of textboxs. I have about 25 textbox within a Panel. I want to be able to scroll through the panel if the form is to small to see all the textbox. I tried putting a VScrollBar within the Panel but can't get it to scroll the contents of the panel. I can't use AutoScroll property coz I'm developing for Pocket PC. Dot Net Portal Framework don't have autoscroll property for panel. Can you please tell me how am I gonna change the panel visible area.
Thanks
|
|
|
|
|
Hi guys,
In C# how do I check if a table exists on SQL server 2000? If it doesn't exists then I am creating the tables but I would like to check first if the table exists.
Please help.
sasa
|
|
|
|
|
an easy way would be to use a try and catch and create the table. SQL wont overwrite the table thus if it exist your program will throw the exception which will be caught. Or you could use the following T-SQL
IF (SELECT count(name) FROM sysobjects WHERE type = 'U' and name = 'yourtable') > 0
BEGIN
Print 'Table Exists!!'
END
else Print 'Table Does not Exist!!'
|
|
|
|
|
Thanks for your help. I am using try/catch at the moment but in the future I would like to use your Select statement.
I have a question about the select statement, (name) would that be name of the field in the table, also what is type='U' also don't you need sqlconnection object to run the query?
Please advice.
sasa
|
|
|
|
|
Dont change the (name) part but change the part where I put "YourTable" that is where your table name goes. What it will do is count how many tables exist in sysobjects with your table name and if the count is greater than 0 than the table exists. "U" just means its only looking at the user tables and not the sql server tables.
Ron S.
|
|
|
|
|
And, yes you do need a your sql connection ect.
|
|
|
|
|
I'm changing a control property at design time (backColor, etc), at some point of the program... I want to restore the control's default properties that I have chosen at design time.
Is that possible?
thankx
|
|
|
|
|
|
Hi, Im a first time poster long time user of the code project.
I am currently working on a web browser. I have release the beta 1 version (its called: T.I.B. [Beta 1])and people all over the place loved it especially the people that tested it at Cybershack Forums.
I am now making a beta 2 and i have failed many a time to figure out how to get the html source of a webpage to open in a notepad document (.txt) like Microsoft Internet Explorer or for it to open the html source in a richTextBox when the user wants to view the source.
Can somebody help me out here, can you make me a code that will open the html source from a web page in a web browser control that will open in a .txt document or in a richTextBox or even in a pop-up windows form.
P.S. If somebody does manage to help me out here, i will give them credit for their programming in the credits of the my web browser program as a sign of how grateful i am.
|
|
|
|
|
James Dufty wrote: or in a richTextBox or even in a pop-up windows form.
Why not combine these two? Create a windows form with a RichTextBox and assign the html source to its Text property.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
www.troschuetz.de
|
|
|
|
|
You can invoke the View Source function in the AxWebBrowser object:
http://support.microsoft.com/?kbid=329014[^]
or you can do this your self by getting the source of the document, and writing it to a text file in your temp folder, then simply launch notepad with the filename as an parameter.
Gav
-- modified at 6:23 Thursday 20th July, 2006
|
|
|
|
|
I still don't get it... perhaps somebody who gets it can make a demo project of this function, it would be good.
|
|
|
|
|
I am trying to write data to a textbox I have on a form (Form1) from a method in a class.
In my class I try writing -
public class NumberProcessing
{
public static void UpdateNumArray()
{
Form1.textBox1.text = "hello";
}
but the intellisense does not recognise anything past Form1.
Why can I only access textbox1 when in public partial class Form1 : Form ?
How can I access the textbox property of Form1 from other classes ?
Haz
|
|
|
|
|
Sorry, c# is not VB6 you need an object reference to Form1 in order to update it. If you insist on this pattern pass the reference to the form in the NumberProcessing contructor. However, I seriously recommend scrapping it and trying again. From what I see you are about to design something very unmaintainable.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|