vb.net

Vb.net code to set Compact property of Ms access Database

I am creating a database from vb.net code and while creating itself i want to set the compact property of database so the next time i need not open it and compact it or run a separate code to compact it. I browsed the net but i got source code which will compact the database but not set its compact property(the one we find in Tools>op...

Validations not working

I have few text boxes which has required field validation. In the same page there is a back button and next button. When i click in the back button the validations are working, when i click on the next button validations are not working (means the form is moving to the next page) Please help me to rectify <%@ Page Language="vb...

Validation button problem

I have few text boxes which has required field validation. In the same page there is a back button and next button. When i click in the back button the validations are working, when i click on the next button validations are not working (means the form is moving to the next page) <%@ Page Language="vb" AutoEventWireup="false"...

Timer stops with WebRequest in vb.net

I have a timer that is checking to see if a web page exists every 3 seconds. If the page exists it calls a method, if it doesn't, another method. webReq = WebRequest.Create("websiteaddress") Dim webResponse As HttpWebResponse webMessage = "" 'Get the response. Try WebResponse = CType(webReq.GetResponse(), HttpWebResponse) Catch ex A...

DataGridViewCell Background Color Change Without Losing Focus

In VB .Net 3.5, is it possible to change the color of a DataGridViewCell (unbound) to a different color and have the cell visibly change before losing focus or leaving the cell? I have a timer that's running that queries with the data present and I'd like for the colors to change immediately instead of after the user leaves the cell. I'...

Why same dll exposes different classes in C# and .net

I am using a third party .Net dll in my code and when I add a reference to this dll from a VB.Net application it shows different classes in intellisense and object browser than when I use it in a C# project. Why is there this difference? Edit If designer intended it that way I'd like to know how to do it in my own dlls. ...

iTextSharp units

Hello, Anyone knows what unit system does iTextSharp uses? My first assumption would be pixels but I'm not sure about it. Thanks! EDIT: Sorry to not being more specific, and thanks for letting me know. I'm talking about units for measures in the PageSize and Margins. ...

What is the model VB.NET sample app?

I'm looking for an open-source VB.NET app that demonstrates a lot of .NET's power, ideally something that works fully offline. Maybe some of you have encountered an amazing utility app on CodeProject? ...

What is strong naming and how do I strong name a binary?

I heard somewhere that I need to strong name my binaries before I distribute them. Any ideas what this is? ...

create a folder in a networked system from another system

i want to save a jpeg file from one system to another system which is connected through network.its in a windows application.my target system's name is "abc".how can i do this ?if anyone knows please help me.thank you. ...

picture is used by another process

in my windows application there is a image saving process.i can save different images.the images details will seen in a grid ,when i click the corresponding row in grid the image will shown in a picturebox.i want to delete the open picture by pressing the delete key.i used the "deletefile(path)" code for this operation.but there is an er...

Facebook Connect Email hash function for vb.net

Does anyone have a working class or function to create the hashed email that is sent to facebook to register email addresses with connect.registerUsers? ...

Date Format Problem

Hi, i cant change date value to the format which i want.This is my code.When i execute this code,i see mydate as mm/DD/yyyy format.what do i miss? Dim dateString As String = Date.Now.ToString("dd.MM.yyyy") Dim myDate As Date = Date.ParseExact(dateString, "dd.MM.yyyy", Nothing) ...

selectionindexchange event in Gridview

Hi All, I have a combo box column in vb.net datagridview . i want to perform some validation like to put some values in another text column of Grid on selectionindexchanged event of a combo box in datagridview. but unable to do so. Any Help appreciated. Thanks in Advance. ...

Converting a DataGridViewRow to a DataRow

I've seen solutions to this else where, but they all use the idea of setting a DataRowView equal to my DataGridViewRow.DataBoundItem, then using the DataRowView.Row property (In my code below). Here's my code: Dim tblTemp As New DataTable() Dim row As Windows.Forms.DataGridViewRow Dim rowView As DataRowView For Each row In grdLabels.S...

VB.NET Serialization Missing dot right before new line serialization

Hey guys, I've been using XML serialization for a while, and today I realized something really odd. If I have a new line right after a "dot" (.), when i deserialize, I lose the dot. Has anyone ever had this happen to them? The following is my serialization code: Serialize Dim xmlSerializer As New System.Xml.Serialization.XmlSerializer...

detect ctrl+left click in winforms application

detect ctrl+left click (for button) in winforms application ...

stop double postback

Here is what I am doing. I create two buttons in a header row of a gridview that i created. The buttons are +page and -page. When -page is hit I remove the paging and all the data goes down the page and -page disappears and +page is there. Here comes my issue When I hit +page I must be double postbacking because one row of my data disap...

Insert only unique value in table through vb.net application

Hi, I am using vb.net code and sql server 2005. I have textbox in my application which is linked to a sql column. Now I want to check that it should not insert any duplicate record in table. I mean everytime it insert in table the value should be unique. data is inserted in table on button click. I am using objectdatasource for sql co...

.NET: easier way to test for directory than bit masks?

Is there an easier way to test if a file system item is a directory than using bitmasks? I have this code in one of my applications (two second line is actually in a loop over folderItems but for simplicity assume the first element): Dim folderItems As String() = Directory.GetFileSystemEntries(aFolder) Dim someDirItem As String = folde...