vb

Visual Basic 2010 Creating a Control Array

How can I make a control array? Or the equivalent. I am used to Visual Basic 6 which presents the option of whether to create a control array when I copy and paste and control. ...

VB.NET OpenFileDialog Latency on Win7

I have a winform, VBExpress 2008 with a single button and this code behind it to illustrate the problem: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click OpenFileDialog1.ShowDialog() MsgBox(OpenFileDialog1.FileName) End Sub When I select a file (in my case small PDF's) I am g...

Creating a new SQL entry - Updating Linked Views using VB

Hi, I am trying to create a script that automatically populates a database with existing computers. It queries the local machine for UUID and computername then creates a new record for the machine in the database. This works perfectly at the moment. The problem is, once the record is created, the linked view "ComputerSettings" isn't u...

How to create a COM DLL (class library)?

I have an existing COM DLL (class library), originally written in VB6 and source code now lost. I need to very quickly rewrite to make a minor tweak it and don't have access to VB6. I understand that C++ Express 2008 will let me create the DLL, but I get bogged down ATL and the like. Is there a really simple step by step guide to creat...

Referencing a dll in Java

I need to reference a C++ dll from my Java project. The method that I need to expose is actually written in Visual Basic. Is there any way to access the Visual Basic code in C++, so that it can eventually be accessed in the Java project? ...

Edit contained label dynamically based on which tab is selected

Hello, pretty new to vb and I want to get a tab control working. so far I have the form with a tab control on it, there are 5 tabs each with a label contained in the tab-page. I want to have a button outside of the tab that changes on the form. when clicked the button will change the text of the label based on which tab is currently sel...

How to call a macro on a button click in a word document

Hi, I'm new to macro programming in VB, and what I'm trying to do is clone a row in my word document when a button is clicked. I've made an attempt as shown in the picture below. What do I need to do to make the addTwoDependants() subroutine run when the button is clicked? ...

VB Calling Parent form's Methods in a usercontrol

Hi I have a user-control that contains a button. the user control is placed on my main form. when the button on the user control is clicked I need to to call a method that is located in the mainform.vb ...

overriding a User-Control method VB

I'm making a windows form, I have a user-control which I made with a number of methods. On my main form I have an instance of this user control, I need to override one of the methods in the mainform.vb to change functionality of one of the methods. ...

VBA code for read an Excel file

hi, I want to make an excel file read using a VBA code in a simulation software. Please let me know how can I do this? ...

How to specify digits and decimal places with NumberFormatInfo

I need to format a number like "1.2452" to show "452" So I don't want to see all numbers. The thing is, I am not able to control the display number directly, I can only format it by setting a format string of type according to the NumberFormatInfo Class. Is this possible, and if so how? cheers EDIT: I found out I could subscribe to...

How can I maximize, restore, or minimize a window with a vb script?

I need to be able to make separte .vbs files that will (when triggered with a keyboard short-cut) will make the active window maximized, minimized, or restored. How can I do this without downloading and installing (not allowed here) a separate package. ...

How to use python 2.6 from Visual Basic 2005?

What's the best way to call python scripts from Visual Basic 2005? I've got an application written in visual basic 2005 that needs to call into a library written in python. The library requires python 2.6. I'm using the python C API to access the python library from the visual basic code (private declare function blah lib "python26.dl...

Remove chars in a string until numeric is found in ASP and VB

I am trying to add to a page that someone else has written. I need to take a string that is formated with either 3 or 4 alpha characters followed by a series of numbers. I need to remove these alpha characters so that only a string of numbers is left. Example: What I'm string with is TrailerNumber = "CIN0012345" and I need the result ...

Timer and 64bit processor, I'm puzzled..

First of all I'm a total newby in visual basic, I needed to hack an application that kept clicking (don't ask). Everything is nice and dandy on my pc, then I compile, move it to its final destination and I doesn't work! At first I thought it was a OS problem, but both machines has win7, I then thought it was a compilation problem, inst...

Why my timer program written in VB isn't accurate?

I have been trying to create a timer program with VB 2010 to the accuraccy of 0.05seconds (If possible, 0.01s) I insert a timer into the form (Timer1, Interval - 50). The code when the timer ticks: intdsecond = intdsecond + 5 If intdsecond > 99 Then intdsecond = intdsecond - 100 intsecond = intsecond + 1 En...

How can I check to see if the active window is maximized with vbs?

When I'm working, I want to be able to maximize or restore a window. But I only want to use one shortcut key to do it. I am currently using the below code to perform the function of maximizing. However, if the window is already maximized, this won't 'restore' the window. Set oShell = CreateObject("WScript.Shell") oShell.SendKeys "% ...

extract all images in icon file in visual basic

Hello guys, I need help on how to extract the various images from an icon file ie 256 x 256, 48 x 48, 32 x 32, 24 x 24, 16 x 16 etc. Am a vb6 and vb.net average programmer, and would be ok if help comes from any of the programming languages i mentioned thanks ...

Kill process started with System.Diagnostic.Process.Start("FileName")

Hello; I am trying to create an app that will perform actions on specific times (much like the Windows Task Scheduler). I am currently using Process.Start() to lunch the file (or exe) required by the task. I am initiating a process by calling a file (an .mp3) and the process starts WMP (since it is the default application), so far so g...

updating fields in microsoft access 2000 thru visual basic

i created a program that add and returns equipment, my problem is, its because my borrowing table and my return equipments table are in one table only..representing these fields "productnumber" "productname" "dateborrowed" "datereturned" "borrowername" "status" what i want to do here is when a user returns an equipment, entering t...