vb.net

Proper way to pause a System.Timers.Timer?

I'm looking at how to pause a System.Timers.Timer and I cannot figure out the proper way to pause it without resetting the timer. How to pause it? ...

How should I best query my dataset from VB.net?

I have a VB.Net data set that contains data from multiple tables. Does anyone have any good suggestions on how to query data out of the dataset. I want to run SQL-like queries on a dataset to extract data that fits a certain "where" statement. ...

Get event parameters via reflection

Hi, I can't work out how to get the parameter types for an event. For instance, I can only see using a MethodInfo to get parameters, but I have either an EventInfo or a FieldInfo. What I want is to be able to get 'Boolean' from this: Public Event EventName(ByVal sender As Object, ByVal value As Boolean) I could theoretically try so...

Getting This project doesn't have any tests error in cc.net

I am getting the following Warnings while running tests using cc.net c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets (,): warning MSB3245: Could not resolve this reference. Could not locate the assembly "nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"...

ASP.NET Get Original Text of Label

Is there any way to get the original text from a Asp:Label on a page, after the text has been altered? with the orginal text i mean the text that is hard coded into the asp.net markup. ...

using dataadpter how to update data in database

using dataadpter how to update data in database ...

.NET Multi-Select Listbox - How to get Item just selected ?

In .NET there doesn't seem to be a property to find the item just selected in a multi-select listbox; SelectedIndex always shows the first selected item. From memory VB6 had the ListIndex property that changed accordingly... Why remove a useful property ?! Duplicate: How to get the last selected item in multiselect ListBox? ...

What is the difference between My.Computer.FileSystem.MoveFile and File.Move

The question says it all really. What are the differences between these two methods that appear to carry out exactly the same function? Is there guidance to say which should be used or are there conditions when you may use either? ...

Is there an in depth guide to application configuration for .NET?

Does anyone have or has anyone come across an in depth guide to the .net app.config? I'm having significant issues trying to find a definitive guide to this area of .net. I can already handle custom configuration sections, from basic key/value pair settings right through to complete custom configuration handlers which I struggled to fi...

Convert List to String

Sorry, todays silly question (and easy points) but whats the best way to convert a list(of string) to a string with the values seperated by , Sorry .... ...

What language do I use for my project?

hi all! I'm going to advise a company on a project soon, and I'm not too sure about what programming language I should advise. It's a fairly straightforward (desktop based) application with a central datasource on the network, for storing and editing parts that make up a machine. The machine needs to be configured in the application, a...

How do I search the collection of a collection in my LINQ Where clause?

I've got the following ADO.NET Entity Framework Entity Data Model: I want to find all the Policyholders with both a Service of a given Id and also a Keyword of a given Status. This LINQ Does Not Work: Dim ServicesId As Integer = ... Dim KeywordStatus As Integer = ... Dim FoundPolicyholders = From p As Policyholder In db.Policyholde...

Accessing HTTPS site through Proxy Server

I am adding code to use a proxy server to access the Internet. The code works fine when requesting a file from a normal (HTTP) location, but does not work when accessing a secure location (HTTPS). This is the code that works just fine: URL = "http://UnSecureSite.net/file.xml" Dim wr As HttpWebRequest = CType(WebRequest.Create(URL), Htt...

Is it possible to set the image alignment of a PictureBox in VB.NET?

I have a PictureBox that is docked in the upper left corner of a form. It is contained inside of a SplitContainer, and the PictureBox is set to Fill the side of the panel that it resides: SplitContainer: ___________________ | _________ > | | | > | | LogoBox | > | |_________| > |___________________...

Excel Automation question - how to just say No

I'm working on a vb.net console app that opens a number of spreadsheets one by one, reads in a couple cells and closes the file. Some of the spreadsheets have formulas that Excel recalculates when I open the file, and I'm getting a dialog box asking me if I want to save changes to the spreadsheet when I close it. Message: "Do you wan...

Using Selection.Find in Microsoft.Office.Interop.Word to find tracked changes in a document

I am currently using the code below within a VB.Net application to find specific text in a Word document. The text is surrounded by symbols represented by the character codes in the .Text statement. The code below is working fine. The issue now is that sometimes the desired text within a document has been marked for deletion and appea...

Get Current Windows User VB.net

I have tried multiple ways of grabbing the username of a current logged on user in vb.net/asp.net. I am running it on IIS 6 and understand that it will return NETWORK SERVICE for the username. I need to grab the username of the actual windows box log on. I have tried the following code: Returns NT AUTHORITY\NETWORK SERVICE Dim User =...

Not getting correct time from UniversalDateTime

I send a vcal through mail in web application with convert datetime to universal datetime. If i run web application locally (local sevser in India) i get correct time in my vcal. But run appication live (server in US) then not get corret time with a difference of 1 and half hour.Please suggest me. code : Dim result As StringBuilder = N...

How do I dynamically change text color using VB.NET in SSRS?

I am using the below code to dynamically change the text, but I also need to change the color from black to red of the entire row in SSRS, using VB.NET. However, row.Cells.Style.ForeColor = System.Drawing.Color.Red does not work. Any ideas on how to dynamically change text color in a particular row? Public Shared Function ChangeWord(B...

Group properties in a custom control

Hello, In our IDE, for example, Visual Studio, if we display the properties of a System.Windows.Forms.Button control, we see some properties that expose anoter set of properties. For example: FlatAppearance, Font, Location, Margin, etcetera. I would like to do something similar in a custom control. I know the code behind is wrong, but...