vb.net

VB.NET Assigning a binary constant

Is there a way to assign a binary value to a vb variable? All of the obvious choices don't work. I've tried prefixing with &B, appending with b but nothing seems to work. I'm not having much luck searching for it either. I don't NEED this for my application, but am rather, just curious so alternate solutions are not necessary. [Edit...

How do I find out which control has focus in .Net Winforms?

How do I find out which control has focus in winforms? ...

Load results from a GET/POST request in VB.net

I want to develop a program that uses an online API, with GET and POST requests, and I want to know how to make the requests within the program (without the user seeing a web page), and then download the results into the program so I can parse them ...

4-point transform images

I need to transform bitmap images with their 4 corner points moved from one location to another. Any code that can run on Windows, C#/VB.NET preferably, even help how to use scriptable programs like Paint.NET or Photoshop would be accepted. The Java Advanced Imaging API sounds hopeful. I need it for a screenshot manipulation system, wh...

Asp.net Grid View

In my Grid View ,When a button is clicked,i want to insert that row in to database and at the same time make the row invisible in the Grid View. I can insert in to database but can't make the inserted row invisible. Dim PayID As Integer = (e.CommandArgument) Dim EmpID As Integer = (e.CommandArgument) Dim EID As I...

Same TableAdapter, Different DB

Hi, having to work in two parallel environments, developement and production, I want to use the same TableAdapter to connect to different databases (two Oracle databases running on different servers) with the very same structure. How is this possible? Thanks. ...

Changing values in Web.config with a Batch file or in .NET code

Hi I have a web.config file on my computer. There are alot of things i need to change and add in the file. (I am actually working with my SharePoint web.config file) Can i do this with a Batch file, if so how would i do it. Or how would i do it using VB.NET or C# code? Any ideas guys? Edit: i need to create a program to alter a web....

datatable not knowing its primary key

I'm trying to query a datatable to establish the primary key [identity column], by querying each columns autoincrement property. However its always false (for the column which is the Idenity/PK). Querying the tables primary key collection reveals that the datatable doesn't think it has a PK.; Dim dc As DataColumn() = dt.PrimaryKey ...

Timeout Expire on INSERT Query

I am trying to insert a row in a table using simple INSERT Query in a transaction. It works fine in SQL Server but I am not able to insert the data using my business object. I am calling a SELECT query using the Command as: Using cm As New SqlCommand With cm .Connection = tr.Connection .Transaction = tr .Com...

Workaround for VB.Net - ByRef parameter of a property

I have a legacy COM-component with an interface declaring a property like this (IDL notation): interface IPasswordCallback : IUnknown { [propget] HRESULT Password( [in] VARIANT_BOOL ownerNeeded, [in, out] VARIANT_BOOL* isResultValid, [out, retval] BSTR* password ); } This interface is implemented in a calling application w...

Getting image height and width when image is saved in database

Hi I save my images into my SQL Server Database with ASP.NET(2.0). (imageData -> image) (imageType -> varchar) (imageLength -> bigint) Thus the imageData will be "Binary data" and the imageType will be like "image/gif" and the imageLength will be like "6458"....... Is it possible to get the image HEIGHT and WIDTH from my VB.NET code ...

How can I access a method's parameter from an associated attribute?

Hi. Given the following classes, how can i intercept Class1.SampleMethod's Value from SampleAttribute? Thanks Public Class Class1 <SampleAttribute()> _ Public Function SampleMethod(ByVal Value As Integer) As Boolean Return True End Function End Class <AttributeUsage(AttributeTargets.Method)> _ Public Class SampleAtt...

Grid View, ASP.NET

Hi When pressed Once,i want to make the Grid view Button(Time In) invisible until the User press Time Out Button. Once the user press the Time Out Button,Time in Button must be shown ...

Excel Export In ASP.NET + VB.NET Bug

We use a small bit of excel exporting code in our app code at work to export XML controls from our ASP pages into an excel format using the following code: Public Shared Sub Export(ByRef xml As Xml, ByVal filename As String) Dim response As HttpResponse = HttpContext.Current.Response() response.Clear() response.AddHeader("...

How To Get DataTable In All Events OF GridView

hi guys, I have a gridview in my form.FirstTime in pageload iam loading gridview by calling function "FillgridFileExpenses()". Sub FillgridFileExpenses() If txtInvFileNo.Text = String.Empty Then objinvoiceT.intfileID = 0 Else objinvoiceT.intfileID = Convert.ToInt32(txtInvFileNo.Text) ...

Selecting a rows in the standard .net 2.0 GridView Using VB.net & JavaScript

Does anyone know how i can get the grid to select a row by clicking on any cell in the row? The only way i can do this at the moment is by setting the AutoGenerateSelectButton property to True, but this adds a column to the grid with a crude "select" hyperlink and only selects the row if the word "Select" is cliked on. Surely there ha...

Disabling the VB background compiler in VS2008

Does anyone know how to disable the background compiler for VB in VS2008? For my sins I have to work on a large VB.NET project and it often locks up for 20 seconds at a time whilst doing the very helpful background compilation which is extremely frustrating. I'd rather work blind between compiles and be able to do some work. ...

How do I delete a row from a GridView during the RowDeleting event?

I have a GridView and its DataSource is datatable.OnRowDeleting event of Gridview. I can't seem to delete that row when I click the 'delete' button that invokes the event to remove the row. My code is like this in RowDeleting event of GridView: DataTable.Rows.Remove(GridView.DataKeys(e.rowindex).value) I get the error: "Cannot ty...

Deleting rows from Datatable in vb.net

DUPLICATE of http://stackoverflow.com/questions/665751/deletion-from-datatable hi, i have a Datatable in my code in vb.net.I need to delete rows from the datatable. The namw of my Datatable is "temptable".in my rowdeleting event of a Gridview control.i wrote code as follows: In the Row_Deleting event of Gridview: temptable.Rows.Remov...

Can't see "Must implement" error

I need another (dozen) pair of eyes on this. The following code: Interface iRuleEntity Function GetRuleViolations() As List(Of RuleViolation) End Interface Partial Public Class Feedback Implements iRuleEntity Public Function GetRuleViolations() As List(Of RuleViolation) Return Nothing End Function End Class ...