vb.net

Do I need to EnterWriteLock when using AddHandler?

When using a ReadWriteLockSlim for multi-threading support, do I need to EnterWriteLock when using AddHandler? Here are two examples to help illustrate my point: AddHandler ClassInstance.Event, New EventHandler(AddressOf Me.Method) -or- Me.ReaderWriterLockSlimInstance.EnterWriteLock() AddHandler ClassInstance.Event, New EventHan...

Winforms UserControl is not using the inheritance tree I have created. What am I doing wrong.

Hello, I am working on a wizard form framework that will allow me easily create wizard forms. I have a WizardForm form that has a panel on it. My plan is to dynamically load UserControls into this panel on the form. Each UserControl that is loaded onto the form panel must implement certain properties (allowNavigateNext, AllowNAvigat...

.NET Programming - Can I access members of a C-Sharp project from my VB.NET Project?

I have a multi-project .NET 3.5 solution. It's ASP.NET based with c# code-behind in all projects except one. I'm attempting to access members from a C# project called "Core" from a VB.NET project. I set a dependency to the Core solution in my solution properties. However, Core. brings up nothing. Furthermore, my other C# project...

How to programatically set height of row in XAML?

Hi, I just need some quick help on syntax. I'm doing a WPF project and decided to try it out with Visual Basic. So, basically I'm trying to set the height of a row in a Grid. I'm not great at programming but with C# I managed somehow to figure it out, without remembering how. It actually looks like an animation because when clicking the...

Query too long in .NET 3.5 and SQL Compact 3.5

Hi, this is a rather pathetic problem: In Visual Basic 2008 Express with SQL Server Compact 3.5 and the Usual DataSet / TableAdapters, My Query is too long: Changing the names, it is a query like this: SELECT Table1.*, Table3.* FROM Table1 INNER JOIN Table2 ON Table1.ID = Table2.T1ID INNER JOIN Table3 ON T...

.NET Terminating Threads in an orderly fashion

Currently, I have a RingBuffer which is run by a producer and a consumer thread. In looking for a method of terminating them orderly, I thought I'd use a flag to indicate when the producer had finished and then check that flag in my consumer along with the number of ring buffer slots that need to be written. If the producer has finishe...

Updating records in SQL Server 2005 with ASP.NET 3.5 - HOW TO?

I have ALWAYS used the SQLDataSource to update my records in my SQL Server 2005 database, so i am not really sure how this would be done in normal code. I am using VB.NET but if you are a C# developer and want to show me some code that is more than welcome as well. I am using ASP.NET 3.5............... My user will see a page with 5 Te...

What approach should I take to split a string and update muliple SQL tables?

I have an Article object with the following properties: Article Name (varchar) Article Body (varchar) Article Tags (varchar) The Article Tags is a space delimited string of text values that a user has tagged the aritlce with. The 3 properties are passed to a stored procedure. I now want to do the following: 1) Insert the Article N...

How do I put a shortcut on the Programs menu on Windows Mobile in the installer cab?

Where do I put the shortcut icon for my mobile application in the Installer project for a Windows Mobile project so that when the cab is installed the icon will show on the Programs Menu? ...

Dynamically adding controls to a panel - layout question

Hi everyone, I've successfully been able to add controls (labels, images, buttons, etc) to a panel control (using VB/ASP). This panel control, I refer to it as "insertpanel". Then I add this panel to the main panel on my webpage which I made during design time. The problem I run into is that when I add multiple controls of any type to t...

ASP.NET Routing

I have a small task to do, and figured it would be better to start here than doing it wrong then coming here again. I need to replace my URLs with a more friendly format as the following: Current: www.MySite.com/default.aspx?userID=XX I want it the users to type : www.MySite.com/user/(UserName) Also, Current: www.MySite.com/default.aspx...

WPF - Animating gridlength in XAML

Hi, I was just wondering if it's possible to animate the height of a grid using purely XAML? I looked at this tutorial: http://windowsclient.net/learn/video.aspx?v=70654 But it seems as though one need to write custom functions for this to work. Can it be done just by XAML purely? ...

How to distiguish between MS Access Fullversion with Access Run-Time.

My application is built to scan MS Access database in vb.net 2005. Problem: MS Access DB is opening when Access Run-Time (But no Full version of MS Access) is installed in the system as well. But showing error while scanning through our Tool. Solution: Need only Full version of MS Access. Suggestion: To Identify, whether the requi...

VB.NET Datagrid

How should I adda datagrid column dynamically on selectedindexedchanged? ...

VB.Net apply XSL transformation to XML file

Hi there I have got some XML which is built by my application. This XML is dropped to an XML file, which I then wish to apply an XSL stylesheet to in order to convert it to a HTML page. However, every time, it just keeps coming out with the original XML rather than the transformed HTML Here is the XML: <firelist> <visitor> <Titl...

Update Binding Dataset if User Deletes a Row from the DataGridView in vb.NET

VS 2008 in vb.NET Hi, I have a manually created a dataset (dsPickingList) that I add data too as the user inputs data on a form. There is a datagridview on my form of which it's datasource is set to dsPickingList. What I would like to do is spot if a user deleteds a row from the datagridview and update the dataset (dsPickingList) as i...

VB.NET Process.Start() immediately stops

Hi, I'm having a strange problem with the following code, I'm writing a game launcher in VB.NET: Dim gameProcess As Process = New Process() gameProcess.StartInfo.UseShellExecute = False gameProcess.StartInfo.FileName = TextBox2.Text gameProcess.Start() Debug.Print("Game started") gameProcess.WaitForExit() Debug.Print("Game stopped") T...

How to declare COM-visible default indexed properties in VB.NET?

Hi, how do you declare a default indexed property in VB.NET such that it is callable from VBScript? I have tried this using <DispId(0)> _ Public ReadOnly Property Item(ByVal idx As Integer) As ... but VBScript returns the error message Wrong number of arguments or invalid property assignment Error Code 800A01C2 This error does not...

LINQ to SQL: Is it possible to reference the data context when extending a table object?

If I'm extending OnCreated for a LINQ to SQL table object, is it possible to get a reference to the data context to which the table belongs? For example, if I add a property to the data context: Partial Class MyDataContext Private _myValue As String Public ReadOnly Property MyValue As String Get Return _myValu...

simple checkedlistbox comparison

I have a form containing a checkedlistbox, I want to be able to do a simple comparison between the checked stauts before and after to see if there has been any change. I have a copy of the "before" version of the checkedlist box and I thought I could just compare the two CheckedItems but it always thinks they are different, I could iter...