|
Hi,
there is a little Search box higher up on this page; did you ever try it ?
there also is MSDN documentation.
There are thousands of books on programming in general and on C# specifically.
And finally there is Google.
|
|
|
|
|
Hi!
Are you trying to specify its text? When activating the style DropDownList you have to set it by using the index of items existing in your combobox.
|
|
|
|
|
Hello,
I just want to specify the text and value in combo box
Regards,
rahul saini
|
|
|
|
|
comboBox1.Items.Add("hello"); // new value
|
|
|
|
|
Thnks for help,
But i want to add its value also
How to do that?
Regards,
rahul saini
|
|
|
|
|
a combobox holds and shows a list of strings, no more, no less.
|
|
|
|
|
Sorry, my previous message is wrong and Chintan.Desai is correct:
ComboBox can be loaded from a DataSource which can handle both a DisplayMember
and a ValueMember as the help on ListControl.DataSource explains.
|
|
|
|
|
Hey,
Try this link.As combo box gives property to assign the display string called as "Display member" and also help to stores its hidden values called as "Value Member" at each index.
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/CPref17/html/P_System_Windows_Forms_ListControl_DisplayMember.htm#codeExampleToggle
nJoy.
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
Hi guys! My first post here is ofcourse a little problem of mine! =) ive been looking pretty mutch everywhere, asking my proffesor and such, and we cant figure this out at all. I even analyzed the network trafic with Wireshark to see what was going on. No luck. So now im turning to you hardcore guys here at The Code Project
Well to the problem. Im doing a really, REALLY simple chat client. (intending to control the mouse over ethernet). Where everything stops is when im trying to connect to the server.
On the client machine im running Vista using standard IPv6, and the Server im running XP Pro with IPv6. When launching the code below i can see from the network analyzing that it is actully sending packets and reciving to and from the server machine.
Then it gives me the most odd explenation ever.
"No connection could be made because the target machine activley refused it".
Ive tried to open up the network as mutch as possible to do a trial and error thing, but still no luck.
I dont even need to have my server app up and running. it still gives me the same message.
This is the Client code:
public void RunClient()
{
try
{
Client = new TcpClient();
Client.Connect("192.168.1.33", 50000);
outputStream = Client.GetStream();
Writer = new BinaryWriter(outputStream);
}
catch (Exception e) { MessageBox.Show(e.Message); }
}
}
This is the servercode:
private void RunServer()
{
TcpListener listener;
try
{
IPAddress local = IPAddress.Parse("127.0.0.1");
listener = new TcpListener(local, 50000);
listener.Start();
while (true)
{
Connection = listener.AcceptSocket();
MessageBox.Show("Someone got connected."); ...
The servercode doesnt even reach the MessageBox.Show code. Seems like it is something external that is keeping the connection away. Anyone have any idea or could kick me in the right direction?
Thanks in advance for occupying your time =)
|
|
|
|
|
127.0.0.1 is localhost in IPv4; where is the IPv6 stuff ?
BTW dont show Exception.Message, show Exception.ToString() instead; it will show
much more information.
-- modified at 9:01 Thursday 21st June, 2007
|
|
|
|
|
That message from the exception didnt say anything interesting.. just that the connection where resetted.
and yes? 127.0.0.1 is localhost.. ? =)
|
|
|
|
|
uhm, never really thought it that way.. humm.. ill try it out! btw, can i define in your sockets what version of IP to use?
|
|
|
|
|
I dont know, I have no experience with IPv6; it is what got my attention
in your post ...
Are you using a Firewall that might block port 50000 ?
Did you try server and client on the same machine ?
|
|
|
|
|
Server and Client on a local machine worked perfect.
And yup, i opend up every single firewall between the computers. Even rebooted the machines so they didnt end up having old settings on.
no luck. no luck with IPv6 either.
|
|
|
|
|
Hi,
Is there any way to retreive domain username and password of a logged in user programatically.Please let me know if you have any suggestions
Prajin
|
|
|
|
|
You can't retrive the password ... that would be one hell of a security hole! Just imagine anything you had running on your computer being able to get your password and send it back to the author.
As for the username, check out the System.Environment class.
|
|
|
|
|
You can retreive the User name only. We cannot get the Password.
check out the System.Environment class. System.Environment[^]
Regards,
Satips.
|
|
|
|
|
ooo new colour on your name?
|
|
|
|
|
Hi, all, I'm experiencing an annoying issue with the graphical editor of VS 2005. I've created a control from UserControl. Now I want to derive a few specialized controls from the first one, so I did ADD->NEW ITEM->INHERITED USER CONTROL and selected my previous class.
The problem is that some of the inherited controls behave strange: a groupbox is automatically set to a width of an (apparently) random value (sometimes up to 7000px). Some of the controls I add in the derived classes appear to be unable to anchor or resize properly to inherited panels and so on.
Someone knows why does all this happen and how to avoid this?
Thank you!
|
|
|
|
|
Hi.
I'm trying to verify a X509 Certificate. In order to do this, I need
to get the public key, Hash & Signature stored in a X509 certificate.
I am able to get the Public Key & then the exponent & modulus.
I believe that the hash is just the "thumbprint" of the certificate.
However, I am at a total loss as to which field is the Signature? Any
ideas?
Thanks for your help.
supraja
|
|
|
|
|
Hello Programmers!
I might totally have the wrong end of the stick with this one, but any help would be great as im getting a bit lost! im attempting to create a user interface based on an XML file using C# and Expression Blend. this might be the wrong forum for this, if so, please let me know
right, so i have the following XML file set up like so :-
<portfolio>
−
<portfolioItem id="1" name="full name" featuredItem="true">
<summaryDescription>summary description here </summaryDescription>
−
<fullDescription>
Complete Description Here
</fullDescription>
−
<websiteAddress>
siteaddress1
</websiteAddress>
<fullSizeImage>location1</fullSizeImage>
<thumbnailImage>location1</thumbnailImage>
−
<detailImages>
<image>location1</image>
<image>location2</image>
<image>location3</image>
<image>location4</image>
<image>location5</image>
<image>location6</image>
<image>location7</image>
<image>location8</image>
</detailImages>
</portfolioItem>
−
<portfolioItem id="2" name="full name" featuredItem="true">
<summaryDescription>summary description here </summaryDescription>
−
<fullDescription>
Complete Description Here
</fullDescription>
−
<websiteAddress>
siteaddress1
</websiteAddress>
<fullSizeImage>location1</fullSizeImage>
<thumbnailImage>location1</thumbnailImage>
−
<detailImages>
<image>location1</image>
<image>location2</image>
<image>location3</image>
<image>location4</image>
<image>location5</image>
<image>location6</image>
<image>location7</image>
<image>location8</image>
</detailImages>
</portfolioItem>
(total number will be dynamic)
so, in blend i have binded the name and description (for now) to textBlocks, and, it shows the first item in the list when built.
now then, can i configure a button (with c# code) to cycle through the items and display the relevent details on a single window? will i need to create a class in the code behind file and load the data in or does this XML format allow direct access?
any help would be great and thank you for your time ladies and gents
Kris
|
|
|
|
|
|
Because coding outside means getting wet :P
(well it does in this country anyway)
|
|
|
|
|
can you explain
i m new to this
|
|
|
|
|
One of the definitions of Property is:
a piece of land or real estate
I gave a reply in the manor the question was asked which was; lacking context and with minimal effort spent.
In simple terms, when asking a question try to give as much detail as you can and put a bit of effort into it to show that you have atleast tried to find the answer on google or whatever your favorite search engine is.
|
|
|
|