vb.net

Issue with passing parameters by reference into public shared methods

I have a List(Of AddlInfo) with AddlInfo being an object. I'm trying to pass addlInfoList by reference into a function of another class: Public Shared Sub SortAddlInfo(ByRef addlInfoList As List(Of AddlInfo)) addlInfoList.Sort(AddressOf Comparer) End Sub Private Function Comparer(ByVal x As AddlInfo, ByVal y As AddlInfo) As Intege...

How can I set the tab order in VB.NET?

I have a bunch of buttons on a form and when the person presses TAB I want the focus of the controls move in a specific order. Does anyone know how to do this? ...

WebBrowser Control is Running into Javascript Error that IE doesn't...

If I use IE I can visit the website I want and click the 'Next' button and life is good. If I open that same website using the webBrowser control and click the 'Next button I get a javascript error message. I'm not doing anything in the code to manipulate the website. My goal, eventually, is to have some level of automation; but at th...

itextsharp: setting dimensions of image manually

the user will pick an image on their hardrive and i will put it on a pdf file using itextsharp with vb.net. how do i manually set the dimensions of the picture? ...

Arbitrary precison floating types in .net. Any library that allows that?

Hello, I need to do maths on both floats and integers with much bigger accuracies and magnitudes than offered both by int/float/double in .net. Are there any libraries around that help with that? I recall there was something like that for c/c++. ...

.NET - multi-threaded iteration over a single List (Of T) - What do I need to watch out for?

I'm using VB.NET. I want to build a large List (Of MyClassOrStructure) that becomes static after its initial population. I'm going to have multiple threads that need to iterate through this list to read data (no writing, inserting, or deleting) Are there any very bad things that I need to keep an eye out for? Thanks. ...

.NET - SQL Select --> Array. What is the fastest way?

I'm using VB.NET. I am performing a select query that returns approximately 2500 rows, each containing 7 fields. I am using a SqlDataAdapater and filling a dataset with the single table returned by the Select query (from the local database). (I only perform the data-retrieval once (see below) and I don't even start the StopWatch until...

How to stop a PDA sleeping

I have an application for PDAs with a long running process, and I'm getting the problem that the PDA is going to sleep before the process has completed. I haven't got any control over the power settings on the PDA, does anyone know a good way for my application to stop the PDA from going to sleep? Many thanks ...

how do i get the Port from an in_addr value?

hi, I am trying to extract the port from a given in_addr value in windows. So far I am able to get the IP address using inet_ntoa but not the port. Thanks. ...

Visual Basic (Visual Studio 2005) redirect inputstream to process

Hi, I've been searching around the net for roughly three hours now w/o getting forward. I don't know VB very well, but I need to create a wrapper program for any executable that logs the arguments, all input, output and err information: My wrapper is called: e.g. someApp.exe arg1 arg2 Logs to someApp.log: arg1 arg2 Calls original execu...

Creating expiring links to S3 or Cloudfront hosted content with ASP .Net

Anyone have an example of creating a signed URL with an expiration using ASP .Net? I'm exploring using LitS3 or ThreeSharp in my project, and have not seen any specific methods to do this in either of those projects. Thanks. ...

What is the advised way to make an empty array in VB.NET?

What is the best way to take an array in VB.NET which can either be Nothing or initialised and give it a length of zero? The three options I can think of are: ReDim oBytes(-1) oBytes = New Byte(-1) {} oBytes = New Byte() {} The first example is what most of the developers in my company (we used to do VB 6) have always used. I perso...

ASP.NET - How to edit 'bit' data type?

I am coding in Visual Basic. I am using a checkbox control. Now depending on its checked property I need to set/unset a bit column in a SQL Server database. Here's the code: Try conSQL.Open() Dim cmd As New SqlCommand("update Student set send_mail = " + _ sendemailCheckBox.Checked.ToString + " where stud...

wordwrap problems on a webpage

how do i make sure that on my forum when people submit posts, i do not have this problem of a HUGE unwrapped string as seen on this posting: http://stackoverflow.com/questions/1607047/best-practice-for-developing-webpage-for-mobile-phone ...

Methods of Displaying/Printing VB.NET program results of numeric analysis?

I am writing a VB.NET Windows Application which takes numeric user-input and performs a complicated calculation, yielding many numeric output variables. Previously, I wrote a similar program in VB6, which output the results to a rich text box using fixed-width font in order to organize data in columns and used asterisks to delineate tabl...

[ADOX] VB.NET -> C# Syntax problems

I want to create a new MS Access database table using ADOX. On this page, is code in VB.NET, but obviously it's not working in C# (when I want to "convert" the code). I'll be grateful if someone converts it correctly. ...

Textbox Hell - Delete 3 Lines, Skip 1, Repeat

I have a textbox that reads like so: Line 1 Line 2 Line 3 **Line 4** Line 1 Line 2 Line 3 **Line 4** (repeats...) How can I use VB to loop through the textbox, deleting Lines 1, 2, and 3, skipping the fourth, and repeat? Or, rather, record every fourth line into a new textarea? Thanks! I'm SO lost! ...

bit pack Int16 into a Ushort VB.net

I have to pack and unpack a 16bit Int from/into a Ushort in VB.net This is how I thought I could do it (doesn't work, gives me overflow exception) 'Pack Int16 into ushort ' Dim usPacked = CType(Data, UShort) 'unpack Int16 from ushort ' Dim unpacked = CType(data,Int16) Thanks! ...

VB.NET 3.5 SocketException on deployment but not on development machine

I have written an async UDP client to talk to a server at my company. When I run on my developer machine all is well. When I deploy to another machine I get a socket exception on EndReceive the first time I send data over the socket. My dev box is Win7 and I have deployed to both an XP SP3 machine and a Server 2003 R2 machine. Below ...

Shared method in VB.NET cannot handle this why?

(I tried with this question but this code isolates the problem better.) I have this code: Public Shared Sub PopulateTextFields(ByRef stuffList As List(Of Stuff)) Dim aStuff As New Stuff For Each aStuff In stuffList DoStuff(aStuff) Next End Sub Private Sub DoStuff(ByRef theStuff as Stuff) .... End Sub I get th...