vb.net

how to update datagrid view runtime

how to update datagrid view runtime and set set controls to datagride ...

Date and time library with period support for C#/VB.NET?

I am looking for a library doing set operations on time periods with support of weekdays and time of day. I have started to roll my own, but it seems like a error-prone job so I would like a tested solution for this. I don't mind spending money. If I have a set of two time periods (this can be several) Setup: // [period 1]: TimeSet.Ad...

VB.NET call ADODB.Command.Execute - not returning Recordset

Hello I have a classic ADO command which execs a sproc and returns a RecordSet. This is being executed from a VB.NET using the PIA. However when I .Execute the command, the result returned is not an ADODB.Recordset but a System.__ComObject. Wonder if anyone has seen similar behaviour? ...

VB.Net Email Send

I have look around the internet but cannot see anything relevant. I just want to start a new email in outllook but do not want to send it as user may want to add their own things to the email and all my program is doing is adding a to address and attachment. Any help will be greatly appreciated. ...

operator overloading .net

What scenarios would you consider operator overloading in .net? ...

VB.NET: end-of-line identifier?

What end-of-line identifier should I use (e.g. for output to text files)? There are many choices: vbCrLf ControlChars.CrLf ControlChars.NewLine Environment.NewLine A static member in some C# class in the application (requires mixed-language solution): public static string LINEEND = "\r\n"; What is best practice? ...

Problems with Exception Handling in Winforms application using a global error handler

I have a Windows Form application that has a global error handler to display unexpected errors. Namespace My Class MyApplication Delegate Sub ProcessParametersDelegate(ByVal sender As Object, ByVal args() As String) Private Sub MyApplication_UnhandledException(ByVal sender As Object, ByVal e As Microsoft.VisualBa...

Form FIller VB6 to VB.Net

We are doing a conversion of a VB6 app to VB.NET. The old VB6 app had a control called FormFlow Filler, which is no longer supported (I believe its over 10 years old). We have tried various third party controls to replace this but to no avail. The control was used mainly for working with PDF's and when the user clicked on a PDF field ...

override form name of masterpage vb.net

It seems like I can't set the id or name of the form in my masterpage. [it's always "aspnetForm"] Is there a way to override the uniqueID property of form? I tried to create a class and inherit from htmlform, but then i can't register it on my mastrepage, [unknown server tag ... ] im registering it like this <%@ Register TagPrefix="...

Why is there no overload of Interlocked.Add that accepts Doubles as parameters?

I fully appreciate the atomicity that the Threading.Interlocked class provides; I don't understand, though, why the Add function only offers two overloads: one for Integers, another for Longs. Why not Doubles, or any other numeric type for that matter? Clearly, the intended method for changing a Double is CompareExchange; I am GUESSING ...

Dynamic Host name in ASP.NET

Guys, How can I dynamically create a host name in ASP.NET? Like if people come to my site, I want to be able to dynamically create them a .Mysite.Com host name. I've seen this done at other sites before but can't seem to find documation on how to do it. Any help would be appreciated. I'm using VB.NET/ASP.NET 2008 and IIS 6.0 ...

How to export to excel from a winform vb.net 2008 without office installed?

Hello, I am building a windows form application using visual basic (visual studio 2008). The idea is to query a MySQL DB and export the results to an excel document. I managed to do this using this code (I will just show the export to excel part): Imports Excel = Microsoft.Office.Interop.Excel Imports System.IO Imports System.Da...

SQL Databases in vb.net

If you are using an sql database with a vb.net application, does the user need to have anything extra other than the .net framework installed for the program to run? Meaning, if I simply compile the application, are there any extra steps I need to take to make this work? Thanks for the help! ...

Terminating an application programmatically using a file path in vb.net

I want to terminate an application using the full file path via vb.net, yet I could not find it under Process. I was hoping for an easy Process.Stop(filepath), like with Process.Start, but no such luck. How can I do so? ...

Locking a ToolStripContainer panel to only allow for one row of toolstrips

Title says it all. I want the ToolStrips to remain on one row, and for the user to be able to rearrange on that row but not create additional rows. I tried using SetBounds on the LocationChanged event, if the user attempted to change the Y position it just sprung right back. However, this created some visual bugs, such as the mouse alway...

how to get TimeZoneInfo short name

Is there any method to get the 3 char code from System.TimeZoneInfo.Local ? e.g. EDT instead of Eastern Daylight time etc. ...

VB.Net DropDown List SelectedIndex Question

In a VB.Net application, how can I either: Find the dropDownList selectedIndex position of something just added to a database. Have a form restart with the most recently-added entry showing in the DropDownList, by way of modifying the inline SQL query to display by date/time added. ...

VBA - populating collection with arrays

hi i have the foll. code in VBA: Dim A As Collection Set A = New Collection Dim Arr2(15, 5) Arr2(1,1) = 0 .... A.Add (Arr2) can you tell me how to access the Arr2 through A? For example i want to do the following A.Item(1) (1,1) = 15 so the above would change ...

Getting row number in a DataGridView

How do you get row number DataGridView cell? Specifically, if a user has selected a single cell, how can you get that row number? It needs to access a particular cell based on what the user has selected. I know that the RemoveAt method can be used to remove at the Focus, but you cannot get the row number at focus apparently? Thanks for...

Problem while porting VB.NET Code to C#

Hi, Currently I am trying to port some VB.NET code to C#. The struct looks like this in VB.NET: Public Structure sPos Dim x, y, z As Single Function getSectorY() As Single Return Math.Floor(y / 192 + 92) End Function Function getSectorX() As Single Return Math.Floor(x / 192 + 135) End Function F...