vb.net

Asp.net VB KML generation script error

I have to create a .kml file from the SQL 2005 database which contains data about real estate properties. The file name is genKML.aspx Imports System Imports System.IO Imports System.Data Imports System.Data.SqlClient Imports System.Text.StringBuilder Imports System.Xml Imports System.Net Partial Class myCDN_genKML Inherits System.Web...

Asp.net XMLwriter CData Escape Characters

I use ASP.net VB.net to write a XML file. In one of the element which is called "Description" i have to add a "<![CData[Class : <b>Class Name</b><br>Price: 100,000.00]]>". Using, strDes = "<![CDATA[Class : <b>" + myReader.GetSqlValue(4).ToString + "</b><br>Price: " + myReader.GetSqlValue(7).ToString + "]]>" XMLwrite.WriteElementS...

settings colordialog.customcolor to equal form background color

i am trying to set one of the custom colors of the colordialog to be the current background color of the form. i am doing it like this: ColorDialog1.CustomColors(0) = Form1.BackColor.ToArgb it is not working. please help! vb.net code please please note that i only need a specific element to contain the color. not necessarily 0, but p...

Winforms autoheight text area.

I have a richtextarea with a bunch of text in it. I would like to somehow make it expand to fit all the text without showing scroll bars. I would like the width to stay standard and the height to expand. Is there a good way of doing this? I planned on looping through and adding a pixel to its height every time.. and then checking if ...

My.Application.CommandLineArgs - can't open file

I have referenced this thread and the website it points to: http://stackoverflow.com/questions/9161/opening-a-file-in-my-application-from-file-explorer As of now, I can't get My.Application.CommandLineArgs to work properly. Any time I select an file to open in my program I get a windows error forcing the program to close. I only want to...

Drop-Down Image List in Winforms

I'm not sure if a component exists for this or if I'll have to look at how to create one, but here goes... I'm trying to find a dropdown-style list for images I can use in a program of mine. It's fairly simple, just needs to display a few images in a grid with tooltips for each one, and I need to be able to get whichever one was last p...

Not getting value in javascript

hi guys, I have a datalist and in itemdatabound iam calling javascript and passing one argument.But iam not getting that argument in js. <asp:Button ID="btnUpload" runat="server" cssClass="button1" Text="Upload" > <asp:DataList ID="dlView" runat="server" > <ItemTemplate> <tr> ...

How i can call one web page in VB.net when Press CLICK EVENT.???

How i can call one web page in VB.net when Press CLICK EVENT.??? ...

How to integrate JCM World Bill Acceptor using C#?

I have JCM World Bill Acceptor(WBA) and i want to integrate the machine with my software using C#. Any one knows about how to integrate JCM WBA in C# or VB.NET ...

Canceling a While loop prematurely.

I'm using a While loop that loops a certain number of cycles (1-576) based on a value entered by a user. It's activated by the user clicking a "Start" button, But I would like it to be able to be canceled using, preferably, the "Escape" key. However, when the loop is going I can't get the program to recognize any keypresses. Private Su...

Who is better to build Data layer Strongly Typed DataSets or Classes

I used to build data layer by using Classes, however someone suggest to use Strongly Typed DataSets because it's faster in development. The data layer that I'm going to build should support multi DBMS(Oracle,MSSQL, MySQL..). how is better build it by using Strongly Typed DataSets or by using Classes? ...

Help speed up this algorithm? Sieve of Eratosthenes

I've written an algorithm that I believe to be correct for computing prime numbers up to n with the Sieve of Eratosthenes. Unfortunately, this program hangs on really large values of n (try 10 million). Here is what I've written... Protected Function Eratosthenes(ByVal n As Integer) As String Dim maxValue As Integer = Math.Sqrt(n)...

What am I missing out on by only running .Net 2.0 vs 3.5?

It seems that 3.5 was a big leap from 2.0. My workplace is still stuck on 2.0. What kind of fun am I missing out on by not being able to upgrade? ...

Can you embed meta data into a .NET Class?

I want to decorate a VB.NET class with meta data to describe additional information associated with the properties of the class. Also I need this information to be visible through reflelction. Any suggestions? Is this even possible for me to accomplish? Thanks. ...

LINQ to SQL - Select SUM with a WHERE

I'm having trouble getting a Linq to Sql query to work. Basically, I want the sum of a column in a table for only rows matching a certain condition. A simplified version is this: Orders = order that contains products OrderProducts = relational table containing products that are in an order Products = table containing information about...

Convert structure to byte array in .NET

I wish to write a structure made up of fixed length strings to a file using My.Computer.FileSystem.WriteAllBytes or the like. I am using a VB6 project with fixed length strings that I have converted in to VB.Net. Structure Record <VBFixedString(22),System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.Unmanag...

VB.NET Form Hiding Issue

I have a custom form, B. B is created by A, which has a handle to B.VisibleChanged. B only has an OK and Cancel button on it, and I want to do some logic when OK is hit. B's OK button is dealt with like this: Me.Result = Windows.Forms.DialogResult.OK Me.Hide() The code in A is properly hit and run, but it never hides B. When I c...

Color.ToArgb relation between 5046311 and 14221235 ??

the form backcolor is 14221235 , but when i set the customcolor in colordialog to equal the form backcolor, it sets it to 5046311 !!! what is the problem? this is how i am getting the background color: get_background = Str(Abs(Form1.BackColor.ToArgb)) the reason i am turning it into a string is because i will feed it into a string wh...

InsertOnSubmit not triggering a database insert on SubmitChanges

I'm experiencing an odd scenario and I'm looking for ways to figure out what's going wrong. I've got a piece of code that inserts a row into a table - the kind of thing I've done in dozens of other apps - but the end result is nothing happens on the database end, and no errors are generated. How do I find out what's going wrong? Here's ...

why are max values 240 and 239 for saturation and hue?

in colordialog why are these values the max values? to what do they correspond? ...