vb.net

Calling a method from .dll globally in c# application

Hi everyone, I am using a .dll called Kiosk in my application which is resonsible for disabling some keyboard keys. I am doing like this... using Kiosk; ----- public static Kiosk.Kiosk KIOSK = new Kiosk.Kiosk(); ----- static void Main() { KIOSK.Disable(); } I call like this in Program.cs and all other page loads of my form. I ...

itextsharp tutorials for vb.net express 2008?

anyone know if these are available? ...

creating/editing textfile through vb.net

how do i code in vb.net the algorithm below. tnx! Procedure logfile() { if "C:\textfile.txt"=exist then open the textfile; else create the textfile; end if go to the end of the textfile; write new line in the textfile; save; close; } ...

Replace multiple characters in string in one line of code in vb.net

Using VB.Net I'd like to be able to replace a range of characters in a string in a single line of code. i.e. something like Dim charsToReplace as string = "acegi" Dim stringToBeReplaced as string = "abcdefghijklmnop" charsToReplace.ToArray().ForEach(Function (c) stringTobeReplaced = stringTobeReplaced.Replace(c, "")) however, this ...

MsgBox is coming below the Splash screen in VB.NET

I have a splash screen set using the Application Framework. In my main form, I check for some conditions in Load() event of the MainForm and display a MsgBox if some of them fails. But the problem is, the MsgBox comes below the Splash Screen. Is there any way to correct this? ...

Arguments for CloseHandle() winapi call in .net

When accessing the winapi method CloseHandle() via .net P/Invoke, should the argument be IntPtr or HandleRef, and why? ...

Converting vb.net to c#

i tried the code below to convert it to c#. But i am getting many errors when i use it. Like error related to || and && symbols using in c# version. can any one help me to convert to perfect c# code ?? Thanks. Option Explicit On Option Strict On Imports Microsoft.Win32 Imports System.Runtime.InteropServices Public Class Kiosk Im...

How to add data,which is in a gridview column in asp.net

Hi guys, i am using asp.net.In my gridview control i have a column called "TotalAmount".The total amount in this column is to be calculated.How can i do this? Like this:- Col3(TotalAmount) 30 40 30 Total Amount=30+40+30=100 How can i calculate this 100?This is my question. ...

How to fill + one year date from another textbox current text box

hi, I have two textboxes in my vb.net code <tr> <td align="right"> <b>ActivationReqDT:</b> </td> <td> <asp:TextBox ID="ActivationReqDTTextBox" runat="server" Text='<%# Bind("ActivationReqDT","{0:dd/MM/yyyy}") %>' /> </td> </tr> <tr> <td align="right"> <b>DeactivationReqDT:<...

COM object error

The error below prompted me after i installed the program which i have created in vb.net and right after i run a module in the program which runs a DTS in SQL server the error prompts me. Someone know this error? Thanks in advance! COM object with CLSID {10020200-EB1C-11CF-AE6E-00AA004A34D5} is either not valid or not registered. ...

Encrypt in PHP not working as expected...

Hi, I have a very silly situation, i am receiving an encrypted string from VB.NET in PHP. I am able to decrypt the key. But when i want to encrypt the result and get the encrtypted string i get a mismatch. Can anyone help me out please.... Below is the PHP CODE. <?php //$syscode=$_REQUEST['syscode']; //The actual string is "blueberr...

VB.NET and LINQ. What am I missing here?

I'm trying to get this sitemap class working. It appears to use LINQ, which I've never used, but half the fun of programming is learning new stuff! My problem is that I'm getting compile errors where the LINQ code is. VS just doesn't recognize it. I've a reference to system.data.linq, I've an imports system.data.linq, but still where...

why the sql query is different on that linq query when run on c# and on vb.net?

if I run this under c# from p in Addresses where p.Address2 == null select p.AddressID it generate this query SELECT [t0].[AddressID] FROM [dbo].[Address] AS [t0] WHERE [t0].[Address2] IS NULL if I run this under vb.net from p in Addresses where p.Address2 = nothing select p.AddressID it generate this query SELECT [t0].[Address...

Add LinkLables programatcially and show Messagebox on click event

I am adding few LinkLabels dynamically during runtime. I have the IDs of all link labels added to the form. How can I show an error message when a particular linklabel is clicked? For exmaple. Consider 5 Link labels as show below Report 1 Report 2 Report 3 Report 4 Report 5 When LinkLable "Report 1" is clicked. I have to show a Mess...

VB.net: Any problems using a Shared method for getting a db connection?

I have a utility class that creates & returns a db connection: Public Shared Function GetConnection() as OracleConnection dim c as New OracleConnection() ... set connection string... c.Open() Return c End Function Is there any risk of concurrent calls returning the same connection? The connection string enables pooling. ...

What in the world does this code do? (C#)

Hi, I've been reading a book which is in C#. I'm a VB.NET developer (and a very junior one at that) and I'm having a lot of trouble with the following code that contains lots of things I've never seen before. I do have a basic knowledge of Lambda Expressions. public List<T> SortByPropertyName(string propertyName, bool ascending) { ...

Form Post Error

Can anyone explain what might be causing this error. Im thinking its the quotes. Exception Details: System.Web.HttpRequestValidationException: A potentially dangerousRequest.Form value was detected from the client (ctl00$ContentPlaceHolder1$DetailsView1$txtContent="...l economy.<br /><br />The Prop..."). ...

Dates in For Loop in vb.net

Hello, In vb.net I have two data values as shown below: Dim startp as datetime Dim endp as datetime I have a function called ProcessData(soemdate) which processes dataporting. In VB.net is there a way I can do something like For each day between startp and endp ProcessData(soemdate) Next Thanks ...

How to add custom columns to a table that LINQ to SQL can translate to SQL

I have a table that contains procedure codes among other data (let's call it "MyData"). I have another table that contains valid procedure codes, their descriptions, and the dates on which those codes are valid. Every time I want to report on MyData and include the procedure description, I have to do a lookup similar to this: From m in ...

XML Comments <list> not displaying in IntelliSense

I am trying to get VB.NET XML Comments to work with IntelliSense, and maybe it doesn't work the way I think it does. ''' <summary> ''' Gets or sets the Patient Code. ''' <list type="bullet"> ''' <listheader><description>Validation:</description></listheader> ''' <item><description>Field Required</description></item> ...