|
Here is what I have, I want to display in a new window or in the same form (on the right hand side) after a item in a listbox (which is located on the top-left side)is clicked.
How do I go about doing this?
Thanks.
|
|
|
|
|
Leverage the Click event for the list box. In the event code, you can grab the item selected, and act upon it.
Use the ListBox.SelectedValue property to decide what was clicked. (assuming you limit your box to a single selection)
Hogan
|
|
|
|
|
Like snorkie said, you have to have a button that on the click it goes to the new form and passes the selected value from the listbox to the new form.
To prevent global variable ugliness, pass the selected value as a parameter in the constructor of the new form.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I am using WSE 3.0 to create a TCP web service.
Everything was working fine until I referenced some classes from a separate dll.
The proxy class generates fine and includes the classes from the separate dll.
The problem is when the client calls the webservice with a calls that results in using
classes from the separate dll the client throws an exception saying that I am using
an object from an unreferenced dll.
How to you reference this dll to make the client happy?
|
|
|
|
|
Your client is probably receiving the message error from the server. So, I believe the solution is not in changing the client.
Try to copy the DLL to the BIN folder in your WebService and see if it works.
Charles.
|
|
|
|
|
Thanks for your reply.
It turns out that the problem was related to two different sets of similar classes.
The code was using some objects from one set of classes and some from the other.
The generated proxy code was all messed up thus confusing the client.
Once we removed the duplicate (proof of concept) set of classes everything worked as expected.
|
|
|
|
|
Hello,
I'm having a trouble with the 2.0 Framework method FTP.ListDirectory.
I'm writing an application which creates a file by executing an http command, then verify if the file exists on the server and downloads it. The problem is that the list of files returned by Ftp.ListDirectory doesn't change even if the file is created(I can see it with a graphical FTP client).
Sometimes it works and I get the list of all files. But it seems to me if I make many consecutive requests, the files list isn't refreshed any more as if it was stored in a cache....
Can you help me to fix it?
Thanks.
|
|
|
|
|
Are these files hidden or system files?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
thanks for replying.
The directory listed by the code has only .zip files. I even can see them in my graphical FTP client. So my answer is no, files aren't hidden.
|
|
|
|
|
Hi,
I think the I have the answer to this post. I'm not really sure but so far I've done many consecutive tests and the results of the response always changes if new files are created.
It's about the cache policy and this is the way to set it.
System.Net.FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create(param);
request.CachePolicy = new System.Net.Cache.RequestCachePolicy =(System.Net.Cache.RequestCacheLevel.NoCacheNoStore);
|
|
|
|
|
hi all,
i have a treeview in this i have three treenode(A,B,C) and i have some child nodes in these three treenodes .Now , i want to set some image with the childnodes of third treenode(C).i m not finding a way how to do it .
If anyone know , please tell me .
thanx
Praveen Sharma
|
|
|
|
|
Have you considered:
treeview.ImageList
treeview.StateImageList
treeNode.ImageIndex
treeNode.SelectedImageIndex
treeNode.StateImageIndex
|
|
|
|
|
hi
i have a problem , with a picturebox
i set the path of the image proberty of picturebox
how can i get this path from picturebox
thnx 4 help
|
|
|
|
|
|
Hi,
if you got the picture loaded by calling the Load() method, or by setting
the ImageLocation property, then you can get the image path by getting
the ImageLocation property.
if you got the picturebox showing an arbitrary image, the picturebox can not
possibly tell you were on disk the image is stored (it does not even have to
be on disk, it could well be a synthetic image).
|
|
|
|
|
Hi,
In my windows application I need to display MonthCalendar control with some selected dates/BoldedDates.
I am using the property "Bolded Dates" to add selected/some dates. But those dates are displayed in "BOLD".
But I need to display with different background color (like selected).
How can I display the "Bolded Dates" in different Background color?
Thank you
Ramesh
|
|
|
|
|
Maybe the control does not support that. What does the documentation say? Is there an "owner draw" feature?
|
|
|
|
|
Hi,
Thank you for the reply,
I gone through the MSDN 2003 about the MontheCalendar control there is no OnOwnerDraw method.
Is there any other control that can Matches my needs?
Thank you.
Ramesh
|
|
|
|
|
I need to use ffmpeg encoder in asp.net c#, but I cannot run by asp.net by itself. I'm new on this. Can somebody guide, or help me to create a wrapper or anyway that I can access frmpeg from asp.net c#.
Rafael
rafaeltejera@hotmail.com
Rafael Tejera
|
|
|
|
|
Can anybody shed some light. I'm a bit confused. Still a noob at C#. I read that Global variables are not supported in C# yet it seems to work for. They recommend you use struct instead but I can't seem to get it to work for me. I'm having a hard time understanding to program a string that can be accessed by any function without having to pass the String contents to the function. Basiccaly I need to access some strings globally. Any suggestions?
|
|
|
|
|
Make the strings static members of a class (eg: StringHolder ) and refer to them from any class in the following manner:
public class StringHolder
{
public static readonly string SomeString = "hello";
}
public class ReferringClass
{
void someMethod()
{
string foo = StringHolder.SomeString.Reverse();
} /ravi
|
|
|
|
|
There are global variables in C#.
Just create them outside the functions.
For instance:
public class Circle
{
double radius = 0.0;
double pi = 3.14;
public Circle(double Radius)
{
radius = Radius;
}
public double Area()
{
return pi*Math.Pow(radius, 2);
}
}
Best regards!
Larantz
|
|
|
|
|
Larantz wrote: There are global variables in C#.
Just create them outside the functions.
They are not global. They are members of the class.
---
single minded; short sighted; long gone;
|
|
|
|
|
Yes I know that works. I been programming that way all along but I just upgraded to Vista and downloaded the latest C# version. One of the note I read claimed it does not support it so I'm weary programming that way in xase it sops working in the future.
See this link
http://tinyurl.com/29o64p
http://tinyurl.com/29o64p[^]
|
|
|
|
|
Hi,
I am very new to c#. I have created a com object in c# and am using it from vba. it is working fine since until now i only needed to pass variables from vba to c#. I would like to pass a function pointer so that c# can callback a function in vba. any idea if this is possible?
thanks
|
|
|
|