vb.net-2010

accessing multiple form controls using a variable for the name

末鹿安然 提交于 2019-12-11 03:22:39
问题 I'm trying to iterate through a group of ComboBoxes and set a property using a concatenated string & variable to represent the name of the control. However, I can't get the instance of the form to recognize the (String & Integer_Variable) as one of its controls -- and so it doesn't recognize any of the appropriate properties or subroutines as members of the System.Windows.Forms.Control. I found the DirectCast solution on SO and it appears to work (although I'm dubious), but that feels like a

VB.net Forms UI display issue in some laptop

非 Y 不嫁゛ 提交于 2019-12-11 03:04:50
问题 I am new in VB application and can't figure out what's wrong with my app. There is a form which has a couple of labels and text fields. When I run the app on my and few other folks's machines it displays fine with proper alignment and font. However, for some people application form UI is broken unaligned text and buttons. Any one have any idea what's wrong with my application? 回答1: Okay, After some research, we found that the display settings for those users were set to 125% and because of

How do i find all references to a user control

随声附和 提交于 2019-12-11 02:42:05
问题 in Visual Studio 2010 I have a really big ASP.NET website project which has a bunch of user controls. How do I determine all the .aspx pages where a specific .ascx user control is referenced throughout the project. Thanks 回答1: Right click the class of your User Control and Select the below option. Find All Reference 回答2: The simplest way I can think of is to just use the Find In Files (Ctrl/Shift-F) search dialog. Find what: name of user control Look in: Entire project 来源: https:/

Sending parameters to stored procedures vb.net

帅比萌擦擦* 提交于 2019-12-10 18:17:22
问题 Hello this my first project in vb.net working with ms visual studio 2010, i want to create a class that can send parameters to stored procedures in an transact-sql database, i know how to do it in vb 6 but i'm not sure if this the right way to do it in here. Imports System.Data.SqlClient Public Class ClsLineas Public Sub Inserta(ByVal GridLineas As DataGrid, _ ByVal numero As String, _ ByVal tipo As String, _ ByVal estado As String, _ ByVal anexo As Integer, _ ByVal fechaInicio As String, _

To sort a class array in vb.net

一笑奈何 提交于 2019-12-10 17:49:05
问题 I have spent 2 days scouring the internet trying to find the solution to simply sort an array made up of a class of strings and integers (by just 1 of the string elements that may contain irregular characters). Please help! I have created a simplified code of what I am trying to do based on the microsoft example: Public Class Form1 Class car Public Make As String = "" Public Year As Integer = 0 End Class Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim

VB.Net Linq to Entities Null Comparison - 'Is Nothing' or '= Nothing'?

非 Y 不嫁゛ 提交于 2019-12-10 14:56:47
问题 We have several projects in VB.Net, using .Net Framework 4 and Linq to Entities for many of our SQL queries. Moving to EF is a new shift for us (been using it for about 4-6 months) and has the backing of upper management because we can code so much faster. We still use a lot of stored procs, but we even execute those through Linq to Entities as well. I'm hoping to clear some confusion up and I can't find a direct answer that makes sense. We have some queries where we want records where a

Get Text From Specific Textboxes From External Application - Visual Basic .Net

坚强是说给别人听的谎言 提交于 2019-12-10 14:53:34
问题 I can get text from external application text box but now I want to get text from my desired text box from external application. My English is not so good that's why see Image Below. The Below Code Return The First Text Box Value Only. Imports System.Runtime.InteropServices Public Class Form1 Private Const WM_GETTEXT As Integer = &HD Declare Auto Function SendMessage Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal msg As Integer, _ ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr

Return list of names and email address from outlook to vb.net listbox

风流意气都作罢 提交于 2019-12-10 12:15:26
问题 I want to return from outlook, a list of names and email address and populate them in a listbox so that I can select the ones I want. I'm looking to do this from the users local contact list and also the global address list on an exchange server. I've seen many examples (Below) and nothing works, so any help would be most welcomed. Thanks Graham I am using Imports Microsoft.Office.Interop.Outlook Imports Microsoft.Office.Interop for both examples: Dim itemx As ListViewItem 'Create an Outlook

Generating QR Barcode using iTextSharp

故事扮演 提交于 2019-12-10 10:45:04
问题 I have an array of values say arr(0)="Sam" arr(1)="1452" arr(2)="NY" I want to generate a QR barcode with these values. We are using ITextSharp. Any help will be appreciated. Iam using vb.net. 回答1: Here are some examples how to create barcodes with iText: http://itextpdf.com/examples/iia.php?id=297 (the last one is a QR barcode) The datails of the API is here: http://api.itextpdf.com/itext/com/itextpdf/text/pdf/BarcodeQRCode.html Please note that even though these links refer to the Java

version of .net framework launch not match .net framework bootstrapper project

微笑、不失礼 提交于 2019-12-10 01:59:20
问题 When I build the release project of the vb.net 2010 I just started using, I get two warnings: the version of the .net framedwork launch condition does not match the selected .net framework bootstrapper package. Update the .net framewk launch condition to match the version of the .netfrk selected in the prerequisites dialog box. The target version of the .net framework in the project does not match the .net framework launch condition version .net framework 4 client profile. Update the version