|
Use RichTextBox.SelectionColor property
"I dont have a life, I have a program." Also, I won't support any software without the LeppieRules variable.
|
|
|
|
|
how can I remove the textselection again?
|
|
|
|
|
RichTextBox.SelectionLength = 0;
"I dont have a life, I have a program." Also, I won't support any software without the LeppieRules variable.
|
|
|
|
|
Hi,
How Can I check username and password of a user in Windows 2000 advanced Server? I want to check authenticate of all users of a domain, or local users of windows.
mkomasi
|
|
|
|
|
Maybe this will help you for begin:
Getting local groups and member names in C#[^]
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
For better way check this class of .NET:
DirectoryEntry
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Changing the opacity of a MDI child form has no effect.
If I change the opacity of the MDI parent, then the child's opacity changes too.
What I want to do is change the child's opacity independent of the parent's.
Is this possible?
Or, maybe the child form is considered a "control" of the parent and then inherits some characteristics from it.
Cheers,
Simon
"From now on, if rogue states want to buy weapons of mass destruction, they're going to have to go on eBay," Mr. Bezos said.
|
|
|
|
|
Hello Friends,
I am trying to create an installer for my application which will check if the .NET Framework is
installed on the user machine. If the framework is not installed then I want my installer to
first install the framework and then install my application.And if the frameWork is installed it
should directly install my application escaping installing .NET Framework.
I have developed the installer using the procedure given in msdn "Redistributing Dotnetfx.exe
using Setup.exe Bootstrapper".
My installer folder, which is right now on my local m/c having path D:\\Installer, contains
following files...
1)mySetup.msi
2)setup.exe
3)settings.ini
4)dotNetFrameWork/dotnetfx.exe
My setting file looks like this
[Bootstrap]
Msi=mySetUp.msi
'LanguageDirectory=
'ProductName=testproductname
'DialogText=
'CaptionText=
'ErrorCaptionText=
FxInstallerPath=dotNetFramework\
now when i try to open/run setup.exe its giving me following error :
"Incorrect command line parameters".
I've tried using :
FxInstallerPath=D:\\Installer\dotNetFramework\
But still getting the same problem.
Can anyone tell me whats the problem.
Thanks in advance.
regards,
Saroj
|
|
|
|
|
Hi.
I have some fundamental questions on the listview.
1) I added a listview with some columns, however, the column titles do not appear. The columns are there, but they do not appear. Is there a setting in winform that can hide it?
2) How do you search for an item in the listview?
3) How do you set the text of a specific item in a listview? For example, I want to set the text of item 2 column 1.
Thanks,
Kuphryn
|
|
|
|
|
kuphryn wrote:
1) I added a listview with some columns, however, the column titles do not appear. The columns are there, but they do not appear. Is there a setting in winform that can hide it?
You need to be on Detail mode instead of Small Icons, Large Icons, or List.
kuphryn wrote:
2) How do you search for an item in the listview?
Well, you would do something like this: myListView.Items.IndexOf(myListViewItem); where myListViewItem is the ListViewItem that you want.
kuphryn wrote:
3) How do you set the text of a specific item in a listview? For example, I want to set the text of item 2 column 1.
myListView.Items[0].SubItems[0].Text = "This text appears in the first row under the second column!"
Hope that helps.
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
|
|
|
|
|
Nice!!! Thanks.
One last question on this item. How do you determine exactly what item the user selects via mouse?
For example, let say I click on item 2, I want the program to do something with item 2.
Kuphryn
|
|
|
|
|
Then you would use the myListView.SelectedItems or myListView.SelectedIndices property instead of myListView.Items
By the way, there are some really cool replacements for the standard list view. Consider this one for your app instead. Carlos really does a good job on custom controls. He also explains what's wrong with the standard one and why he implemented the new features that he did.
http://www.codeproject.com/cs/miscctrl/sortedlistview.asp[^]
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
|
|
|
|
|
Okay. Thanks.
I tried using SelectedItems, but it does not return the correct selected item. For example, it always return index 0 even if I select index 10.
Kuphryn
|
|
|
|
|
Are you handling the SelectedIndexChanged event? And, since SelectedItems is a collection, did you access it like this: myListView.SelectedItems[0]
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
|
|
|
|
|
Yes. I added a handler for SelectedIndexChanged event and checked SelectedItems[...]. However, for some reason item 0 is always selected even if I click on item 2002. Weird!
Kuphryn
|
|
|
|
|
Actually, I just played around with it a bit, and you should handle the click event instead. Then do myListView.SelectedItems[0] . Oh, and you have to use 0 because that's the only item in the collection of selected items.
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
|
|
|
|
|
Nice! Your solution works perfect!
Thanks again,
Kuphryn
|
|
|
|
|
kuphryn wrote:
Your solution works perfect!
Cool! Glad I could help. Mind if I ask what your app does?
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
|
|
|
|
|
It is not an application. It is something I have to do for a school project. Thus, I do not consider it an application. Lets just say it is a "Hello World" instruction using C#.
Thanks again,
Kuphryn
|
|
|
|
|
Cool. Where do you go to school?
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
Microsoft has reinvented the wheel, this time they made it round.
-Peterchen on VS.NET
|
|
|
|
|
I go to school in, lets just say, a school to a pretty bad Computer Science program.
Oh, I guess you already see that via the fact that we even consider C#.
Kuphryn
|
|
|
|
|
kuphryn wrote:
Oh, I guess you already see that via the fact that we even consider C#.
What!?!?! That's a good school, IMO. Most schools won't even consider using these "bleeding edge" technologies. Are you in high school or college?
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
Microsoft has reinvented the wheel, this time they made it round.
-Peterchen on VS.NET
|
|
|
|
|
I'd LOVE it if my college had C# instead of Java!
|
|
|
|
|
hahahah
C# is a joke compared to C/C++.
Kuphryn
|
|
|
|
|
I am converting an old VC++ app to C#. I had two builds for this program: 1) an Eval version; and 2) a registered version. The way I had this setup it required 2 separate programs to be built. The eval version expired after 30 days had passed by storing an encoded timestamp in the registry of when it was installed so it could tell when the expiration date had elapsed and disable the software. So now in the .NET world, where folks seem to be shying away from using the registry (not necessarily a bad thing!), where is the best place to do something like this? In the metadata, or in assembly attributes, etc. ?? I'd rather not use the registry if there is a more appropriate, politically correct place to put this. Basically I don't want the user to be able to go in and fiddle with it. Thanks in advance.
Regards,
Roy
_____________
Roy H. Berger
roybrew@att.net
|
|
|
|