|
foreach looks fine
your other question isn't clear. Are you asking why it isn't replacing the text in the text box? use rich.Text = skupaj; to do that.
|
|
|
|
|
richbox works fine now.. how should look in this forreach code for getting indexes for imagelist..can someone edit it plz
private void button2_Click(object sender, EventArgs e)
{
foreach (System.Windows.Forms.ListViewItem eachItem in
this.listView1.SelectedItems)
{
this.listView1.Items.Remove(eachItem);
this.imageList1.Images.RemoveAt(-->INDEX?<--);
}
|
|
|
|
|
Asked and answered.
I think I've helped you enough for one day. It's time for you to help yourself.
|
|
|
|
|
eachitem.index doesn't work..tryed also eachitem.imageindex..also error..about that tag option idk how to use it..
|
|
|
|
|
|
Good People,
Greetings.
I am trying to figure out which casting method I should use for my application.
1)
double average = (double)value;
or
2)
double average = value as double;
I thought that since objects of type "double" are not nullable; the cast would throw an exception if "as" returned null. What do you think?
Thanks for any advice or information you can provide.
Blitz
|
|
|
|
|
Surely this won't compile???
double average = value as double;
If value could be null, and you need a double you can do the following:
double = (double?)value ?? 0d;
Replacing 0 with your prefered default.
10110011001111101010101000001000001101001010001010100000100000101000001000111100010110001011001011
|
|
|
|
|
Neither. TryParse is a much better way to do this (and it works on types such as int, bool, etc).
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
|
Should be a double coming in.
Thanks,
Blitz
|
|
|
|
|
Then why are you trying to cast at all?
|
|
|
|
|
Attaching to a service "Unable to attach to the process. A debugger is already attached"...
how do i know which debugger is assigned
|
|
|
|
|
I have same error when i try to debug silverlight3 application in VS2008 this app have test html page in another project in solution.
in debugger options i have enabled native code ane not enable script debugging
Pleas can someone help me?
|
|
|
|
|
hi i want to connect to SFTP Server using SSH Channel and list files on remote directory, upload file and download file.
I am not an expert in this area, please let me know how to achieve my targe using this code.
|
|
|
|
|
I have a problem with windows services in C#. I have a windows service developed by a programmer already and its been installed. The programmer has deleted the source code, so i don't have any source code for it... my client wants me to make changes to the service for which i can find the exe only. I was able to find the .net reflecter and i can look at the code and understand it... Now in order to make changes, wat do i have to do... as its a service, i need to run it and then somehow connect to it. To connect to the service , do i need the source code or when i connect the code will be generated automatically... also, if i have to generate the code then the fact that the decompiled code is different from the original source can make a problems or not... decompiled code would have compiler generated code , what will i do with that
Plz provide help in this regard
if i am asking this question at a wrong place, lemme know the correct forum and i will copy it over there
|
|
|
|
|
I've never had to do what you're asking before but here's what I'd do:
1. refuse to work on it unless the original developer is fired for deleting the source.
2. use reflector to decompile it.
3. load up the source in VS. you might have to make a new project and then manually merge in the decompiled code.
4. make whatever changes are required to the source and rebuild.
5. add the code into some form of source control repository.
6. give the new executable to the client.
You don't have to run the service and connect into it to change it. I don't even know what that means. After you've rebuilt the service all you have to do is stop the instance that's running on the clients computer, overwrite the existing executable file with your new one and restart the service.
Decompiling the executable won't change the behavior of the program so modifying it and recompiling should be ok. Working with the decompiled source code may be more difficult than working with the original but if the original developer was ignorant enough to delete it in the first place then the decompiled version might be an improvement.
Good Luck.
|
|
|
|
|
oh thanx for replying...actually , by running the service and connecting to it , i meant that is there anyway that i can communicate with the exe without the source... but still i need the source to do changes into it... i am confused.... I can't attach a process to a service until i have the source right? what if the source is a bit older version and is missing classes... wat do i do then...
again thanx for replying
best regards...
|
|
|
|
|
mark_me wrote: communicate with the exe without the source
mark_me wrote: attach a process to a service until i have the source
Huh?
To communicate with the service once it's running you'll need some other program that was built to communicate with it. If you want to know how to communicate with it then you'll have to ask the original developer or you could look in the source and see what it's built to do.
You build and deploy services just like any other program. You edit the source code and rebuild it which produces a new executable file. It has absolutely nothing to do with "attaching processes" or "communicating with exes".
When you decompile an executable that gives you the ALL of source for that executable; there's no way for it to leave things out. The decompiled version is probably different from the original source but there's really no way that you would know that unless you have the original source to compare it to which would alleviate most of your problems.
|
|
|
|
|
|
I have a setup for it... any way, in which i can get the code back from there...
thanx
|
|
|
|
|
When the the user clicks on the submit button I want that information submitted to my database. It writes just fine until I try to display a Confirmation page then it will not write anything to the database. How do I write to the database and also display a Conformation Page?
Shane
|
|
|
|
|
make sure you are redirecting to the conformation page after you write to the database. not before.
|
|
|
|
|
I'm trying to build this application that looks at a folder and displays new pictures. I got that to work flawlessly, but there is one more part that is having more issues. The camera that I want to watch gets recognized as just that - a camera (or scanner). Thus, I can't tell my app to watch it, creating a useless application.
I've poked around a bit, but to no avail. Perhaps somebody can shed some light on this.
|
|
|
|
|
You may want to Google for "windows image acquisition[^]". Why look in a folder when you can get the image directly from the camera. Maybe... it depends on if your camera supports it or not.
|
|
|
|
|
I have imagelist with few images. How to get fileinfo of image with specific index?
Second thing is how to show string in listview as item..cause this doesn't work..
for (int j = 0; j < this.imageList1.Images.Count; j++)
{
ListViewItem item = new ListViewItem();
this.listView1.Items.Add(imena[j]);
}
imena is string array defiend as string[] imena=new string[10]..
|
|
|
|