|
Hi & Good day to you too
what do you mean by disable some items !!
it is up to you not to give the user a specific action in a specific item
here is an example
void SetDisabled ( ListView MyView )<br />
{<br />
ListViewItem MyItem = new ListViewItem ( );<br />
<br />
MyItem.Text = " First Col";<br />
MyItem.SubItems.Add( "Second Col", Color.Red, Color.Yellow, new Font ( "Tahoma", 9F ) );<br />
MyItem.SubItems.Add ("Third Col"); <br />
<br />
MyView.Items.Add ( MyItem );<br />
<br />
if ( MyView.Items [0].SubItems[1].ForeColor == Color.Red || MyView.Items [0].SubItems[2].Text == "Third Col" )<br />
{<br />
}
Ahmad Shaban
|
|
|
|
|
Thanks for your ideas. its good. it work.
|
|
|
|
|
Hi!
Unless you're willing to rewrite the ListView there's no such thing as a disabled item per se.
So you'll have to manage the information which items you consider "disabled" yourself (for example by assigning something to the item's Tag property).
But you can subscribe to the SelectionChanged event or the MouseClick event and then act differently depending on the state of the item, for example removing the selection (so that "disabled" items cannot be selected) or showing a different context menu for these items.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Hi,
thanks for the additional info. I really Appreciate it.
Thanks to all of you guys who helped me.
More power to you!
|
|
|
|
|
1. Wondering why my c# service wouldn't start automatically after bootup. Have the correct settings in ProjectInstaller.cs, meaning the windows account and starttype information.
this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem;
this.serviceProcessInstaller1.Password = null;
this.serviceProcessInstaller1.Username = null;
//
// serviceInstaller1
//
this.serviceInstaller1.ServiceName = "AdminServer";
this.serviceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
2. No issues if I start the service manually after the bootup, meaning it would not fail to start.
3. Installed the service using installUtil.
4. Added log information in the OnStart(), main etc..but found that SCM didn't even make an attempt to start the service.
5. Also this is a sample service and doesn't have any other dependecies.
Would appreciate any thought on this issue?
-- modified at 21:56 Sunday 19th March, 2006
|
|
|
|
|
Check the eventlog. Service startup issues are a pain to debug
|
|
|
|
|
I have a main form that opens up several other forms with button presses. Most of these forms work fine, but one of them seems to be running the OnPaint event every millisecond for some reason (as a result the contents are flickering). The form uses standard settings given to it by Visual Studio when a new form is added to the project, with only the following code added by me:
protected override void OnPaint(System.Windows.Forms.PaintEventArgs pe)<br />
{<br />
base.OnPaint(pe);<br />
System.Drawing.Graphics g=pe.Graphics;<br />
System.Drawing.Rectangle client_area=this.ClientRectangle;<br />
int i;<br />
RectangleF cRect = this.ClientRectangle;<br />
PointF cPoint = new PointF(0, 0);<br />
for(i=9; i<72; i+=4)<br />
{<br />
Font nfont = new Font("Arial", i);<br />
this.Font = nfont;<br />
string s = this.Font.Name+" "+this.Font.Size;<br />
using(nfont)<br />
{<br />
g.DrawString(s, nfont, Brushes.Black, cPoint);<br />
}<br />
cPoint.Y += i;<br />
}<br />
}
|
|
|
|
|
I figured it out, this.Font was messing it up. When I replaced
this.Font = nfont;<br />
string s = this.Font.Name+" "+this.Font.Size;<br />
with
string s = nfont.Name+" "+nfont.Size;<br />
it started working.
|
|
|
|
|
I need to get a program that I can give it a webpage url and it will then return to me the keywords on what the page is about. It would need to look in the domain name, folder name, file name, meta title, meta keywords, meta description and then in the page body. I am willing to pay someone who can help me get something like this coded.
|
|
|
|
|
You'll probably have better luck on pay-for-code sites like Rentacoder.com
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Moral Muscle
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
I want to read a RTF file to a RichTexBox and then add an image to it and save the changes . how can I add image to RichTextBox ???
www.behzadi.net
|
|
|
|
|
hi,
short story:
I need a recomendation for a good C# book, newbie friendly (target reader doesnt know any OOP and hardly any programming) and hopefuly covers .NET 2 and extras (ASP? ADO? XML?).
long story:
Yesterday my dad heard me and my brothers speaking about C# and such and burst out "where can I get a good book about C# ?". I don't know if its his attempt to get closer to his children but I got fairly excited by getting him to join on what I consider a great hobby (Im talking about programming). Me and my brothers studied from the internet but my Dad is more old fashioned and wants paper in the hand.
If worst happens and my Dad gives up after a few pages Ill get the book so its not a waste (though for myself Id like something less newbish but oh well).
thanks in advance,
Iftah.
|
|
|
|
|
Jesse Liberty's Programming C# 4th Edition. I have his 1st edition, which is excellent, so I assume the 4th edition is too.
http://www.libertyassociates.com/pages/Books.htm
Not really aimed at beginners but is fairly accesible. Covers mostly the details of the language but also covers a bit of each .NET technology.
Kevin
|
|
|
|
|
Hard to say what book to recommend as the texts for C# vary from practical to the ridiculously thick and useless. These days the good ones are all marked as beginner or advanced topics. So unless your "Dad" is trained in computer science you are probably fine with book suited for beginners that has good fundamentals of programming and some simple examples. There is no use explaining a hastable to someone who has no idea what it used for, so use your instincts and pick one that "makes sense".
Good Luck
Mike Luster
CTI/IVR/Telephony SME
|
|
|
|
|
How does one implement floating panes using 'VSIP' sdk. I need floating panes like the properties and solution explorer panes in visual studio .net
|
|
|
|
|
I am shure that there is some documentation included with the SDK.
Have you looked there for clues?
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
hi
if ther are any one know any package or something that can help me to get full information about packets like( flags ,size ,next protocol,crc,size) in another word i need every possible information can i get from a packetand it's header
and thanks
|
|
|
|
|
What packets are you talking about?
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
i want to make a sniffer that capture packets from network card and i want a package that make me able to deal with all packet's header field's
i have winpcap that capture this packets but i need the second step to make my project
|
|
|
|
|
Hello everybody in this forum.
I need to enable connection by adding my Client application and its ports in the internet connection firewall in windows xp SP1 Programmatically ?
Note:
-----
I read in MSDN articles about enabling these ports that uses networking , Programmatically in the windows xp firewall Using HNetCfg.dll found in the system32 but the problem is that:
this file in my windows xp SP1 doesn't have the FWManagerClass that was imported from the Com file ????
I really don't know why this class doesn't exist in my windows HNetCfg.dll file in system32
(i think it is applied only in SP2 . Is that right ?)
Is there any solution for doing that.
Mess With The Best And Die Like The Rest
|
|
|
|
|
Possibly because the Firewall didn't show up until XP SP2 came out?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
how can i get an output of an mainframe console?
|
|
|
|
|
That depends entirely upon what your using to do the terminal emulation.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i want to hava a windows that will only show the reply that are open on a console and can answer that reply.
|
|
|
|
|
Since you didn't really answer my question, I can take an educated guess and say that you don't have a terminal emulation package, library, or control, whatever...
Without that, you're not talking to the mainframe. You either need to write one, which will probably take a considerable amount of time, or you need to start searching for a terminal emulation library.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|