vb.net

Calculating elapsed time in hours from a date to current date excluding weekends

I need to calculate in hours how much time has elapsed from when a record was created to the current time. The hard part is I need to exclude weekend times from this. I have been working on this for quite a while and I am just lost. Here is what I have so far. Thank you in advance for your help. Dim MyStartTime As DateTime = "2...

ASP.Net applications

Hi, What is the difference between vb.net application and asp.net application? How can I publish an ASP.Net application with database residing in the server and user could update that through internet? Thanks ...

Help with SQl Server and XML?

I issued a query request to sql server with "FOR XML AUTO, type, elements, root('root')" appended to the end of my query. I issue a da.Fill(ds) [to a datset] which works without any problems. Now that I have the data, I want to transform it into HTML. So I used: Dim XMLString As String = ds.GetXml() that converts my data into a str...

Disable or hide row/column in detailsview when inserting?

When in insert mode detailsview, there are some parameters that I would like to disable or hide. The columns are autogenerated. Doesn't work: DetailsView3.Rows(5).Visible = False or DetailsView3.Rows(5).Enabled = False I'm lost. ...

Opaque Form Overlay Without Covering Task Bar

Using Visual Studio 2008 and VB.NET ... I've created a form (OpaqueForm), which is an intermediary form between other forms which I will open with ShowDialog. The idea is that when I want to show a form using .ShowDialog, this OpaqueForm, with an opacity other than 100%, sits in between the main form and the dialog form, effectively "gr...

Why would a threading-related exception only happening outside of the Visual Studio IDE/debugger?

I'm using a BackgroundWorker to do some work. Part of that work involves showing a form. That form has some controls that are set as drag & drop targets. I know that the BackgroundWorker uses the ThreadPool to run, and that threads from the thread pool use the MTA threading model. I also know (thanks to this question) that when you have...

Switching from C# to VB.Net

Hi All, I am not sure if this is a dupe. I came across this Switching from VB.NET to C# - any advice for learning C#? My case is the reverse. I would be moving from C# to VB.Net. To be more precise, I would be moving from C# 3.0 to VB 10.0 (.Net 3.5 to .Net 4.0). I am initially planning to use a C# to VB converter to cope up with the s...

C# VB.net syntax conversion advice

I'm trying to implement sqldependency in my vb.net application as per: http://www.dreamincode.net/forums/topic/156991-using-sqldependency-to-monitor-sql-database-changes/ I'm having problems with the involking code, when a notification is recieved the application locks up with no errors. (When MyOnChanged is called via the deligate) H...

Recommendation for 3rd Party .NET Serial Port Class/Component

I am looking for a serial port component for .NET that overcomes the issues with the built-in Serial Port component related to sudden unplugging of USB-to-RS232 adapters, and suspension of the computer while the port is open. (Untrappable errors occurring after the the device is unplugged or the computer comes back after being suspended...

Any reference to profilecommon causes error Value cannot be null. Parameter name: type

I have searched for two weeks, every night, exhaustively reading forum threads and trying all suggested solutions no matter how outlandish. Just as is the case with the many many forum threads about this same issue, the site works fine on my development machine. It deploys with no errors. It works from the production server and reads ...

VB.NET XML Comments not working

Possible Duplicate: VS2005 VB.NET XML Comments ' - stopped working I'm having an issue with the XML comments for one of my projects in my solution. I try the whole "'''" trick but the comment doesn't automatically generate into: ''' <summary> ''' ''' </summary> ''' <remarks></remarks> It works fine for all the other proj...

Need help with event handling syntax in VB.Net

I want to add an event in my VB.NET code. I have done VB.net programming but not well experienced in event handling. I have declared like this public WithEvents FormEventCapture As vFormAgent.__vFormAgentLib_Event Then i put the following code in form load event FormEventCapture = new vFormAgent.__vFormAgentLib_FormEventEventHandl...

Multiple-step OLE DB operation generated errors

Dim NorthWindOledbConnection As String = "Provider=SQLOLEDB;DataSOurce=SARAN-PC\SQLEXPRESS;Integrated Security=ssp1;InitialCatalog=Sara" Dim rs As New ADODB.Recordset() rs.Open("select * from SecUserPassword", NorthWindOledbConnection, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockBatchOptimistic) i tried to run this ab...

Checking file/folder access permission

I get an UnautorizedAccessException running this code: string[] fileList = Directory.GetFiles(strDir, strExt); The exception occurs in c:\users\username\appdata How can I check if I have access permission (to list and read files) ? ...

Applying a theme to a silverlight control that doesn't cascade to child controls

I am using both the Microsoft Toolkit themes, and the C1 Themes (which are a subset of the MS Toolkit themes). The reason for this is that I need the range of Themes that MS offer, but I need one of the controls that C1 offers. The problem is, when you apply the Application Theme to one of the MS themes, it doesn't apply to the C1 contr...

How to handle an event from DLL in VB.Net

Possible Duplicate: Handling DLL events in VB.Net Hello every one Can you tell me how to handle an event from DLL in Vb.Net. Can we do using withevents? Can you tell me steps to be followed? Please help me out. Thanks a lot for your kind help. ...

VS 2008 Code Snippets - Removing an entire folder

OK, this is somewhat frustrating. We have a folder containing custom code snippets used by our company to ensure coding standards and the like. I was documenting the process of actually adding said folder to Visual Studio 2008, when I accidentally added the wrong folder (I added the folder one level up). Since we have both C# and VB s...

How to submit on keypress (vb.net)

I have written a login. Now I want to do this (press return to login): Private Sub login_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If e.KeyData = Keys.Return Then login() End If End Sub It does not work. At this time it works only with a button. ...

How to always display a control on the curently active tab of a TabControl?

I have a tab control with two tabs. Both tabs have controls which are unique to them, but there is one control which I would like to always appear on whichever tab is currently active. I figure I just need to add some code to TabControl1_SelectedIndexChanged(). I tried MyControl.Parent = TabControl1.TabPages( ...

How to make a COM in language other than C/C++?

I noticed that MIDL.exe only generates header file (*_h.h) and GUID file (*_i.c) for C/C++. Which facilitates creating COM in C/C++. What if I want to create COM in VB or some other language? IMO, I must define the interface in MIDL language first, and then compile it with MIDL.exe. So how could other languages utilize the output of MI...