.net-2.0

Is it possible to style text in a richtextbox at design time?

I have a System.Windows.Forms.RichTextBox that I wish to use to display some instructions to my application users. Is it possible to set some of the text I enter at designtime to be bold? Or do I have no option but to do it at runtime? ...

Is the method that I am using for retrieval in my generic list optimized

At some time there will be a large amount of records, about 50,000. with that in mind is the method GetEquipmentRecord up to the task. thanks for you opinions. c# ,net 2,0 public enum EquipShift { day, night }; public class EquipStatusList : List<EquipStatus> { string SerialFormat = "yyyyMMdd"; int _EquipmentID; string _...

Exists a replacement for the command-line-tool CASPOL.exe?

When trying to execute a .NET-App, it throws a "PolicyException", because "only one group is allowed". The tool should list existing settings, and allow to delete selected settings. Using caspol to list is not helpful, it is cruel. I've seen there is a simple gui-frontend, which allows to define NEW settings, but it does not allow to li...

How to avoid the Windows (XP) Security Warning when launching a "DOS" command line within C#?

This question is related to this initial question asked a little while ago. Now, that I have chosen the extracting tool, I'm iterating through a given in command line parameter directory and subdirectories to extract the compressed .zip files. private static void ExtractAll(DirectoryInfo _workingFolder) { if(_workingFolder == null)...

UpdatePanel, Repeater, DataBinding Problem

In a user control, I've got a Repeater inside of an UpdatePanel (which id displayed inside of a ModalPopupExtender. The Repeater is databound using an array list of MyDTO objects. There are two buttons for each Item in the list. Upon binding the ImageURL and CommandArgument are set. This code works fine the first time around but the Com...

VB.Net calling New without assigning value

In C# I can do this: new SomeObjectType("abc", 10); In other words, I can call new without assigning the created instance to any variable. However, in VB.Net it seems I cannot do the same thing. New SomeObjectType("abc", 10) ' syntax error Is there a way to do this in VB.Net? ...

.NET 2.0 vs .NET 4.0 loading error

My class library is compiled against .NET 2.0 and works just fine whenever I try to load it as a plugin under the 2.0 runtime. If however the master application is running the .NET 4.0 runtime, I get an exception as soon as the resources need to be accessed: Exception occurred during processing of command: Grasshopper Plug-in = Grasshop...

PropertyGrid - is it customizable?

I have a project in that we have to represent some graphic objects on a usercontrol in WYSIWYG. Also is required to edit each objects properties(Color, Location, etc). I hesitate between using PropertyGrid ('direct' properties edit) and custom forms on DoubleClick ('indirect' edit). The PropertyGrid is very well but should correspo...

List Form controls in a Combobox

[.NET 2] how should I list a form controls in a Combobox of the same form(like VS designer does)? I tried: cboObjectSelection.DataSource = Me.Controls but this does not work. Is there a possibility to filter(customize) this list? ...

I want The Answer in Vb.Net

Hi, I Want Link Button Property that When i click the Link Button,Label Content is Shown then after reading the content i click the same link button that time the Label content is Disable Tell Me the Answer ...

Draw a Rectangle in .NET

I try to write a class that will draw itself on a control(.NET 2). But this "thing" does not repaint itself properly(does not invalidate the parent as it should). Here is the usage: Public Class Form1 Dim myCadre As New Cadre Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Cli...

.NET 2.0: Invoking Methods Using Reflection And Generics Causes Exception

Hi all, I'm new to Stack Overflow, so forgive me. I've just started transititoning over to C# and I am stuck on a problem. I am wanting to pass a generic class in and call a method from that class. So, my code looks as such: public void UpdateRecords<T>(T sender) where T : new() //where T: new() came from Resharper { Type foo = Ty...

C# Web Service gets stuck waiting for lock, does not return

We have a C#(2.0) application which talks to our server(in java) via web services. Lately we have started seeing following behavior in (ONLY)one of our lab machines(XP): Once in a while(every few days), one of the webservice request will just get stuck, will not return or timeout. Following is the stacktrace where it seem to be stuck. ...

How to add a default value to a custom ASP.NET Profile property

I know you can add defaultValues using the web.config like this: <profile> <properties> <add name="AreCool" type="System.Boolean" defaultValue="False" /> </properties> </profile> but I have the Profile inherited from a class: <profile inherits="CustomProfile" defaultProvider="CustomProfileProvider" enabled="true"> <...

.net 2.0 accessing .net 4.0 dll via assembly bindings

Hi, I have a .net 2.0 webservices using .net 2.0 librarys (dll). My config uses assembly binding to use the latest builds,Now the .net2.0 will be migrated to .net 4.0, does this mean i have to move my service to 4.0 as well? Thanks Gauls ...

What is the best way to embed controls in a list/grid

I have a table of about 450 rows that I would like to display in a graphical list for users to view or modify the line items. The users would be selection options from comboboxes and selecting check boxes etc. I have found a listview class that extends the basic listview to allow for embeding objects but it seems kind of slugish when I ...

Modify Dictionary values

.NET 2 The standard: foreach(KeyValuePair<int,int> entry in MyDic) { entry.Value += i; // does not work :( i++; } Recommendations? ...

Unit Testing & Bug Repo for Vb.Net 2005

Working on a company using the .Net Framework 2 (vb6 and vb.net 2005) and a very rudimentary sourceforge setup, I'm kindof at a loss when I was tasked to "...find a suitable Open Source Unit Testing & Bug Tracking system..." for the team. Those were my superior's exact words. I know about the Team Foundation Server's capabilities, but ...

Reading XML file faster in ASP.NET

Hi all, I have multiple XML files that I need to parse. Problem is that I only need some data in the last couple of lines. I currently use XMLTextReader and reader.ReadToFollowing("DATANEEDED"); but it is still too slow. Does anyone know if I can 'tail' an XML file and read from there? (taking into account the tail would not be a ...

ContextMenuStrip not highlighting Items according to mouse movement

I have a ContextMenuStrip that I am showing programmatically in response to a button being clicked. Everything works as expected, except that the Items in the menu do not respond to being moused over. Whether the mouse button is up or down, mousing over the menu has no visible effect, and releasing the mouse button does not select an I...