vb.net

Calling Windows API using VB.NET

How to lock the screen (most important), change the sound, lock the keyboard and etc using VB.NNET? I know it's quite easy to do it using C++ .Net ...

How to add unbound check box column to WinForms DataGrid (.NET 1.0, 1.1)?

How to add unbound check box column to databound DataGrid (WinForms .NET 1.0, 1.1)? I cannot add fake column to the data source because it is data view coming from elsewhere. ...

Where should I store configuration information in ASP.net application?

I have an ASP.net application. It resides within another asp.net application. I put my dll in the other apps bin folder and have a subdirectory with my aspx files. I can't edit the main app's web.config. So where can I store configuration settings? For example, this is an app that will get deployed to various clients. I want to store th...

Creating a Pop-Up Calendar in a VSTO Excel Project

I'm trying to use the System.Windows.Forms.MonthCalendar control within a VSTO Excel workbook. I want the MonthCalendar to pop up when I click a button in the ribbon, but so far I can't get the control to display at all. Private Sub DeliveryDateFromCalendarButton_Click(ByVal sender As System.Object, ByVal e As Microsoft.Office.Tools.Rib...

VB.Net Linq - How to append a where clause?

Pretty new to VB.Net. Having a bit of trouble here with something I though should be simple. Keeping it simple. Let's say i have a Document table with "Name" that I want to search on (in reality there are several other tables, joins, etc ..). I need to be able to build the query where clause based on string values passed in. Example - ...

Pattern Books for C# / VB.NET Developers

What would you recommend as the "best" VB.NET and C# books for learning Design Patterns? Preferably books that actually give examples of when to use the patterns. I need to recommend some books to a group of C# and VB.NET developers. ...

NerdDinner Validation Question using VB.Net

Newbie question. I’m writing an ASP.Net MVC app in VB.Net and have been using NerdDinner as a sample (which is in C#). I’m stuck on the validation process specifically the code found in Models\Dinner.cs . I have tried converting it to VB.Net using http://www.developerfusion.com/tools/convert/csharp-to-vb/ but it chokes on the Yield s...

How would one do an inner join in linq to entities?

Given two tables, customer and orders, how would one do a linq query to entities to find any customers with open invoices started before a certain date? ...

Creating a custom control...Cannot create a 'text' property?

Solution I did some googling and found this forum post, and here is what I needed to do: Imports System.ComponentModel <EditorBrowsable(EditorBrowsableState.Always), Browsable(True), Bindable(True), _ DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)> _ Overrides Property Text() As String Get Return ...

Connect to FTP Server with .net 2.0

I'm looking to connect to an existing ftp server, upload a file, wait while the server generates a report on it, and download that report back to the local machine in a vb.net 2.0 winforms project. Is there an existing FTP library that would be helpful to me for this? My task seems simple enough that I'd rather not get into the world o...

Retrieving SWF / FLV dimensions in VB.net

I'm uploading a flv / swf file and I need to capture the dimensions of those files so I could later retrieve it from a database and embed it into a page. Any suggestions of how I could do it in code behind? ...

Are VB.NET Developers Less Curious? Standardizing on VB.NET

I'm asking this question as someone who works for a company with a 70% to 75% VB.NET developer community. I would say 80% of those developers do not know what an OOD pattern is. I'm wondering if this is the best thing for the health of my company's development efforts? I'm looking at the tag counts on: http://stackoverflow.com/tags Ther...

Will VB.NET be phased out?

The question "Are VB.NET Developers Less Curious? Standardizing on VB.NET" made me wonder if VB.net will ever (soon or in 5 years, 10 years, etc) be phased out? Is there any talk or consideration of doing this? I don't know anyone that uses VB.net to do their development. Everything is done in C#... Professionally, I only used VB.net...

LINQ to SQL and Join two tables with OR clause

Let's say I have Plans and Documents Dim myPlans = _context.Plans.Where(predicate1) Dim myDocuments = _context.Documents.Where(predicate2) I have structured the where clause for each using PredicateBuilder. So, myPlans and myDocuments have a correct SQL statement. What I'd like to do is join these two tables into one linq statement. ...

Passing a particular WebControl type as a parameter in VB.net

I'm trying to create a function that searches up a WebControl's parent-child relationship (basically the opposite of WebControl.FindControl(id as String), but looking for a specific WebControl type). Example: I have a user control in an ItemTemplate for a GridViewRow. I'm trying to reference the GridViewRow from the user control. The ...

Linq to Entities Filtering an Entity Dynamic/Strongly Typed

I am binding a Winforms Grid to an entity. (For reasons I won't go into here it must be bound to the entity, not the result a query) The code is as follows: grid.DataSource = myEntities.entityName.Where("it.field = " & field) It works, but it obviously isn't strongly typed. Is there a way to define the Where clause of an entity usin...

Clickonce certificate expired - not signing manifest almost solved it ...

I have a distributed app using ClickOnce. I went to do an update and got an error about the certificate expiring. I noticed on the signing tab that I could uncheck signing the ClickOnce manifests. I did this and successfully published my app. Worked fine for the first 7 users - but just had a user that is getting the dreaded: Manif...

Store and Retrieve values from web.config

I built a small website and there will be only one admin, so in the admin panel I am asking for a password with a value that I do not retrieve from a database, I just hard coded it in the function in code behind, I know this is wrong though I don't know why. So is hard coding it in web.config the right thing to do? and how? ...

Encrypt data in web.config

I have the following line in my web.config <appSettings> <add key="AdminPassword" value="ASDF1234" /> </appSettings> How can I encrypt it? I tried this tutorial but it got me all confused Help?! ...

How to change my Image DataImageUrlFormatString Value inside my GridView in Code?

I have a gridview and the one coulmn is a image column. How would i change the DataImageUrlFormatString value in my code behind? i tried doing this but it does not work....... ((ImageField)(GridView2.Rows[0].Cells[0].FindControl("ID"))).DataImageUrlFormatString = "~/createthumb.ashx?gu=/pics/gmustang06_2.jpg"; ...