vb.net

How to hook up CNTL-x/c/v keypress events for cut/copy/paste routines

(This should be an easy one... but Googling for it is a mess of rabbit trails.) I have a Windows Forms app, with a TabControl. On the first tab (which is a bunch of textboxes), the CNTL-x/c/v keyboard shortcuts for cut/copy/paste work as expected. On the second tab (which is a DataGridView), the keyboard shortcuts don't do anything. Ho...

Data Binding in .NET with CSLA BOs

OK, I am having quite an issue with data bindings in .NET. Some background information, my business object tier is using CSLA v1.0. And _clientObj is passed in as a parameter as a business object that inherits CSLA.BusinessBase Here is the code segment: Dim nextClient As New ComboBox With { _ .Name = "txtClientAtt" & (Clien...

Uploading files to mainframe from VB.net

Hello, I am uploading file to mainframe and before uploading when I open it using notepad I am able to view it. Once uploaded the administrator is complaining that he is not able to read the data in file and it appears as junk. Is there anything else I need to do before uploading files to mainframes. I am using Chilkat component to upl...

Assignment to apparently nonexistent variables in VB.NET

I have some VB.NET (which I don't normally deal with) code which must be converted to C# (which I normally do). The code happens to be in a Windows Forms app. I notice a couple of places such as: Public Sub New() ParentWindow = Me where there is no ParentWindow variable defined, and it doesn't seem to be inherited here: Public ...

VB.NET EnvDTE Up-To-Date check before building project

Hi all, how do I check if a project is up-to-date? I'm basically trying to programmatically build each project in a list but only if they have changed. So does anyone know of a way (using EnvDTE maybe) to check if a project changed and therefore needs to compile? Thanks in advance for all the help. ...

simple text color in rich text box

I can find a million examples of doing reg ex to apply syntax highlighting to a rich text box. but what i need it just a simple way to add in a word of a diffrent color. What would the code be to just put the words "Hello World" into a textbox and have Hello be red and World be green? This code doesnt work. this.richTextBox1.Selectio...

How can I test/debug my VB.NET app with a proxy server?

I have a small desktop Twitter client written in VB.NET (2.0). Works great. Some of my users have emailed me and said that the application isn't working for them because they are trying to use it on networks where a proxy server is part of the network connectivity equation. I'd like to be able to troubleshoot and debug my application ...

Close Windows Form while it is initializing

I have a winforms app that checks user credentials as it starts. If autharization fails I want to close the app. So I have been using the following Public Sub New() _CurrentUser.GetuserDetails If _CurrentUser.IsAuthorized then 'Let the app start Else 'Shut it down Me.Close() End IF End Sub However this produces a "Cannot ...

[VB.NET] Better Way of Getting the Text Value of Cells in an Excel (*.xls) File

I'm trying to write an import function for getting data out of an excel file. How I currently do it is as follows: Private Sub ReadExcel(ByVal childform As PhoneDiag.frmData, ByVal FileName As String) Dim xlApp As Excel.Application Dim xlWorkBook As Excel.Workbook Dim xlWorkSheet As Excel.Worksheet xlA...

VB.NET and Program Architecture

I would like to write a program like sales in which there's two table to insert i.e: SaleHeader Table and SaleDetails Table. These two tables have (one to many) relationship. When I insert to SaleDetails Table I need to get SaleHeaderID to insert at SaleDetails. Now I am using storeprocedure to insert SaleHeader information and to get ...

Copying file to client machine

Hi We have a requirement to copy a .txt file into the client machine and open the file using notepad.exe. We develop our application using MS Visual Studio 2008 VB .Net. Any experencied this kind of requirement? Help required... Thanks Shoba Anandhan ...

Active Directory Server with .Net

We are developing our application using MS Visual Studio 2008 VB .Net. We have to use Active Directory Server for authenticating the user logging into the application. Does any one has code samples intergrating .Net and ADS? ...

How can I create an interface in VBNet with implicit implimentations

In C# I can create an interface, and when I use the interface the compiler knows that certain interface requirements are fulfilled by the base class. This is probably clearer with an example: interface FormInterface { void Hide(); void Show(); void SetupForm(); } public partial class Form1 : Form , FormInterface { publ...

Performance concerns of instantiating multiple classses in one Form

I would like to know how will performance go when I instantiate multiple classes in one form. e.g Public Class frmClass Dim obja As New ClassA Dim objb As New ClassB Dim objc As New ClassC 'I'll use those classes' attribute in here ' End Class Thanks for your help! ...

ASP.NET special character problem

I'm building an automated RSS feed in ASP.NET and occurrences of apostrophes and hyphens are rendering very strangely: "Here's a test" is rendering as "Here’s a test" I have managed to circumvent a similar problem with the pound sign (£) by escaping the ampersand and building the HTML escape for £ manually as shown in in th...

app.config syntax for structure

I have difficulties figuring out a useful app.config structures for my program. What I am doing is writing a windows service, which watches several directories on a server for files being uploaded. My problem is making my program configurable for n folders when in each of those n folders, i need to watch for a different collection of ...

Can Someone Explain MustOverride?

Hi there, Can someone explain not what MustOverride does, but why use it? Is it to expose the function? I have two classes, the first (RoomFactory); Public MustInherit Class RoomFactory : Inherits baseFactory Private _roomid As Integer = 0 Private _roomname as String = "" Public Sub New() End Sub Public Sub New(ByVal roomid As Inte...

how to initialize a Singleton?

Hello. Sometimes there is a need to initialize the singleton class with some helper values. But we can't "publish" a constructor for it. What is the workaround for this? Attention! overloading the GetInstance or setting a color is not my idea. The color should be set only once. I would like to be sure that MyPainter paints ONLY with th...

IIS .net application, possible to host a .vb file inside a c# app?

I have an application that I've set default language to c#, is it possible to run a .vb class inside of this IIS application? ...

Program display even while computer locked?

I have a program that occasionally pops up on the screen and displays a message, using vb.net. Is there a way to have it run and display even if the computer is locked or no one is logged on? Thanks. ...