vb.net

VB.NET GUI choices

Can you point me to good non-Windows looking GUIs choices for VB.NET? I'm needing free but with licenses that allow closed proprietary code. Thank you. ...

Pass an object into a UserControl in a repeater? .Net 1

I want to wrap up a chunk of HTML render logic in a User Control. Then I want to pass a custom product object (title, thumbnail, id, etc.) to the UserControl that it can use when it renders. Ideally I want to use this in a repeater (or for loop) and pass the current custom product object into the UC. Every example I've seen has been pas...

How to handle KeyDown in VB.NET

Ok here's my dilemma. here's this code I have: If e.KeyCode = Keys.A Then TextBox1.AppendText("C, ") PictureBox2.Visible = True My.Computer.Audio.Play(My.Resources.C, AudioPlayMode.Background) End If Now when I enter this under Form1_KeyDown, visual basic thinks this: 'KeyCode is not a a member of 'Syst...

How to approach refactoring a class? (VB.Net)

I recently started a project and needed to do some integration with LDAP via DirectoryServices. I've done this in other apps so I went into one of them to see how I did it -- why reinvent the wheel right? Well, while this wheel works, it was developed years ago and kinda smells (it's wooden, firmly attached to the previous vehicle, har...

Strip double quotes from a string in .NET

I'm trying to match on some inconsistently formatted HTML and need to strip out some double quotes. Current: <input type="hidden"> The Goal: <input type=hidden> This is wrong because I'm not escaping it properly: s = s.Replace(""",""); This is wrong because there is not blank character character (to my knowledge): s = s.Rep...

Change size of image control in javascript

I want to change the size of the images in javascript onmouseover. Dim files As String() = Directory.GetFiles(Server.MapPath("~/Folder1/Folder2/"), "*.jpg") For Each File As String In files File = File.Substring(File.LastIndexOf("/") + 1, File.Length) 'Response.Write(File & "<br>") File = File & "~/Folder1/Folder2/" D...

Problem with RDPSND.DLL

Hello, I have an application in Visual Basic, using .NET Framework 2.0. This application is run at the client site on thin clients using Windows Terminal Services. It is a sort of Point-Of-Sale, and makes a sound when a item is successfuly scanned. In remote desktop, we have enabled sound to be carried to the local computer. It has be...

How do I refer to a windows form control by name (C# / VB)

Suppose I have a label control on a windows form called "UserName". How can I refer to that label programmatically using the label name? For example I can do: For each ctrl as Control in TabPage.Controls If ctrl.Name = "UserName" Then ' Do something End If Next This seems quite inefficient. I would like to do something like: TabPage...

Ways to go about resizing controls in resizable windows?

I have two DataGridView controls, with three buttons in between them vertically, in a VB 2005 form that need to be resized and moved around on a form resize. The code below works, and does what I want. It takes the difference between the new size and the default size, splits the height difference between the two DataGridViews, and move...

How can I specify a printer other than the default printer?

I'd like to be able to specify two different printers for two different jobs. I'm using the following class to handle printing these, but regardless of what I do, the default printer is always the one that's printed to. Public Class Receipt : Inherits Printing.PrintDocument Private _font As Font = New Font("Courier", 8) Private _text As...

Getting subject line of e-mail using webDAV and .NET

I need someone more well versed in this area to re-title the question I am trying to learn more about webDAV and .NET. I have written an app that needs to pull all e-mails from an inbox on the server. I need to load these e-mails into an object that has the following properties: - From - To - Subject - Body I found a VERY he...

Radpanelbar collapse/expand issue

Guys, I am having an issue with Telerik's RadPanelBar control. I have the Q1 2009 version of the controls. I have the follow ASP.NET code: <telerik:RadPanelBar Width="297px" ID="RadPanelBar1" runat="server" Skin="Web20" AllowCollapseAllItems="True" ExpandMode="SingleExpandedItem" PersistStateInCookie="True"> <Items> <tel...

color chooser (color palette) showing all colors

i would like to have an image like this one on my form. http://www.asptemplate.net/colorpalettegenerator/screenshot1.jpg depending on where the user clicks, i would like the background of the form to turn this color ...

.NET application for blackberry?

i have a very simple winform application in vb.net and i was wondering how do i make it work on blackberry and other PDAs? ...

Trouble with changing text on a textbox in vb

Hello I am having a problem changing the text color of a textbox in vb I know that changing is like this Textbox.ForeColor = Color.Red when I do this it doesn't change anything still gives me the same black color . Also can it be because it in read only or is there some wrong with visual studio or My project Edit: I am using VB 9 or ...

Free Plug-in to show caller-functions in vb.net ?

Hello, very often i see code written from others, and when browsing over a function i want to see where this function is called from. Even when i debug my own code, i'd find it a useful feature:P In c++ this feature is default in visual studio(its called browse-something), but i havent found any such thing for VB.NET yet, any ideas? ...

Hooking in to the Application.DoEvents method in VB.NET

I am not very familiar with VB.NET so I don't know if this is possible... Some code I am working on is setting the properties of a very large class. In the setter of each property an event is raised to indicate that the class data has changed. An event handler then serializes the instance of the class to a database. Obviously I do not ...

Change properties of an unknown object in VB.NET

I have a sub that handles when 14 ComboBoxes have their Index changed. I am able to cast the sender of the event, and obtain properties from there. However, after that, I want to be able to change the properties of the actual sender, rather than the cast one. How would I do this? Current code: Private Sub ComboBoxIndexChange(ByVal send...

Need to draw to 800*800 pixel box on screen efficiently

I need to draw 100 lines between 100 semi-random points in a 800x800 pixel square on the screen. I've been using the built-in drawlines & drawrecangles functions inside of .NET, but my drawing gets erased everytime the form paints. So, I've been thinking about perhaps drawing to an in-memory bitmap, but I'm not sure if that's a good so...

.NET multi-threaded variable access

I have an application with 4 threads. (GUI, Controller, Producer, Consumer) The GUI is self-explanatory. The controller starts the producer and consumer threads after some intial setup. The producer creates items and places them in a free slot in a "ring buffer" The consumer takes items from the "ring buffer" and writes them to disk....