|
dnh wrote: if you make new thread they will never recieve it
Good point.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Hi Pascal,
You're welcome!
Regards
"You don't scare me Selene."-Tanis
"We'll have to work on that."-Selene
(Underworld Evolution)
|
|
|
|
|
Does anyone know how to declare Manifest Files in the Visual Studio IDE for C#?
I followed the steps outlined here for including a manifest file:
http://support.microsoft.com/kb/944276
The executable runs from the command line after I include the manifest file. But when I open up the debugger and try to run the program through the IDE, it has the same problem as if it does not recognize the manifest file linked to it.
The way I link the manifest file to the executable is by first building the executable and then I close the project. Then I open the executable as a separate file and then I attach the manifest file as a resource to the executable.
The executable can run then, by running it from an explorer window (command line) but if I open the project again, it will not work.
I will see if I can find how this is supposed to work.
|
|
|
|
|
Thank you for your help! I try what you suggest me and its correct!! Thank you again! I try now for opening a file but it give me an error with this : File.OpenFile "C:Program Files\Microsoft Office\OFFICE11\Excel.exe";
I don't understand why??? Don't be worried, its the last thing that i will you ask!!!
Thank you, you're cool!!
Pascal Gosselin
|
|
|
|
|
Try using a filestream, and pass it the path to the file you want to open, as well as the filemode:
FileStream FS = new FileStream(@"c:\program files\microsoft office\office11\excel.exe", FileMode.Open);
Then you can read the bytes in the file.
If you where though perhaps looking for how to execute this file, then you need:
Process.Start(@"c:\program files\microsoft office\office11\excel.exe");
Process.Start will 'run' any file. If you pass it a .txt file it will open it in the associated application (probably Notepad). And if you pass it a web address it will open the page in your default browser.
My current favourite word is: Nipple!
-SK Genius
|
|
|
|
|
pascalx wrote: Thank you again! I try now for opening a file but it give me an error with this : File.OpenFile
I am assuming you mean File.Open() , there is no File.OpenFile. And that will open the file for read, not start the program. You are looking for Process.Start() . Take a look around codeproject, there are tons of examples here on it!
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
I need to display a running total as a user enters percent numbers.
The first on is in a gridview like this
CheckBox Item 1 [ percent]
CheckBox Item 2 [ percent]
.
.
CheckBox Item 12 [ percent]
Footer Show total percent as users enters [ Total Percent]
The next percents in a nested repeater that is dependant on the checkboxex from the gridview, I would like to get past the gridview first.
thanks for any help
|
|
|
|
|
You should be a little more clear. Im not sure about everyone else, but that doesn't make much sense to me.
allenpotter wrote: The next percents in a nested repeater that is dependant on the checkboxex from the gridview, I would like to get past the gridview first.
What does that mean? Be more clear on what you need help with, I'd love to help you out, I just don't understand what you are trying to do.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
I have nested repeaters that display the items checked from the gridview and expand them further--as I stated, I just want to get past the gridview--adding the percent and displaying it as a user put them in.
|
|
|
|
|
Hello I don't speak english very well but i would like to open a web page from Visual Studio 2005 with C# language. Is it possible to do this with a method because i find nothing about it.
Thank a lot!
Pascal Gosselin
|
|
|
|
|
Hi Pascal,
Maybe try this:
System.Diagnostics.Process.Start("http://www.website.com");
Regards
Steve
Web design and hosting
http://www.kayess.com.au
|
|
|
|
|
What is the most efficient way to remove controls completely on a form before adding new controls on the same form. I tried like
Controls.Clear
foreach(Control c in Controls)
{
c.dispose();
}
|
|
|
|
|
Clear is the fastest way I'm aware of.
|
|
|
|
|
I think perhaps Clear will remove the controls from the list of controls associated with the control
And that dispose will actually, well, dispose of them.
Im not to sure, if you .dispose a control, can you re-add it? Or do you need to actually recreate the control? Check it out.
My current favourite word is: Nipple!
-SK Genius
|
|
|
|
|
SK Genius wrote: I think perhaps Clear will remove the controls from the list of controls associated with the control
And that dispose will actually, well, dispose of them.
I agree.
SK Genius wrote: if you .dispose a control, can you re-add it?
no, it is no longer alive.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hi All,
I am using a ListView Control to display clients connected to a server. The ListView is set to View.Details and has three columns, 1) Client ID, 2) Client Name 3) Connection Status.
What I would like to do is update the 'Connection Status' SubItem to display whether they are connected or disconnected. Can anyone shed any light, thanks.
Regards
Web design and hosting
http://www.kayess.com.au
|
|
|
|
|
You need to work with the SubItems[^] property of a ListViewItem object.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Sorry, still can't see how I can do it.
Web design and hosting
http://www.kayess.com.au
|
|
|
|
|
Here is what I am trying to do, from what I've read:
string search = "x1";
string status = (ConnectionStatus) ? "Connected" : "Disconnected";
int i_row = myListView.Items.IndexOfKey(search);
myListView.SelectedItems[i_row].SubItems[3].Text = status;
However the i_row value returned is always -1
Web design and hosting
http://www.kayess.com.au
|
|
|
|
|
Kayess Tech,
Does your ListView.Items have an item called "x1"?
Regards,
Gareth.
|
|
|
|
|
Yes, I have updated from my previous post the ListView items
look like this
Col 1, Row 1 = Client ID (eg 23)
Col 2, Row 1 = Client Name (eg Steve)
Col 3, Row 1 = Connection Status (Connected / Disconnected) This is the subitem I want to change programatically.
Col 4, Row 1 = Identifier (in this case 'x1')
The next Row Identifier would be x2 and so on...
Thanks
"You don't scare me Selene."-Tanis
"We'll have to work on that."-Selene
(Underworld Evolution)
|
|
|
|
|
It appears your searching your List View Items instead of each item's SubItem.
Try something along the lines of this.
int i_row;
string search = "x1";
string status = (ConnectionStatus) ? "Connected" : "Disconnected";
for (int i = 0; i < myListView.Items.Count; i++)
{
if (!(myListView.Items[i].SubItems.IndexOfKey(search) == -1))
{
i_row = i;
myListView.Items[i].SubItems[3].Text = status;
break;
}
}
modified on Friday, January 18, 2008 5:53:11 AM
|
|
|
|
|
Hi,
Thanks, but that didn't work either. However I did find a solution
string search = "x1";
string status = (ConnectionStatus) ? "Connected" : "Disconnected";
for (int i = 0; i < myListView.Items.Count; i++) {
{
ListViewItem item = myListView.Items;
if(item.SubItems[4] == search)
items.SubItems[3].Text = status
}
Thanks all for your suggestions.
"You don't scare me Selene."-Tanis
"We'll have to work on that."-Selene
(Underworld Evolution)
|
|
|
|
|
Hi
I am writing a small network protocol library for an internal project and I got one question I have been wondering whether is possible or not.
Lets assume I have a button for starting the network service (or heavy file IO for that matter) with a .start() method. Now, the object representing the service should just start and run in the background (threading), but at certain points it should signal events (delegates). How can I make sure these delegates are run NOT in the background thread, but in the same thread as started the service with the .start() method? I know I inside the callback can run BeginInvoke after the delegate has been signaled, but I was wondering if there was a more transparent solution where the initiator dont have to even bother to handle the thread issue? It would be so sweet if the delegate automatically was run within the main thread.
Any ideas?
These concurrency issues are my last huge obstacle to overcome before I consider myself confident with the .NET framework and C#, so I would be eternal grateful for any hints on this topic. Thanks a lot
|
|
|
|
|
Hi,
when you're done counting bit patterns, here is an article[^] that should interest you.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|