Hello,
What's the translation of this snippet in VB .NET?
public static IEnumerable<TSource> Where<TSource>(
this IEnumerable<TSource> source,
Func<TSource, Boolean> predicate)
{
foreach (TSource element in source)
{
if (predicate(element))
yield return element;
}
}
...
I'm trying to add a Crystal Report to a VS 2005 VB project.
Here's what I do:
Right-click on my project, Add -> New Item ... Crystal Report
Add a report with the standard report wizard (or just a blank report
I get this error:
'Site' is not a member of 'MyProject.CachedCrystalReport1'
C:\BasProj\MyProject\MyProject\CrystalRepo...
Using VB.net, the following snippet gives the error below.
Dim _account = Account.Find(Function(x As Account) x.AccountName = txtFilterAccountName.Text)
or similarly if I do
.SingleOrDefault (Function(x As Account) x.AccountName = txtFilterAccountName.Text)
will both give the error "The method 'CompareString' is not supported". I...
I'm using TortiseSVN for my subversion client on a Windows Server 2008 box and I've got a folder with code checked out into it.
When I go to open the solution file that's under source control Visual Studio 2008 starts and before it can even finish loading the solution from what I can tell Visual Studio crashes. I'm trying to open a sol...
Having:
<asp:FormView ID="frmEmployee" runat="server">
<EditTemplate>
<asp:TextBox ID="txtFirstName" runat="server" />
</EditTemplate>
</asp:FormView>
one uses FindControl to reference the txtFirstName textbox in the code-behind file:
VB.Net
Dim txtFirstName As TextBox = CType(Page.FindControl("txtFirstName"), TextBox...
Hi,
I have created a database using SQlServer CE with the name of db.sdf using the following code.
Dim connStr As String = "Data Source =\temp\emp.sdf;"
Try
'creating database
Dim engine As SqlCeEngine
engine = New SqlCeEngine(connStr)
engine.CreateDatabase()
engine.Dispose()
...
Hello.
My typical application has a couple of textboxes, checkbuttons, radiobuttons, and so. I always want to load the settings the user used the last time when the program starts, and also want to save the settings as the users clicks "Save settings" or closes the application. When the user attempts to save the settings, I'll have to c...
the following code is supposed to replace the system color that's used for window backgrounds. You'd change it by P/Invoking the SetSysColor() API function. i am using the following code that was suggested to me but unfortunately when i click the button nothing happens!
Imports System
Imports System.Drawing
Imports System.Windows.Forms
...
I've read about it on msdn and on CLR via c#.
My main question about it is the following: let's imagine we have a 2Mb unmanaged HBITMAP allocated and a 8 bytes managed bitmap pointing to it. What's the point of telling the GC about it with AddMemoryPressure if it is never going to be able to make anything about the object, as it is allo...
Ok, I've read a couple of topics about it, but here it goes. Let's imagine I have an application where basically every now and then I will click on a button, a lot of things will happen for a couple of minutes, and then it'll stay idle possible for another hour, or maybe just 1 minute. Wouldn't just after that whole ended a good situatio...
Hi All,
I am stuck trying to work out Events and Delegates. I am trying to hook up to an external API which return events when certain events occur. The original code was written in C#, and I am trying to do this in VB.net
Here is a short comment from the API programmers.
"After that, client app should need to wait for one of events: ...
hihi,
how i clear all data and not delete data or column in datagridview?
i wan clear the data first and query on the result to make the result not duplicate..
can anyone help me??
...
I have a label in a master page (sample.master) called lblHeading.
I want to dynamically change the text of the label when I load the content page.
I need to do this because I want to change the heading to something meaningful but only after I know about the content of the page.
Is this possible?
...
I want to write software in visual basic that reads the barcode of various items into my program. Any suggestions for how to do this?
...
I'm using ASP.Net 2.0. I have a custom control that is inherits from a 3rd-party vendor's control. I'm trying to override the Render method.
Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)
if (some condition is true) then
Dim d As New Button()
d.RenderControl(writer)
else
MyBase.Render(writer) ...
I remember a QuickBasic program (named Gorillas) where there was a monkey who would toss a banana, I believe at another monkey. I want to write this in .NET to learn some. How would I get started doing that?
...
I would like to know if it is possible to parse .eml and .msg files in dot net (preferably from a memorystream) such that I can use them on an ASP.Net page.
...
Hi everyone,
I'm writing software in VB .NET (2005) which uses the Windows user information as login credentials - just the username. I've found Environment.UserName which works for the username (as you would expect).
However, I need more information - I need the full name of the user (as shown on the Start Menu). It seems this informa...
I have a little applet that controls requests from the scanner... Its a canon applet, not opensource.
Question is: Does anyone know of a program that can lock access to running programs or could point me in the the direction of examples where i could write a small applet myself..
I have looked on google but all programs available such ...
Hi I am using visual studio 8, vb.net. I have a picture box on my form, picturebox1
I have a number of image files name image1.gif image2.gif image3.gif etc upto image52.gif
I want to display an image in a picturebox dependant upon a value wich is generated elsewhere in the app, so that if '3' is generated I a picturebox to display ima...