|
Pardon me for saying so, but it sounds to me like you are in way over your head. You are simply writing code without any understanding of what it means. I suggest you slow down, read and understand the documentation. Then think about how each object works and how you can manipulate it to accomplish your goal. If you do that, you will quickly see the answer to your question. Getting fast answers on the web is not going to help you in the long run.
I am not trying to insult you and hope you see that. I am only trying to give you good advice.
Marshall
If you continue to do the same things you always did, don't be surprised if you get the same results you always got.
|
|
|
|
|
Yes, I understand, and I know a bit more than how I seem, though I'm undoubtably a beginner.THat was a stupid question if I could use more than one...
The most knowledge doesn't mean the most wise...
|
|
|
|
|
hi all,
I have customized listview to display images in thumbnail view as in windows explorer.
I have set ownerdraw property as true and used the drawitem event of listview to redraw the listview.
Now when i click any item in the listview, the selectedindexchange event is fired twice.
Why is the event firing twice? What could be the problem?
Any suggestions please.
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
Without any code it's really impossible to tell. But chances are it's not related to your custom draw code. I would guess that it's related to your code that hooks up the SelectedIndexChanged event. Unless you explicitly firing that event in your custom ListView control.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Hi, some Controls with selection capabilities fire twice: once when they unselect the
existing selection, and again when they apply the new selection. Check the EventArgs
to get the details, and you will know whether it is this phenomenon, rather than
the exactly same event firing twice.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hi,
I have found one solution which seems to be working fine. but still i would like to have a better and liable solution. in the selectedindexchange event i wrote the following code.
private void listView1_SelectedIndexChanged(object sender, EventArgs e)
{
if (listView1.SelectedItems.Count > 0)
MessageBox.Show("Clicked");
}
is this solution right?
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
I've made my app to minimize in tray. When a user is trying to open another app , I want to show the running instance from tray.
I tried to do that by using ShowWindow function, but I didn't succeeded. When my app is not in tray (for example, is behind another window), when I try to open another instance , the main window is shown, as I want.
What ca I do, to make the same thing when is in tray.
-- modified at 10:16 Friday 19th October, 2007
|
|
|
|
|
I've used this[^] in an application to handle the single instance stuff, and it works really nicely
You'll probably need to do something like this to pop your window back to life:
Show()
WindowState = FormWindowState.Normal;
TopMost = true;
BringToFront();
TopMost = false;
I'm not sure why, but BringToFront() on its own sometimes doesn't do the trick. I don't know if Windows is trying to prevent the window stealing focus from you, or something.
|
|
|
|
|
I am doing the following:
When application start running , I'm verifying if another instance is running. If there is another instance I'm showing it. But if is in tray, I can't show it. When I put my app in tray I hide it.
I've thought doing what you've said but I can't get the object to manipulate the window, when I need to, or i don't know how.
-- modified at 10:39 Friday 19th October, 2007
|
|
|
|
|
The singleton stuff in that article takes care of communicating with the existing instance - see the
OnAppStartupNextInstance bit - that's where your old window gets re-activated
|
|
|
|
|
Ok, I got it .
Thank you for helping me!
|
|
|
|
|
benjymous wrote: BringToFront()
Scary, because that function controls z-order....
xacc.ide
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|
|
I have a number of FxCop rule assemblies. I need to get all the names of the rules in these assemblies, and as far as I understand i could do this by using reflection on the assembly and getting the XML files.
So my question is: Is it possible, and if so, how do I retrieve an embedded XML file from an assembly?
fafafa, ringakta icke sådant som bringa ack så naggande högönsklig välmåga å baronens ära.
|
|
|
|
|
nvm i solved my own problem ^^
foreach (string str in ASSEMBLY.GetManifestResourceNames())
{
using (StreamReader SR = new StreamReader(ASSEMBLY.GetManifestResourceStream(str)))
{
Console.WriteLine(SR.ReadToEnd());
}
}
fafafa, ringakta icke sådant som bringa ack så naggande högönsklig välmåga å baronens ära.
|
|
|
|
|
hi,
i want make a tree like this
........................... A
.........................B..C..D
.......................E..F.....G
........................I.........H
A=>B,C,D
B=>E,F
C=>F
D=>G
G=>H
E=>I
F=>I
PLEASE GUIDE ME
I AM WORKING ON "PLOTTER ROBOT"(FYP).
|
|
|
|
|
zeeShan anSari wrote:
PLEASE GUIDE ME
erm... how exactly should we guide you. You've not even nearly provided enough information for a code-related answer.
|
|
|
|
|
strat with treeView control and then TreeNode Editor .i am confuse that how two nodes link same node.
like
....A B
/ /
.. C
I AM WORKING ON "PLOTTER ROBOT"(FYP).
|
|
|
|
|
zeeShan anSari wrote: i am confuse that how two nodes link same node.
They dont. TreeView nodes have only one possible parent node.
To accomplish this you will need to start from the very beginning and create your very own control. And before you ask, no, I don't have the entire working code for such a control.
|
|
|
|
|
it is a java code
addNode("0", 0.0f, 0.0f);
addNode("1", 1.0f, 1.0f);
addNode("2", 5.0f, 2.0f);
addNode("3", 2.0f, 5.0f);
addNode("4", 7.0f,5.0f);
addNode("5", 8.0f, 8.0f);
addNode("6", 10.0f, 5.0f);
addNode("7", 8.0f,2.0f);
addNode("8", 12.0f, 8.0f);
addNode("9", 13.0f, 5.0f);
addLink(0,1);
addLink(1,2);
addLink(2,3);
addLink(2,4);
addLink(4,5);
addLink(4,6);
addLink(6,8);
addLink(8,9);
addLink(2,7);
addLink(7,9);
is it possible in C#
I AM WORKING ON "PLOTTER ROBOT"(FYP).
|
|
|
|
|
how to add a "Web UserControl" in Class Library project ?
when i select Add --> New Item ,
it don't have a Web UserControl item !
|
|
|
|
|
Add a new class. Inherit from System.Web.UI.UserControl. Make sure the project has a reference to the dll.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
I need to consume a web servcie but when i try to access it through my code or through command prompt for generating proxy classes it gives me error
underlying connection was closed : unable to connect to remote server
If i send the same soaprequst to online webservice thorugh altove then i get the successful response back.
|
|
|
|
|
That normally means the host could not be found or the port could not be connected. Make sure you have the hostname and port correct.
xacc.ide
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|
|
yeah i have checked that many times that hostname and port are correct but i am still unable to connect through code.
|
|
|
|
|
Weird indeed. Can you connect via Visual Studio?
xacc.ide
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|