|
Hallo,
Can anyone help me. I have a treeview with several nodes in it.
On update I remove nodes that should not be in the tree anymore and add new ones.
I delete with '_TreeView.Nodes.RemoveAt(nodeToRemove);'
When I do this the bounds of an other node which is still in the list are changed
to negative values, so it is not displayed anymore. The treeview seems to be "empty" even
if there are still elements in the nodes list.
Is there anything I do wrong or a way I can make the node visible again?
(a thing that most times work is several expands and collapses on this invisible node,
but this costs on one hand a lot of time and on the other hand does not work always)
Any suggestions?
Thank U very much!
Desertstar
|
|
|
|
|
Hi everyone,
I have a WinXP test system with MSMQ running in Workgroup mode and with the IIS component installed for HTTP messages. I'm writing a .NETCF2.0 app for PocketPC 2003 devices which needs to send messages to a queue on the XP system. This has to be done via HTTP, since our GPRS wireless connection filters other ports. I've put MSMQ into Workgroup mode because the PPC2003 units aren't logging in to the AD.
I have a private queue set up on the XP machine. I have a .NET desktop app running monitoring the queue. As I understand things, HTTP queues cannot be read from (only sent to). So, when the test app is reading from the queue, it uses a standard MACHINENAME\private$\queueName path. When it sends a test message, it switches this to a FORMATNAME:DIRECT=HTTP://MACHINENAME/msmq/private$/queueName path.
It looks like messages are sent OK from this test app via the HTTP path, as they appear next time the grid refreshes.
However, no matter what I've tried, the PocketPC app (using the same DIRECT=HTTP....etc. path) cannot send a message. The error is: "The queue does not exist or you do not have sufficient permissions to perform the operation."
A few things I've tried:
- Ensured that binary and srmp are enabled using visadm.exe on the
device
- Verified that the device can see the XP machine's IIS instance and
access pages via Pocket IE
- Used both hostname and IP address in the queue path URL.
Cheers,
Chris
|
|
|
|
|
In the good old days I'd do something like this
#ifdef DEBUG
// Bunch of debug only code
...
#endif
To be more specific, I have some debug spew that uses the System.Threading assembly. How would I exclude this in the debug case?
using System.Threading;
Also, I am using System.Diagnostics.Debug.WriteLine. Is it safe to assume that these calls be removed from my final assembly?
|
|
|
|
|
|
|
Like this:
#if DEBUG
Console.WriteLine("Debug version");
#endif
From what I can see in MSDN, the calls to Debug methods are not included in the release build (while calls to Trace methods are):
"If you use methods in the Debug class to print debugging information and check your logic with assertions, you can make your code more robust without impacting the performance and code size of your shipping product.
In Visual Studio 2005 projects, creating a debug build enables Debug . For information on how to disable Debug , see the Visual Studio 2005 documentation.
In contrast, in Visual Studio 2005 projects, Trace is enabled by default for both release and debug builds, so code is generated for all trace methods in both release and debug builds. Therefore, you can use Trace to instrument release builds."
---
b { font-weight: normal; }
|
|
|
|
|
You should check out the ConditionalAttribute[^], which allows you to cleanly separate conditionally compiled code from the regular code.
Josh
|
|
|
|
|
Hmm never heard of this before. Have you used it? What concerns me is two things: 1. You can't use an attribute in the middle of a code block for stuff like writing to console only during debug and 2. VS will automatically hide a section of code depending on what's defined for the current configuration. Does this work with the attribute as well?
Logifusion[^]
|
|
|
|
|
Dustin Metzgar wrote: 1. You can't use an attribute in the middle of a code block for stuff like writing to console only during debug
That's the whole point. The attribute allows you to remove debug-only (or whatever-only) code from your "real" code. Since I started using it, I almost never use preprocessor directives anymore because it is just so much cleaner to factor the test/debug code out.
Dustin Metzgar wrote: 2. VS will automatically hide a section of code depending on what's defined for the current configuration. Does this work with the attribute as well?
No, but if you put all of your Conditional methods in one #region, or in a partial class extension, you'll have the same effect.
Josh
|
|
|
|
|
I have a project that I'm trying to finish and I need help writing the volume 3.1416(r2xhx3.1416) can some one help.
thanks
wanda
|
|
|
|
|
School assignment?
What specifically is it that you need help with?
---
b { font-weight: normal; }
|
|
|
|
|
I am doing an application which is using remote invocation, with Invokemethod. When I invoke a method from a remote class, it gives me the exception TargetInvocationException. how can I find out what exception threw the remote class? I mention that I step into the code for the remote class, but there is no exception thrown when step through the method invoked. Also, I tried searching Google , CodeProject and MSDN, but with no success whatsoever.
Can anyone help me please?
|
|
|
|
|
ok. that was stupid for me. Just check the InnerException method. But now I have another problem encountered. When I do an InvokeMethod on a method which returns string[], everything's OK. But, when I InvokeMethod the same method, only this time returning Type[] (for example) , it gives me a TargetInvocationException. Can pls someone point me to some place where I can read all I need in order to understand about these kind of issues?
|
|
|
|
|
kreaThor wrote: Can pls someone point me to some place where I can read all I need in order to understand about these kind of issues?
That silver bullet does not exist. Welcome to the jungle.
josh
|
|
|
|
|
hi to all
I want to create my own popup menu in InternetExplorer
can anyone help me
|
|
|
|
|
|
What is the best way to read values from other Third Party Applications (textboxes, combo boxes) using .Net? Any Ideas? Can you point me in the right direction?
Thanks in advance
Mike Lasseter
|
|
|
|
|
Hi EveryOne,
In VC.net programming I placed a TxtBox On the Form.
IN this TxtBox I entered Something and when i press 'Enter' From KeyBoard Some Function May be Called.But I didN't find any Function In the properties of TxtBox Methods.
I find for TAB ie txt_leave,but Not For Enter.
If any Method Directly Exists Kindly
send me
|
|
|
|
|
|
Hello
I have a VC application (EXE) and i want to convert it to a Web Application
how can it be done in Dot net?
regards
Shailesh
|
|
|
|
|
If this app your talking about is a Windows Forms app, then you'll have to rewrite it from scratch. There is no conversion utility to convert any Windows Forms app to a Web Forms app. The two models work so vastly different that it's impossible to do.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
What does Serialize and MarshalByRef do ? What is the functionality ?
|
|
|
|
|
|
Here's my scenario:
I have a piece of UI that accepts that takes a value (happens to be a property on a custom object) in an edit control. When the user commits the change, the form controls are disabled and the value is applied to an underlying object, which takes a couple of seconds. When the underlying object completes the assignment of the value it fires an event indicating that the change is complete. When the event is received, the UI is enabled and the user can proceed. Should be a piece of cake.
Note: Perhaps the user experience could be designed a little better, but that is a separate issue, for now it is what it is.
After spending a couple of weeks messing around with XAML, I can't see how this can be done in XAML by a non-coding (UI person), it seems like I have to implement handlers in code behind or start building my own custom controls.
Explanation:
1) The event object is not of type Routed Event.
2) If the event was of type RoutedEventArgs, I would have to lose information that is passed in the existing event.
3) The underlying object is not a UIElement, so it can't raise that event anyway, have to subclass and create a new custom control.
4) If I implement a data binding object to catch the custom event, I have no way to "catch" the custom event or even the standard PropertyChanged notification in a useful way in XAML.
5) If I try to implement a trigger on the PropertyChange notification, I can only do so in style that cannot operate on child or parent objects (thus the form can't use a trigger and setter on propeties of the textbox)
6) Event triggers can only operate on Routed Events defined for the object in question - custom control again
7) Event triggers can only operate on the control raising the event.
8) Event triggers call handlers which are implemented in code (behind or inline).
9) yada, yada, yada
In summary, my form cannot respond to events or property changes in child objects, only the controls themselves can.
Additionally, controls only respond to predefined events, requiring sub-classing for additonal events/properties.
Finally the only events at my disposal are of type Routed Events so a limited amount of information can be provided.
Granted, today I do not have any kind of Markup language for my UI folks to use that can readily transfer to Visual Studio, but even with XAML, a programmer is still required to implement the code behind and wire the layout together. The idea that UI folks can develop applications in XAML while coders just work on DataSources and Validation objects seems to be a myth, or at least a Nirvana that NET 3.0 doesn't acheive.
Am I missing something. Seems like I am learning a whole new language and shifting to a new development paradigm just so I can import UI layout from a designer tool.
|
|
|
|
|
I feel your pain. I, too, am torturing myself with the hazy and poorly documented world of WPF.
IMO, the behavior you described (disabling the UI until a custom event fires) sounds like something that should not be in the XAML. From my experience with WPF so far, it seems that a layout and appearance settings should live in XAML, but any specialized behavior should be in the code-behind. Francois, the turtlenecked artiste, should not have to see the implementational details of how an app behaves.
That's just my opinion, though.
Josh
|
|
|
|