vb.net

Unwanted wait cursor in WinForms app

I have an MDI WinForms app in which the MDI parent form has a ToolStrip, MenuStrip and StatusStrip. Whenever the mouse is moved over one of these controls the cursor changes to a 'wait' cursor (a arrow with an hourglass). This seems to be default behaviour in that there is no code to make this happen. The UseWaitCursor property of both t...

Can a web control edit properties belonging to its parent?

I have a .aspx page that loads three separate .ascx controls to represent adding, editing and listing objects. It currently simply swaps out visibility and enables/disables the controls to switch between pages. However, when listing objects (in a gridview), we offer the basic "Edit" button beside each one. Clicking on this will, obvio...

Is a Do block the same as a With statement?

Studying Ruby and the Do block. Coming from much c# I didn't see much that reminded me of Do, but then VB came to mind with the With statement and one which I wish was in c# (maybe it is and I never saw it?). The two statements, Do and With, appear similar. Is the With statement in VB the same as a Do block in Ruby? EDIT: Take this ...

Visual Basic Compatiblity DLL exception in DirListBox

We migrated from VB 6 to VB.NET 2008. Convertion went fairly well. There is one issue with exception. The following line in the InitializeComponent throws exceptions. Me.dirSelector = New Microsoft.VisualBasic.Compatibility.VB6.DirListBox The exception message says that "Invalid Property value". It happens only once. After that every...

Multithreading on a multi core machines not maxing CPU

I am working on maintaining someone else's code that is using multithreading, via two methods: 1: ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf ReadData), objUpdateItem) 2: Dim aThread As New Thread(AddressOf LoadCache) aThread.Start() However, on a dual core machine, I am only getting 50% CPU utlilization, and on a dual...

Easiest way to develop/debug a Windows Service in .NET

I'm developing a Windows Service in VB.NET 2008, but I feel like I'm going to have an aneurysm. To debug the service, I've added a 15 second wait to the initialization code, which gives me time to start the service and attach the .NET debugger before anything happens, so I can hit breakpoints and such. I really miss "integrated" debuggin...

Adding items into Listbox from a Listview

Public MaintenanceMenuList As ListView Function AddItems() Dim lstModules As New ListBox() MaintenanceMenuList.Items.Add("item_1") lstModules.Items.Add(MaintenanceMenuList) End Function I am receiving an error like "Object reference not set to an instance of an object". What seems to be the problem here? ...

Using & and + in asp.net with vb

I have some confusion as to the use of + and & in ASP.NET and VB.NET. See the following code: Dim dtUser As DataTable = GetDetails() Dim serverPath As String = Nothing Dim virtualServerPath As String = Nothing Dim parentDir As DirectoryInfo = Nothing Dim childDir As DirectoryInfo = Nothing serverP...

ConnectionString property has not been initialized.

I've looked at a lot of posts on different forums where others have received the same error. Most say they were not referencing the connectionstring from the web.config file correctly, or they were trying to open the connection before setting the connectionstring. Well, if that were the case for me, then how does it work on two different...

ObjectDataSource DataObjectTypeName Help. Pass object as parameter

I have a partial class (the main class is a LinqToSql generated class) <DataObject(True)> _ Partial Public Class MBI_Contract <DataObjectMethod(DataObjectMethodType.Select, True)> _ Public Shared Function GetCancelableContracts(ByVal dealer As Dealer) As List(Of MBI_Contract) Return Utilities.GetCancelableContractsFor...

allowing user to resize trackbar

i would like to allow the user to play around with the size of the trackbar in vb.net. is there an easy way to do this? i want to clarify that i would like the user to be able to just resize the trackbar by dragging it just like in design mode. ...

How to disable visual basic errors in the error list in visual studio

I have a large solution which contains a mixture of C# and VB.Net projects. If I get compilation errors because a project which several other projects depend upon fails to build, it is very hard to see the actual error(s) because of the number of VB errors in the error list window in Visual Studio. C# errors found in the projects I comp...

Generic .Net Web Services

At the moment we're are considering writing a number of .Net web services to export/import data between sites. There are various different types of data involved, relating to multiple database tables. I could write various web services to receive the data being sent, for example ImportSomeRecord(field1, field2, field3) ImportSomeRecord...

How can I obtain a reference to a control created inside a repeater?

I have one control named thumbviewer inside repeater. I want to set its imageurl in code. Currently it's done in aspx itself as <asp:Repeater ID="Repeater1" runat="server" > <ItemTemplate> <span style="padding:2px 10px 2px 10px"> <bri:ThumbViewer Id="Th1" runat="s...

ASP.NET MVC AJAX returning new page on simple call

I'm not sure what's wrong with the following setup. I have a View that lists a number of records, and each has a dropdown associated with it to change a value on that record. I had it all working without AJAX, but you had to change a bunch of the dropdowns then click a Submit button. I wanted to change it so that it would save the dropdo...

How to set tooltips to combobox items @ VB.NET ?

Hi, I have a combobox with a given width. It may occur that one row of the data is partially hidden (the combobox might be too narrow). I'd like to show the whole line by using a tooltip or right-click context menu. Currently I can't find how to 'catch' the row that I'm currently holding on or passing over by mouse. Please tell me. Th...

Saving PDF file to Shipment in Oracle

I have a web site that allows the user to generate a PDF Export Document based on shipment data in Oracle. One requirement is to save the PDF file to the shipment in Oracle. Does anyone fimiliar with Oracle Order Management know if there is a BLOB field associated with the shipment that I could store this in or an API I can call from m...

VBv3.5 include directive throw's error when calling ProcessTemplate method.

I am attempting to generate some code via T4 and I am receiving the following error when I include the <#@ template language="VBv3.5"#> directive in my template. vbc : Command line (0,0) : error BC2006: Compinling transformation: option 'r' requires ':(file_list) If I use <#@ template language="C#v3.5"#> as my directive it works just f...

Do not want Error Provider to check control validation until save event

I am writing a User Control. Into each control I am loading a custom biz object. Because the biz object implements IDataErrorInfo interface I am able to use the ErrorProvider control on the user control. I am binding the ErrorProvider to the biz object like this: Me.ErrorProvider1.DataSource=MyBizObject This is all working perfectly...

Getting information (on click) that was used to programatically generate asp controls

How may one get information that was used to programatically generate asp controls? For example, I pulled a DataTable of user objects from the database and have organized them on a page, listing groupings such as a list of employees directly under the employer for each employer. On the page, I list each user's Username as a LinkButton....