vb.net

View MS Access Report in .net ReportViewer control

Is it possible to view an MS Access report in the .Net ReportViewer control? ...

When should I use a List vs a LinkedList

When is it better to use a List(Of T) vs a LinkedList(Of T)? ...

How would you simplfy Entering and Exiting a ReaderWriterLock?

This seems very noisy to me. Five lines of overhead is just too much. m_Lock.EnterReadLock() Try Return m_List.Count Finally m_Lock.ExitReadLock() End Try So how would you simply this? ...

How would you simply Monitor.TryEnter

This is even worse than the ReaderWriterLock in terms of noise. If Threading.Monitor.TryEnter(syncRoot) Then Try 'do something Finally Threading.Monitor.Exit(syncRoot) End Try Else 'do something else End If Both C# and VB solutions are welcome. ...

How can I change the 259 char limit inside WinForms Treeview LabelEdit?

My VB.Net Winforms app is a tool to allow hierarchical data to be edited in a tree, then stored in a database. I am using a treeview control. Content is drag-dropped from other documents onto the treenodes, or the nodes can be edited directly. if I edit the database field directly, and enter a bit of content (a thousand characters long...

How do I develop for both Portrait and Landscape display formats?

I'm currently developing for a handheld device running Windows XP Professional (not Tablet PC edition). The device allows users to switch from the standard widescreen landscape display format to a portrait one. I would like to know if there are any VB.NET code snippets to help me along with this task. ...

Using ButtonField or HyperLinkField to write a cookie in ASP.NET

I currently have a DetailsView in ASP.NET that gets data from the database based on an ID passed through a QueryString. What I've been trying to do now is to then use that same ID in a new cookie that is created when a user clicks either a ButtonField or a HyperLinkField. What I have in the .aspx is this: <asp:DetailsView ID="DetailsVi...

Datagridview BindingNavigator deletion cancel

The DataGridView has an event, UserDeletingRow, with the option to cancel the delete caused by pressing the Delete button of the keyboard. But if the user clicks the Delete toolstripbutton of the bindingnavigator, no such event exists. So what do you do to pop a messagebox asking the user to confirm to delete the row? ...

A C# to VB.Net conversion utility that handles Automatic properties correctly?

I hope this isn't considered a duplicate since it's more pointed than similar questions (I'm curious about a specific weakness in C# to VB.net conversion utilities). I've been looking at using a tool like this .net code converter to convert a class library to VB since I'm the only one in my group comfortable with C#. The problem I've ru...

Disable the scroll bar in MDI Parent

It is possible to prevent scroll bars from appearing when you drag a Mdichild outside the bounds of the Mdiparent in vb.net? I would prefer the solution to not involve checking the posistion of the child form as there are too many forms to alter. Obviously autoscroll is set to false on the mdiparent and setting VScroll and HScroll to f...

Webserver to combine xml files?

I have a program I've written in VB.NET 2005, it saves statistics in an xml file. I use this program on multiple computers. I'd like to set up a webserver where I can upload my xml file, or just the data, and add it to the server ignoring duplicate entries already on the server. What do I need for to learn for this? SQL? Any ideas w...

Loops and Garbage Collection

I am working on a web application and I have run into the following situation. Dim a as Object Dim i as Integer = 0 Try For i=1 to 5 a = new Object() 'Do stuff ' a = Nothing Next Catch Finally a = Nothing End Try Do i need to do the a=Nothing in the loop or will the garbage collector clean ...

What is the best application of .dispose()

This is something that I have never fully grasped in .NET as to the correct application of the .dispose() method. Say I have something like Public Class someClass() sub someMethod ' do some stuff tying up resources end sub End Class public class mainApp dim _class as new SomeClass _class.someMethod() End Class In all ca...

Is there an easy way to animate the ScrollableControl.ScrollControlIntoView method?

I have a form where controls are dynamically added to a Panel. However, when they do so, they are many times added below the fold (bottom of the container). It's nice that the .NET Framework provides this ScrollControlIntoView method, however, for added usability, it would also be nice if there was an easy way to animate so that it is ...

Unit Testing, Deadlocks, and Race Conditions

Any suggestions on how to write repeatable unit tests for code that may be susceptible to deadlocks and race conditions? Right now I'm leaning towards skipping unit tests and focusing on stress tests. The problem with that is you can run a stress test 5 times and see five different results. EDIT: I know its probably just a dream, but i...

How to get a list of all child nodes in a TreeView in .NET

I have a TreeView control in my WinForms .NET application that has multiple levels of childnodes that have childnodes with more childnodes, with no defined depth. When a user selects any parent node (not necessarily at the root level), how can I get a list of all the nodes beneith that parent node? For example, I started off with this: ...

.NET - Find all references of property assignment

Hello, I am using VB.NET. In Visual Studio, if I right-click a property name and click "Find All References", it searches for all instances of the property being used. However, a property is always used either for assignment (Set method) or retrieval (Get method). Is there any way of searching for only one of these uses? e.g. search fo...

When does a DropDownList retain the value from postback at the SelectedIndexChanged Event Handler

To Clarify to all this problem absolutely does not stem from rebinding of the controls and the value does not remain the initial value after binding. I have a DropDownList on an aspx page which is being used in multiple projects. Along the life cycle of the page the SelectedValue is changed prior to the handling of the SelectedIndexCha...

How to convert VB.net interface with enum to C#

I have the following VB.net interface that I need to port to C#. C# does not allow enumerations in interfaces. How can I port this without changing code that uses this interface? Public Interface MyInterface Enum MyEnum Yes = 0 No = 1 Maybe = 2 End Enum ReadOnly Property Number() As MyEnum End In...

How do I find out if a column exists in a VB.Net DataRow

I am reading an XML file into a DataSet and need to get the data out of the DataSet. Since it is a user-editable config file the fields may or may not be there. To handle missing fields well I'd like to make sure each column in the DataRow exists and is not DBNull. I already check for DBNull but I don't know how to make sure the column...