Can a VB.NET For loop be constructed that mimics this C# code?
TimeSpan oneDay = TimeSpan.FromDays(1.0);
for (DateTime d = startDate; d < endDate; d += oneDay) {
// some code
}
Obviously you could do it without a For loop (i.e., with a While); I'm just curious if there's a certain syntax to construct a VB.NET For loop with a non-i...
How to make a form as bottom most form in vb.Net 2008
...
I'm playing with a simple string replacement editor for editing VB.Net functions outside of VB. Is there a way to apply VB.Net code formatting to a string?
For example. The txtboxCodeEntry looks like this:
If strVar="dummy" then 1 else 0 Endif
I would like it to "autoformat" to:
If strVar = "dummy" Then
1
Else
0
End If
The f...
I have 2 text boxes one for email and one for Name. If text is entered in email I want to make Name required field. How can I do this using .net validation controls?
Thanks
...
How to make a form as bottom most form in VB.Net 2008 so that if click on this form it should not come in fornt of another window, I want to do this without using 'SetWindowPos' API.
Please suggest-Thanks
...
I want to use mozilla control in my application..
But
when i use Webbrowsercontrol i just use
webbrowser.navigate("http://www.google.com")
but this commant is not working with mozilla control ant when we try to navigate to any web address it gives following exception.
Exception has been thrown by the target of an invocation.
...
Hi,
I'm not really sure exactly how the question should be phrased, so please be patient if I ask the wrong thing.
I'm writing an ASP.NET application using VB as the code behind language. I have a data access class that connects to the DB to run the query (parameterized, of course), and another class to perform the validation tasks - I...
I am trying to test a rest webservice but when I do a post and try to retreive the save the response stream to a file I get an exception saying "Stream was not readable." What am I doing wrong?
Public Sub PostAndRead()
Dim flReader As FileStream = New FileStream("~\testRequest.xml", FileMode.Open, FileAccess.Read)
Dim flWriter A...
I'm creating a search form using an asp:button control with the urlpostback set to a results page. The problem is, the asp:button uses Visual Basic and the search results from Google require Javascript.
Is there a way to take the data from an asp: textbox in VB and then send it to another page that uses Javascript and use the data?
...
Hi,
I added an Access database as a Data Source in VB 2008. I want to query this database and use the information in various ways throughout the program. For example, there is an Employee table with first/last names of employees. I have a combobox on my form that I want to display all of the employees. So I want to query the database fo...
We have a .NET app that needs to examine a folder that may contain COM libraries (DLL and OCX.) When we do encounter a COM library one thing we need to accomplish is to extract the GUID from the COM DLL or OCX.
Is there a straightforward way to do this with .NET without using 3rd party libraries?
...
Hi all,
Because I rush in development (a lot of whip cracking here) and declare my objects at the top of the function and instantiate inside my try-catch block, I get a lot of the good old "object not set to an instance of an object" errors while doing TDD, and later if I do miss a branch that object was used in (doing VB now, would pref...
Okay... I'm writing a .NET CF (VBNET 2008 3.5 SP1) application, which has one master form, and it dynamically loads specific UserControls based on menu click, in a sort of framework idea.
There are certain methods and properties these controls all need to work within the app.
Right now I am doing this as an Interface, but this is aggrav...
I'd like to disable the 'Refresh' option in the right-click menu for internet explorer. Our application uses Javascript, ASP.Net and VB, but I'm sure it'll need to be done through Javascript. Any code snippets would be greatly appreciated.
Thanks
...
Question: How does the .NET regex string to extract IPv6 addresses look like ?
I can get it to extract a simple IPv6 address like "1050:0:0:0:5:600:300c:326b"
but not the colon format ("ff06::c3");
My problem is, it should extract a 0 for every omitted value between the ::
How do I do that?
Below my code + description.
Specify IPv6 a...
I've long since built a way around this, but it still keeps bugging me... it doesnt help that my grasp of dynamic LINQ queries is still shakey.
For the example:
Parent has fields (ParentKey, ParentField)
Child has fields (ChildKey, ParentKey, ChildField)
Pet has fields (PetKey, ChildKey, PetField)
Child has a foreign key reference to ...
UPDATE: I've modified the code to drop the indexes before the inserting, but it makes not difference.
I've been asked to resolve an issue with a .Net/SqlServerCe application. Specifically, after repeated inserts against the db, performance becomes increasingly degraded. In one instance at ~200 rows, in another at ~1000 rows. In the l...
I have a contact manager program and I would like to offer the feature to import csv files. The problem is that different data sources order the fields in different ways. I thought of programming an interface for the user to tell it the field order and how to handle exceptions.
Here is an example line in one of many possible field order...
HI, I have one global generic exception handler(catch ex as Exception) for all unhandled exceptions from application.
But in debug mode(app runs from VS) I don`t want that exceptions go to this global handler.
Better for me is when VS stops app on place when exception occurs.
How can I do this, or is there some better approach for this?...
Hi all,
Well I have read ALOT of posts and I can't quite find the perfect answer to my question, (or I have and havn't realised it!:-))
I have a large csv file that I want to read into my program and sve it to a SQL database table.
I'm useing VB2008 and my dabase is SQL2008.
Any help would be appreciated.
Cheers Cookster
...