vb.net

How to dynamically allocate buffer for receiving UDP socket (VB.Net)

A friend and I are working on a project where we're required to build a reliable UDPclient/server using VB.Net. We have things working well, but one thing that still eludes us is how to dynamically allocate a (byte) buffer for the incoming data. Right now we have to hard code a maximum value/MTU (or use a really large buffer size and r...

.Net Regex to parse specific JSON format

I'm writing a little web service which generates SO/SF/SU/MSO user flair in the form of an image with various "themes". I find this preferable to using the HTML/JS solutions offered by SO as it's more flexible and also works better in forum signatures. I'm retrieving the data using the apparently unofficial API (More info here). I can h...

Translate My.Application.Deployment.ActivationUri to C#

How do I translate My.Application.Deployment.ActivationUri into C#? ...

ramdom password generator in vb.net

how to a generator ramdom password in vb.net...can u tel me a any algorithms,any method() or codings to do so .. plz reply me.......mine s a web application were i shd generate password and send it to user .. and tat password wil be their life time password..so it shd b unique too ...

Design Pattern for Custom Events in .NET

What is the proper design pattern for custom events in .NET (VB or C#). Please note I am refering to custom events, where in you override the AddHandler, RemoveHander, and RaiseEvent methods. ...

Page upload data again on page refresh in ASP.NET

For some reason when the user click on the submit button and he re-fresh the page the same data get's uploaded again to my SQL Server 2005 database. I do not what this to happen........... Why is this happening? I am making use of a SQL Data Source!! My code Try 'See if user typed the correct code. If Me.txtSecurity.T...

How to declare a fixed-length string in VB.NET?

How do i Declare a string like this: Dim strBuff As String * 256 in VB.NET thanks ...

What does Static mean in VB?

What does Static mean in VB? EDIT - Code sample for reference Module Module1 Sub Main() Dim a = New Foo Dim b = New Foo Console.WriteLine(a.Boom) Console.WriteLine(a.Boom) Console.WriteLine(a.Boom) Console.WriteLine(b.Boom) End Sub End Module Class Foo Function Boom() As I...

passing a value of a function into a text box

Private Function Token() As String Dim Length As Byte Length = 10 Dim Chars As Char() = New Char() {"a"c, "b"c, "c"c, "d"c, "e"c, "f"c, _ "g"c, "h"c, "i"c, "j"c, "k"c, "l"c, _ "m"c, "n"c, "o"c, "p"c, "q"c, "r"c, _ "s"c, "t"c, "u"c, "v"c, "w"c, "x"c, _ "y"c, "z"c, "A"c, "B"c, "C"c, "D...

All About.... Z-Index?

This property make me confuse. well.. i searched in google: What is the z-index? The z-index property specifies the stack order of an element. An element with greater stack order is always in front of an element with a lower stack order. Note: z-index only works on positioned elements (position:absolute, position:relative, or position...

How to get a datagrid cell values.

Using VB.Net I want to get a all datagrid cell values, then insert into table1. Code cmd = New SqlCommand("insert into table1 values('" & DataGrid.Rows(0).Cells(0).Value & "', '" & DataGrid.Rows(0).Cells(1).Value & "', '" & DataGrid.Rows(0).Cells(2).Value & "', '" & DataGrid.Rows(0).Cells(3).Value & "')", con) cmd.ExecuteNonQuery() ...

Security problem when creating a scheduled task

To create a scheduled class, I call the schtasks command from my code, passing it the necessary arguments. Yet, I can't really figure out how to create a task without the user having to input his password. ...

VB.NET, testing if a dataset contains rows

I'm a complete newbie to VB.NET, how can I test if a dataset has rows? I'm trying to see if my sql procedure call managed to fill up my dataset. Also, is there an easy way to print the rows to a label? ...

Using BackgroundWorker to update ListView

Hi all I am trying to update a listview from my backgroundworker. On the ProgressChanged event, I am passing back ProgressPercentage and a custom object called OperationInfo in the UserState object. OperationInfo has 4 properties: Operation(string), Success(boolean), Count(int), and AdditionalMessage(string) The below code updates my ...

Custom Role Provider with ActiveDirectory Authentication.

Hi, I'm creating a custom Role provider based on the ASP.NET Role provider. I have 3 tables. One for Users, one for Roles, one for UsersInRoles.The Users table has no password column because the users are authenticated with ActiveDirectory. That's my approach so far. I can't get the cusstom Role Provider to work, anyone has the same sit...

Massive memory leak when binding ItemsControl to an Observable Colleciton

I have an ItemsControl in a ScrollViewer. The ItemsControl.ItemSource is set to the Observable Collection. Every time I add an item to the collection, my application nearly doubles in memory usage and eventually after enough adds. Here is a rough sketch: <Scrollviewer Name="MyScroll"> <ItemsControl Name="MyItemsControl"> ...

Returning multiple columns from SQL procedure with .NET

I am using this vb.net code file to call a procedure to get dates (among other things). When I execute this procedure in SQL 2005 Server Management Studio, I get about 10 columns. However when I execute this code, the dataset seems to only have one index value, maybe I am misunderstanding something. When I change this ds.Tables(0).Rows...

Can I use a C# dll with unsafe code in VB.NET?

There is an FastBitmap class for C#, that lets you acces and modify pixel information of am bitmap. I have already used it in some C# project, but I need it now in VB.NET. The problem is that that class uses unsafe code, that is not supported in VB.NET. The question is. Can I compile the FastBitmap class in a dll and use it in VB.NET? ...

DDE - Get Multiple Topics - .Net

If I am working on creating a watch list. What is the best way through DDE to get the name, volume, bid, ask, and last trade? I am going to be using Think or Swim's Desktop software, which only supports DDE. I am using NDDE. I am looking for an answer from this website: http://ndde.codeplex.com/Thread/View.aspx?ThreadId=63269 I am...

Keeping VB.NET vs learning C++

EDITED... I posted a similar question about VB and C#. The question here is slightly different, considering the differences between VB.NET and C++ are greater than those between VB.NET and C#. Do I stick with my sort-of working knowledge of VB.NET and learn it thoroughly or skip to C++? EDIT 2: I am familiar with Actionscript syntax...