vb.net

How to convert an image in to a stream of characters

I have found that an image can be stored as some string .To give an example I have included a ms word part that has an image.I saved a word file with image and saved it as xml format .when i opened the xml file in a notepad i got following section .It must be the image being stored as some stream of text. Is there a similar way to do it ...

extension methods from C# dll doesn't work as extensions in VB.NET

actually I don't know whether they should work I made a library in C# and I've been told by people that one of mine methods don't work in VB.NET as extension http://valueinjecter.codeplex.com/Thread/View.aspx?ThreadId=227498 this is the method: public static PropertyDescriptorCollection GetProps(this object o) { return GetProps(o.G...

show image onclick javascript

Hi, How can i load the original image when the tumbnail version of the image has been clicked? Im using ASP.NET in combinaton with javascript. The original images are big, so they have been scaled on server side. This makes the site load faster. But somehow, both versions (original and tumbnail) of the images are being downloaded. I'm...

Pieces required for a usable MVVM Framework

Hi all, As my company migrates towards the .NET framework from VB6, it looks like we are going in the direction of WPF (my boss is in love with the Office-style Ribbon control). I've been working to mock one of our VB6 applications in WPF and decided to experiment with MVVM at the same time. I'm being discouraged from using an existin...

Line Graph in windows form app in vb.net

Hi, using vs2008 I am trying to create a line graph using vb in a windows form. I have dragged a chart onto the form, and via the properties window, through the series option have changed the type to the graph that I want, which is line. But all the time the data is displayed as a simple bar chart. How do I remedy this please to get the ...

Using System.IO.StreamWriter to write another line

I need to update the students score with a new score but I cant get it to write to the line that the students current score it at. It just deletes the whole text. Alex,letmein,0 David,qwerty1,0 John,password,0 Paul,lion,0 Luke,bennett,0 Ronald,Mcdonald,0 Erin,german,0 Laura,Scotland,0 Ross,extra,0 Alan,beverage,0 Try fileName = "C:\Do...

Reading large csv files

Which is the most performant way to read a large csv file in .NET? Using FileStream? or another class? Thanks! ...

Canceling a TabControl tab selection in VB.NET

Really wracking my brain here and I'm sure it's something simple I'm missing. Basically I have a form with two tabs. I'm checking the controls on each tab to see if they're dirty and want to prevent a user from clicking a tab if there are changes on the current tab. I had thought if I check the dirty variable and just set the tab inde...

Help with refreshed ASP.NET page clearing public array

Hey all, i am new at everything VB.net/ASP.net so i need some help with a problem i am currently having. I have an ASCX.vb page that lets the user choose someone from a table. Once they do select someone, the page reloads with that persons information into another table below that one where they can submit an order for that person or re...

How do I utilize string "*" or "\" as mathematical operators?

I want to use "*" or "\" as mathematical operators as such: "I am going to clarify" dim tbox as textbox tbox.text = "*" dim i as integer = 8 tbox.text 3 "End Clarify" dim [mult] as string = "*" dim [div] as string = "\" dim i as integer = 8 [mult] 3 and the result would be i is equal to 24 or dim i as integer = 8 [div] 2 ...

VB.Net Keyboard Shortcut to auto-generate a Property

As the title suggests I am looking for the key sequence to generate the standard Property syntax in a vb.net class. Example below so there is no confusion on what I am asking for. Thanks in advance! Public Property MyProperty() As String Get Return _MyProperty End Get Set(ByVal value As String) ...

VB.NET pointer interop question

I am trying to write a VB.NET program that will call a function in an unmanaged C DLL passing the structure like this: typedef struct { unsigned char *msg; int msglen; } What I have not been able to figure out is how to handle the "unsigned char *msg" part. How would you define this in the VB.NET Structure? ...

Dynamically created elements from codebehind need to be inserted between specific elements

I created a method and pass the element type, id, and any inner text that instantiates a new html element. The last statement: Me.Controls.Add(element) adds it to the end of the page, but I would like it to be inserted in a specific position (between 2 divs within a form). What I am describing is very similar to this post on SO here, alt...

filesystemwatcher.filter appears to be case sensitive (but only on our 2003 servers)

This is utterly baffling to me. I have a service with an array of file system watchers, the path and filter of each set at runtime. Protected Overrides Sub OnStart(ByVal args() As String) Dim l As String = ConfigurationManager.AppSettings("dirs") Dim x As String = ConfigurationManager.AppSettings("extensions") Dim locs() As...

Lua in Visual Basic.net

I'm trying to just get a VB.net app to be able to execute a lua script in a external file, and be able to add some functions to lua too, To do this I have this code: Imports LuaInterface Public Class Form1 Public luascripting As New Lua() Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Butto...

problem with linq to sqlite

I am using vb.net sqlite.net and dblinq0.20.1 to search a sqlite table on a primary key field. My code looks like this Dim blb = (From d In db.Data Where d.UID = myuid Select d).Single This returns the error "Coalesce used with type that cannot be null" If I search on a nullable field it works fine. Anyone come across this error ...

Deploying a VB.NET application with forms that contain the DataGridView control

Trying to deploy an application written in VB.NET. First had an issue with not including the PowerPacks (what is in this anyway?) but that went away and the application installed correctly once I included it as a prerequisite. Now however once the user logs into the application the main menu just bombs, doesn't even load, the app just ...

Check for a value in ViewState

Hey all, i am new at the ViewState and i am looking to see what values are stored within it. I know how to loop through an array to check for a value but i do not know how to go about doing that for a ViewState("test") property. Let's say i have added "bob, tom, Jim" to a ViewState called ViewState("test"). I would like to be able to se...

VB.NET Generic constraints and subclasses

Consider the following extension method: <Extension()> _ Public Function Satisfies(Of T)(ByVal subject As T, ByVal specification As ISpecification(Of T)) As Boolean Return specification.IsSatisfiedBy(subject) End Function This works as expected if subject is the exact class being operated on by the specification. H...

How to protect my .net winforms assembly from customers of a customer.

This question appears to have died, so I've decided to offer a bounty. What I'm most interested in knowing is if my scenario in the ETA1 below is viable and is used. If it isn't, then a good explanation of why not would be a good answer. Another good answer would be an alternative (but not including the internalsvisibleto attribute). T...