vb.net

How to expand combo box on focus event?

Hi, I want to automatically expand Combo box on focus event. I have set the Droppeddown = True in gotfocus event, but this has a side effect. When click event gets fired, it expands dropdown and closes immediately. How can I avoid it? Here is Code: Private Sub cmbElectLoadPS_gotfocus(ByVal sender As Object, ByVal e As System.EventArgs)...

how to focus a particular Row in devexpress

hi friends, how to focus a particular Row in devexpress ...

Setting a DatagridView row to have focus on Form Load

Hi, I have a dialog that containers a DataGridView, this dialog is opened from a parent Form. I would like the DataGridView to have focus as soon as the form is opened, so on pressing the down key would enable you to scroll down through the rows straight away. I have tried setting the tab index so that the DataGridView is the first s...

Friend WithEvents in VB vs private in C#

Hello, friends Who knows, why in vb.net WinForm projects the designer by default use the Friend WithEvents attributes and in C# - private ones. By ex, in a form.designer. .cs private Label Label1; .vb Friend WithEvents Label1 as Label; For WithEvents is more or less clear(for using Handles, apparently). But why Friend in VB and ...

Gateway Page Between ASP and an ASP.NET Page

I'll admit, I am pretty new with ASP .NET programming and I have been asked to take all our gateway pages (written in classic ASP) and make one universal gateway page to the few C# .NET applications we have (that I wrote). I tried searching here and the web and couldn't find much of anything describing a great way to do this and figured ...

Setting external application focus

Question: In VB.net, you can set focus to an external application using AppActivate("Windows Name") or AppActivate(processID as integer) Now this works fine if you do for example: Dim intNotePad As Integer = Shell("C:\WINNT\Notepad.exe", AppWinStyle.MinimizedNoFocus) AppActivate(intNotePad) But when I do For Each theproce...

vb.net combobox different style to C# combobox

When creating a combobox on the design surface of a VB.NET app in VS 2008 it is white and when creating it in C# it is gray. How do I create a combobox in C# that looks just like the VB.NET one? (Style wise) ...

Removing items from a List(Of t) in vb.net failing

I have a generic list that I'm removing items out of using List.Remove(Object). I have been removing items but whenever I get to the fifth item I'm removing it fails and does not remove it from the list. It doesn't seem to matter what I'm removing but everytime I try to remove five items it fails on the fifth item. What could be causin...

Visual Basic and a Namespace Issue

I was cleaning up a Visual Basic (.NET 2.0) solution. Splitting it into two projects. 150 classes have the Namespace RebateCalculator at the top of the file. These files are now sitting in Project with the default namespace RebateCalculator. If I were to insert a Class1.cs file and then namespace declaration that all my other files have ...

Overriding DataGridViewTextBoxCell and CellPainting

Hello, I inherited DataGridViewTextBoxCell because I need to add some custom property to it. At run-time after creating the DataGridView instance and bind the data I do the following: For k As Integer = 0 To grid.Columns.Count - 1 grid.Columns(k).AutoSizeMode = DataGridViewAutoSizeColumnMode.ColumnHeader ...

Why should i use exit select?

Here are a couple of questions i gathered regarding exit select... Is there any reason for using exit select in VB.NET? The reason has anything to do with performance? The exit select is equal to break;? Example 1 Select case Name case "Mary" '... case "John" '... case else end select Example 2 Select case Name case "Mary" '......

Linq, Map List to CheckboxList

If I have a List(Of Guid) can I map those Guid's with a single Linq expression to a CheckboxList of values? ...

itextsharp: how do i place an image all the way at the bottom?

i have an image that i just want to place all the way at the bottom of the page. how do i do this? ...

itextsharp: how do i set the background color of the document?

in vb.net please if possible ...

Back Reference Link (link of back page)

i am using this function to get link of page which refered current page (in Back Button) :- Shared Function RefererPage() As String Return HttpContext.Current.Request.ServerVariables("HTTP_REFERER") End Function this function is working fine with mozilla firfox but not working with Internet Explorer (IE8) please tell me why...

controlLibrary my.application dosnt working

Hello, I have built a Wpf-ControLibrary-Project to put some Controls there. In one Control i need to get some informations about assambly, Version and directory path. in the past i have done this one: Dim msg As String msg = "AssemblyName: " & My.Application.Info.AssemblyName & Environment.NewLine msg &= "Version: " & My.Application.I...

Populate DataGridView from a Stored Procedure

Using SQL Server 2008 I created a Stored Procedure called MyStoreProc and it runs fine from the Management Tools. In VB.Net 2008 I created a new dataset and a new TableAdaptor. In this table adapter I created a new Query called FillByGrid and selected the Stored Procedure. Previewed data and it previewed correctly. On a form I create...

open a word document in vb.net

how to open a word document in vb.net.needs to add any reference file.please give the coding ...

another question about getting entries from StackOverflow atom feed

I feel like an idiot for asking this question again, as I know it's been asked several times. I cannot for the life of me get this code working even with the answers that have already been provided, so I'm hoping that by offering my current code, someone can help me determine where I'm going wrong: Dim RSSReader As New Xml....

Way of checking IsPostBack or IsCallBack from within a VB.NET class

I need to be able to tell from within a VB.NET class (not a user control) whether or not the current request is a PostBack and/or CallBack (AJAX). In the past I've been able to get information about the request, response, session, etc through HttpContext.Current but I haven't been able to find the Page object in HttpContext.Current. Is...