vb.net

Managing Unicode Data in MySQL and VB.NET

I wish to develop a client-server application in VB.NET. I want to store some fields in Unicode. As per MySQL documentation I tried the fields with varchar and charset UTF-8 for storing Unicode data. I could insert data using the MySQL connector command object but when I try to display data in datagridview some junk is appearing. What ...

Resizing Images in VB.NET

I'd like to make a simple VB utility to resize images using vb.net. I am having trouble figuring out what vb class to use to actually manipulate the images. The Image class and the Bitmap class don't work. Any ideas, hints, tips, tutorial links are greatly appreciated. Thanks. ...

Retrieving Row Data from a Column in DataGrid in ASP.NET

Hello, I've created a Column button in datagrid using this code <Columns> <asp:ButtonColumn Text="Resend" ButtonType="PushButton" CommandName="Resend"></asp:ButtonColumn> </Columns> But I don't know where to access the event of this Button, also I would like to know how to retrive the row data of this button thanks. ...

Explain piece of C# code and conversion to VB.NET

Yesterday I asked this question. Rubens Farias answered it by pointing to this piece of code he wrote. The following part of it cannot be compiled by MS Visual Studio 2010 Professional Beta 2. byte[] buffer = Encoding.UTF8.GetBytes( String.Join("&", Array.ConvertAll<KeyValuePair<string, string>, string>( inputs...

Linq-to-SQL: how to handle database changes

I have several installations of my Linq-to-Sql app running in the field. Now I've created a new version, which adds a new column to a certain table. I've added this column in the dbml file. But when updating the installation, I want to preserve the existing database. How to handle this? Linq-to-SQL doesn't seem to like this inconsistency...

Design for VB.NET scheduler application

I wish to develop an application in VB.NET to provide to following functionality and hope you can give me some pointers on which direction to take. I need some kind of “server” type component which sits in the background monitoring request from users and performing various task. (this component can be install locally or centrally) The u...

Kerning in vb.net

Does anyone know how to change the kerning (space between characters) in vb.net? For example, i would like to change "STRING" to "S T R I N G". If possible i would like to be able to create my own font where i can specify the kerning as i wish! Thanks in advance! ...

Implementing a cell class that has a value property that can be different types

Hi, I am trying to design a table type structure that contains rows and cells. I intend the cell class to have a value property. I'm trying to work out how I can create a value that can return some defined different types e.g integer, single, date, string. I'd like the cell value to be strongly typed, but I am unsure how best to get ...

How to find running processes in VB.NET

Hi, I want to be able to cycle through the active processes on the system and find when my program starts? It has the name 'Calculate Distance' as the form1.vb text. There fore, I want to be able to close a splash screen when the form1 loads. This requires checking currently running processes. How do I do that in VB.NET 2005? Thanks i...

Convert excel spreadsheet into html using vb.net?

I would like to see some code/tutorials on reading an excel spreadsheet (a calender) into VB.NET. I'm pretty much okay from there. I want to convert it to an HTML table and output it into an html file for inclusion on a website. Where can I find tutorials OR can someone post some code with a desciption to get me startd? BONUS: Is the...

Function call spanning multiple lines in VB.NET

Hi All, I have a C# function call which looks something like this: var res = function ("arg1", // argument# 1 "arg2", // argument# 2 "arg3" // argument# 3 ); the list of arguments is around 25 or so. It's a Web Services function, which I have no control over. I'm tryi...

Defining C# enums with descriptions

What would the folowing VB.NET enum definition look like in C#? Public Enum SomeEnum As Integer <Description("Name One")> NameOne = 1 End Enum ...

Can an Interface contain an ENum?

Can an Interface contain an Enum? I am using asp.net 2.0. Suddenly my code started having problems when I added an enum to the interface below. In it, LookUpType is an enum. Public Interface ILookup Property ID() As Int32 Property Text() As String Property Description() As String Property Status() As Status Property...

Why does my counter variable not increment in this VB.NET code sample?

Hi, I have the following code Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click Dim counter As Integer = 0 Dim t As DataTable = DirectCast(Session("MyDataTable"), DataTable) Dim row1 As DataRow = t.NewRow() If (isUnique(t) And counter < 30) Then row1("ID") =...

Connecting to a MS Access database through a function

This is my function: Public Function DBConnection(ByVal path As String) ' This function makes the database connection and returns the object ' to reference it. cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + path + ";") cn.Open() Return cn End Function As you can see, I want to initializ...

upload an image in asp.net vb.net

does anyone know how to upload an image from asp.net using vb.net i need a browse and upload button on aspx side. i already have an image field in the table in sql server 2008. thanks for helping ...

Visual Stuidio Go to Definition (F12) opens Object Browser instead of Code View

I'm running VS2005, and when I right click on an object and select Go to Definition it brings me to the object browser instead of the actual code. Is there some settings that I can change to fix this? Note: it works properly for C# solutions, I am having the problem with Basic. ...

Acrobat Opening in Full Screen Mode

I am having an issue with displaying a PDF in an iframe in asp.net. When the pdf shows up it is showing up without the Acrobat toolbar that allows the user to zoom and print. This is causing a major hassle for our customers because they cannot read the PDF in the size that it is. If you try and set Acrobat to not show the PDF in the b...

stuck while uploading an image file in sql server 2008 from vb.net code

ok so this is the code i used from this site. everything works fine, but i need a little different code to upload image, and i dont know what to do - here's the code - Private Sub btnAttach_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnAttach.Click Dim iLength As Integer = CType(File1.PostedFile.In...

VB.NET difficulties serializing classes with attached events.

Surprised this question has not been asked yet here, but here goes: Serialization in VB.NET is a bit of a pain. If you use the standard Serializable() attribute, and attempt to serialize a class that has events which are attached to handlers, it will attempt to serialize the handlers as well. Coming from a C# background I am not used t...