vb.net

Checking a set of listbox items against a text box vb.net

Hi all I have this code to check if an item from a textbox is in a listbox and its giving me the error at the bottom. Any ideas what im doing wrong? I copied it from another part of my project and it was working for that part so I cant see whats wrong. If LocationsSearchTextBox.Text <> "" And LocationListBox.Items.Count > 0 Then...

Form tag in view

I am planning to rebuilding the code of one asp.net project to another asp.net project. but i am stuck some where ... i drag and dropped the master page and the views (4 nos) into the master page. Now i need to recode what is there in the view using designer Shown below the code inside the first view. How i could recreate it using th...

OutOfMemoryException with Image.Clone - Only on Windows 2003

So here's my issue. I have an image that I need to shrink. The original image is a grayscale PNG, which isn't a huge issues except that when I shrink it down, the thermal label printers pickup the artifacts and print them on the label. So, what I did was change the image to black & white (Format1bppIndexed) before resizing, like this:...

.hgignore for VB.Net (Express)?

Hello I didn't see a question on this subject in the archives, so here goes: For those of you experienced Mercurial users, is this a correct .hgignore file to tell VB.Net Express to ignore files/sub-dirs when adding items in a new repository? bin obj temp *.user *.suo *.ncb Thank you. ...

Exception on ExecuteReader() using OleDbCommand and Access

Hi again all, I'm getting the error below for this SQL statement in VB.Net 'Fill in the datagrid with the info needed from the accdb file 'to make it simple to access the db connstring = "Provider=Microsoft.ACE.OLEDB.12.0;Data " connstring += "Source=" & Application.StartupPath & "\AuctioneerSystem.accdb" 'make the new...

How do I make a form modal in Windows Forms?

I'm trying to create a child form that helps the user to enter data for a field in the parent form. I want this child form to be modal, but I don't know what I need to do to make this form modal. Perhaps there's a different type of item I need to use; if so, let me know. ...

Translate from C# to VB

How do you convert the following c# code to vb.net? private static readonly ICollection<string> _skipHeaders = new[] { "Connection", "Keep-Alive", "Accept", "Host", ...

Storing an object to use in multiple classes

I am wondering the best way to store an object in memory that is used in a lot of classes throughout an application. Let me set up my problem for you: We have multiple databases, 1 per customer. We also have a master table and each row is detailed information about the databases such as database name, server IP it's located and a few ...

A way to remove selected LineShape shadow effect?

Is there a way to remove the LineShape shadow effect when selecting the lineShape? I tried Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs) Dim g As Graphics = e.Graphics g.SmoothingMode = SmoothingMode.AntiAlias Dim oldmode As SmoothingMode = g.SmoothingMode g.DrawLine(_Pen, X1, Y1, X...

vb.net program cannot connect to wampserver

I have a vb.net program that uses mysql as its database. And it works when the computer has wampservr installed. But the program gets an unhandled exception error when the computer where its running does not have a wampserver. The only thing that is installed in it is the mysql connector net. How do I make it work. I just want the two pr...

How to override event on a UserControl

Hello! I have a WinForms application (OwnerForm) with some UserControl. When textbox of UserControl is changed, I want to filter content of a OwnerForm. But how can I make it? I don't want to specify OwnerForm inside the user control. I know a solution to add manually handlers for MyUserControl.tb.TextChanged to some functions on a o...

creating windows movie maker in vb.net

how can create a windows move maker like application in vb.net.... if we want to create a media player than we can i add windows media player in our forms is there any way to add windows movie maker in our forms... ...

Convert an interface's event from VB.Net to C#

Hi, I'm struggling to convert the below code to C#. Class Class1 Implements IMyInterface Public Event MyEvent(ByVal sender As Object, ByVal e As MyEventArgs) Implements IMyInterface.MyEvent Public Sub New() AddHandler Me.Slider.ValueChanged, AddressOf OnSliderValueChanged End Sub Private Sub OnSliderValueC...

Getting Data from WinForms ListView Control

I need to retrieve my data from a ListView control set up in Details mode with 5 columns. I tried using this code: MessageBox.Show(ManageList.SelectedItems(0).Text) And it works, but only for the first selected item (item 0). If I try this: MessageBox.Show(ManageList.SelectedItems(2).Text) I get this error: InvalidArgument=Value ...

Asp.net cached objects staying in memory

I have a asp.net web forms app that uses System.Web.Caching.Cache to cache xml data from a number of web services for 2 hours. webCacheObj.Remove(dataCacheKey) webCacheObj.Insert(dataCacheKey, dataToCache, Nothing, DateTime.Now.AddHours(2), Nothing) Every 90 minutes a Microsoft Search Server hits a particular (spider) page which ...

How to pass data from view to UserControl in ASP.NET MVC?

Say I want to do the simplest of the data passing as follows : <% For i = 0 To 10%> <%Html.RenderPartial("MyUserControl")%> <% Next%> What I want to do is to pass the variable i as the parameter to the UserControl so that it displays the number inside a, say, bordered div. How is this possible? Thanks ...

Pass string to Dialog in VB.net

I have a form and from this I call dialogPrintDiet.ShowDialog() which launchs my dialog. I need to pass a string value and need the easiest way to do this in VB.NET Thnaks ...

What are some good/reputable/widely-used libraries written in VB.NET?

Question: What are some good libraries that've been written in VB.NET? The best would be open source, as that would allow interested developers to take a look at some good VB.NET code and see how the language can be used effectively. But I'd be interested to know about any libraries at all, particularly reputable ones. Long-winded expl...

After which event should I perform an action after editing a cell in a DataGridView?

I have a WinForms DataGridView control on a form. There are two fields in this DataGridControl: Email Address Resolved Email Address (calculated based on the input in Email Address) After the user inputs or changes a value in Email Address, I want the value in Resolved Email Address to update based on a separate method. What event ...

LINQ-to-XML Error "is not a member of 'String'"

The following code returns the error from the For Each loop. I have similar code that does not return the error. 'DisplayTitle' is not a member of 'Sting' Dim evXML As XDocument = XDocument.Load(Server.MapPath("~/App_Data/event.xml")) Dim sbEventDetail As New StringBuilder() Dim summary = _ From sum In evXML.<root>.Elements() _ Select...