vb.net

vb.net winform 2008 datagrid doubleclick event not firing

i have a databound datagrid in vb.net 2008. This is a program where i use the double click event multipal times.. but for some reason on a new form it's not working anymore. In code behind i selected the datagrid and double click event. when i double click on teh grid in debug mode, it never fires off the event(i put a breakpoint in)....

How to implement an interface in VB.Net when two methods have the same name but different parameters

I am a C# programmer but I have to work with some VB.Net code and I came across a situation where I have two methods on an interface with the same name but different method parameters. When I attempt to implement this interface in a class, VB.Net requires explicitly declaring "Implements MethodName" after the method signature. Since both...

Set x-axis scales for Date/Time values in .NET charting

I'm importing some data from MySQL into a VB.NET application with .NET charts. At the moment, the chart is plotting points by date, which means that when you zoom in, each major tick mark simply displays the date. See http://www.oliverspencer.com/graphdemo.JPG for a picture. It would be better to change these dates to times (hours) whe...

Running VB.NET application on Windows 2003 server

Hi, I've developed a VB.NET application with Visual Studio 2008. The application communicates with SQL Server and processes a text file. My question is about performance. While I run it from Visual Studio 2008, it takes 3 sec to complete. The same is when I run the executable created by the Setup Wizard on my desktop (Windows XP sp 3)....

ASP.Net Webservice - Constructors with Parameters

Hi, I'm fairly new to WebService developement and have just set up my own webservice (ASP.Net 3.5, Visual Studio 2008 .asmx file). I can not find a way of setting up my webservice to take parameters on the constructor. If i create a constructor that takes parameters, it is not then shown when i hook up to the webservice from my applicati...

Connecting to ACCDB format MS-ACCESS database through OLEDB

I've recently made another question about connecting to MS-ACCESS database with .NET in C# or VB.NET. It worked just as intended with MDB, but with accdb it caused an exception in conn.Open(); which follows: Is there another way to do this? My original intention (like stated in the original question) is gathering some (actually, a ...

Finding a control in .net

In vb.net I have control named checkbox1 that I can see at dropdown menu in properties tab. but in designer I am not able to locate it... Also when I am selecting CheckBox1 from properties' dropdown menu, no checkbox in designer gets highlighted.... How to find that control in designer? pls help me.... ...

adding a dataset inside a datareader in vb.net

i hope i have asked the question title correctly. let me explain my issue - i am making a table through vb.net code (htmltablecell, htmltablerow..) no this table populates with an sql query and works perfectly. but inside this table in one tablecell, i need to add a dropdownlist which shall require a completely differernt query and shall...

passing parameters to unmanaged C api from vb.net

I need to call a function in an unmanaged .dll written in C lang from vb.net. The function declaration looks like this LONG _stdcall ReadInfo(char *reply); Now the behavior of this function is that it copies some data in argument "reply" and returns a numeric value which signals its pass/fail status. How do i pass it a string object so...

Loading Access DB Table to Datatable

I have a database in .ACCDB format with some tables. I'm successfully loading it into an OleDbDataReader with the following code: string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;data source=C:\\marcelo.accdb"; OleDbConnection conn = new OleDbConnection(connectionString); string sql = "SELECT * FROM Clientes"; OleDbComma...

What's the easiest way to get Dictionary functionality in VB.NET?

I want to statically define a mapped array of strings like: var dict = {cat:50, bat:10, rat:30}; and lookup values within it like: MessageBox.Show( dict["cat"] ) ...

playing single video in multiple forms in vb.net

if i have mediaplayer1 in Form1 and mediaplayer2 in Form2 than how can i play and control a single video file in both mediaplayer1 and mediaplayer2 in vb.net ...

Difference between ASP.NET BeginRequest and PreRequestHandlerExecute

I am using code, similar to the code in this question: http://stackoverflow.com/questions/1047878/how-to-make-webpage-with-gzip/1048066#1048066 But I noticed that once I started using Server.Transfer calls, Firefox would report that the page was not encoded properly. So I did some searching and found that putting the code in PreReques...

ByRef underlined with "Expression Expected" error in VB.Net when trying to pass in a object of type List(Of clsFooDetail)

I work with C# 99% of the time. However, I'm having to update some legacy VB.Net code and encountering an issue with VB.Net code syntax. The error that I get is "ByRef" is underlined and "Expected Expression" tag shows up when you hover over "ByRef". The "FooDetail.Load" function is written in C# and expects a List object passed as ref...

VB.NET DownloadDataAsync:

Hi everybody, I am having the worst trouble getting around a bug, and am hoping that I can get some advice on this site. In short, I am trying to make an asynchronous web service call from my VB.NET application. But my "client_DownloadDataCompleted" callback is NEVER being called when the download is complete. Here is my complete code: ...

Using System.Reflection to determine ALL references

I am trying to determine every single reference inside a dll with System.Reflection. However, GetReferencedAssemblies only lists the ones in the "References" (visible in solution explorer). I would like to determine references from within the code itself, such as an imports statement. Even things like if/then statements, try/catch, abs...

Why does .net interpret this date as the previous day when assigned to a date field?

I have a date I'm reading from an API in the following format: 2010-03-15T00:00:00-04:00 When assigned to a date datatype in C#/VB.net, it's displayed as: 3/14/2010 11:00:00 PM //Note 3/15 is being displayed as 3/14 why is this displayed as the previous day? Is there a name for the format above? ...

How To Get Classes To Expose The Same Shared/Static Method

I have a base class with several derived classes. I want all of my derived classes to have the same Public Shared (static) method with their own implementation. How do I do this? Is it even possible? ...

Prevent Massive Shadowing Of Methods

I'm in a project where it's pretty much my first time doing all the architecture myself, and I'm running into a frustrating situation. My architecture for forms seems to be correct from a heuristic perspective, but I don't think its implementation is correct. My architecture is thus: Base Class: OrderForm Child Classes: PurchaseOrder...

encrypt and decrypt connection string in XML file

I want to save my connection string in XML file.How to do that?How to encrypt and decrypt that file using VB.Net ...