vb.net

Listing Properties / Checking if a Property is ReadOnly

Hi everyone! I'm faced with a couple of problems in VB.net: I have a series of objects, which properties I'm displaying in a grid for the user to edit. My first problem is: how do I get a list of all the properties of an object? Is it even possible? The datagrid control that I'm using accepts string values with the name of the property...

How to bring up PDF embedded in windows.forms.webbrowser control in VISTA.

Webbrowser1.Navigate("http://mysite.com/test.pdf") XP WEBBROWSER-CONTROL: brings up PDF embedded in webbrowser control, as desired. XP IE7: Behaves the same if you manually navigate to URL, as desired. VISTA WEBBROWSER-CONTROL: brings up PDF by separately launching Acrobat, won't embed in webbrowser control. Not desired. Vista IE7...

by using copyfile element files cant not bind into msi package

Hello, i am using wix 3.0.i have a folder name "images".so i want to copy all the files from images into msi package.when i copy all the file and install msi to another PC then it did not bind the images. And when i use simple File Element then the files bind to msi package. so what should i do, Reply me soon Thanking You Sami...

Why? Redeclare things to implement interfaces?! in VB.NET

Hello, experts. I work in VB.NET v2 I have an interface IMyInterface and this interface implements a method MyMethod. I have an object MyObjectBase. This object contains a(the same) method MyMethod. 1) If now I do MyObject Inherits MyObjectBase Implements IMyInterface need I to redefine? (shadow, override) MyMethod in the MyObject cl...

Uploading multiple files with VB.Net

I need to upload multiple files in a winforms application. So far I've been using a webclient and while this is working fine I'm wondering if there is a better way for doing this. Does the webclient make a new connection for every request or does the connection persists between uploads? Dim Ftpclient As New System.Net.WebClient() Ftpcli...

DataGridViewButtonColumn

Hi, i have a datagridviewbutton and i would like to hide or remove the text of a button when a condition is true. Is it possible, or anyone have any workarround to get to it. Thanks. ...

Any harm to the monitor in using SendMessage Function

I developed a little app which uses SendMessage function to turn off monitor. My friend asked me whether using the app regularly will harm his monitor. He had some issues with his mother board when he used a similar app. Is there any harm (for hardware) in using the function to do things like these? ...

How to compile VB 2005 code containing "default instances" using nant

I've got some VB code that's using a default instance of a Form. It compiles fine within VS but when I try compiling using the nant vbc task it throws this error, error BC30469: Reference to a non-shared member requires an object reference. Here's the relevant section of my nant script, <vbc target="exe" output="${basename}.ex...

problem with Excel automation function

hi folks, i´m programming a vsto add-in combined with an automation add-in in VB.NET using MS Visual Studio 2008. The automation add-in is activated in excel and registered at the system. basically the automation add-in running very well, when you call the function with "=<function-name>(<argument1>;<argument2>;...;<argument-n>)" by w...

How do you read a text file without losing odd characters?

I would like to read a text file into an array of strings using System.IO.File.ReadAllLines. However, ReadAllLines strips out some odd characters in the file that I would like to keep, such as chr(187). I've tried some different encoding options, but that doesn't help and I don't see an option for "no encoding." I can use FileOpen and L...

VB.net word document Insert column break

How can i forcefully insert a coloumn break in word document through VB.Net? ...

VB.NET: What is the equivalent of the SQL Server bit datatype?

I have a field in a SQL Server table that is of type bit. When I try to use a Boolean in VB.NET when passing parameters to a stored procedure, there are never any matches. I have also tried passing an integer to the stored procedure and that does not work either. ...

Update DataColumn's with latest column information

I have a dataset with a number of data columns, due to sizing issues I've updated a number of the varchar columns from say VARCHAR(20) to VARCHAR(50). I'd like the DataTable to automatically grab the new column information, is this possible? I'd rather not go through each column in the table and update the length. ...

How to fill a DataTable with a List(Of t) or convert a List(Of t) to a DataTable?

I have read many posts on this topic; among them and most recently .NET - Convert Generic Collection to Data Table. Unfortunately, all to no avail. I have a generic collection of structures : Private Structure MyStruct Dim sState as String Dim lValue as Long Dim iLayer as Integer End Structure Dim LOStates As New List(Of MyStruct) I...

A list of all the SQL types and their .NET mapping?

I need a list of all the SQL types and their .NET (vb would be preferred, but C# also works for me) equivalent. ...

Trim all whitespace in an array

How do I trim all whitespace in an array? Dim str() As String = {"Tyrannosaurus", _ "Amarga saurus", _ " Mamenchisaurus", _ "Brachios aurus", _ "Deinonychus", _ "Tyr annosaurus", _ " Compsognathus"} ...

how can i attach the framework in WIX

hello, i want to attach .net framework 2.0 file in wix.how can i?so whenever client want to install the msi then it will install the framework directly.so how can i bind the framework in msi package? reply me soon Thanking You Samir ...

How to display records in the listview control?

Hi everyone! I'm trying to use listview control in vb.net or vb2008 express edition to display records from my database after it is being queried.I have two column headers in my listview control which are named Account# and Authorized Users. I was able to display the records from the database into the listview control but i don't know h...

LINQ to SQL Generic Class for Insert and Delete operation

Hi, I have been writing same code for insert, update, delete with LINQ over and over again. I want to have some sort of generic function for Insert, Update, Delete operation. I read a post here like the following : public static void Insert<T>(T entity) where T : class { using (OrcasDB database = new OrcasDB()) { databa...

Difficulty in using VB Code Dom (having If expressions in generated code)

Hi guys, I have difficulty in using the vb code dom. Basically, I want to compile this piece of code dynamically: Imports System Imports System.Collections.Generic Imports Microsoft.VisualBasic Namespace Formula Public Class TsCalculator Public Sub New() End Sub Public Shared Function Evaluate(ByVal Ts As Dictionary(Of String, ...