vb

.net dropdownlist if condition

I had posted this question before but didnt get the right answer - here's my code again with the if condition. Dim provider As CultureInfo = CultureInfo.InvariantCulture Dim a1 As DateTime = Nothing if date1.selectedvalue isnot nothing then insexp = DateTime.ParseExact(date1.SelectedValue, "MMMM yyyy", provider...

MS Access 2003 - Auto assigning an Identification Number

So I have a little db that is used for new hires in terms of who, where and what they are issued. One thing that is issued is laptops with little barcode/ID numbers, and I would like the db to auto assign an available ID number when the user is saved to the db. So I have a form that users use to input the information, and it is unbound,...

WPF Virtualizing Combobox

I have a combobox created in code with 30,000 items in WPF, and it was truly slow - probably rendering all the rows. I did this to fix it: cboValue = System.Windows.Markup.XamlReader.Parse("<ComboBox xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""&gt;&lt;ComboBox.ItemsPanel&gt;&lt;ItemsPanelTemplate&gt;&lt;Virtualizi...

Change the cell border width and also make the cell border only all,left ,right,top,bottom or none

Change the cell border width and also make the cell border only all,left ,right,top,bottom or none in winform datagridview. In datagridview the problem is to change the border style of each cell , as we could do in excel sheet. I have tried following but it didnt work. DataGridViewAdvancedBorderStyle mystyle = new DataGridViewAdvancedBo...

Learning C# as a VB.NET programmer

I am looking to switch to C#. I come from a C / C++ background but C# is a little different for me. I am switching mainly because of Silverlight and MVVM; all examples are in C#. Any information is in C# and I am confused when I read through it all. What is a good place to start learning C# when starting with existing C / C++ knowle...

Error handling in Visual Basic Editor for email field in excel form

Hi folks, I am currently coding a form in excel. I was wondering if there was a way to search the contents of a field for certain characters. I was thinking about using this method to construct a code to check for the integrity of the data entered within the email field. It would look for an "@" and a "." and probably output a boolean v...

MS Access 2003 - Opening a report without it printing

I used Docmd.OpenReport "Report1" from another form and it seems to just want to print the report without actually displaying it. I want to display the report, not print it ...

MS Access 2003 - VBA for Parameter box that open after code is run: auto "ok"??

So there is a parameter box that open after a button click event runs an sql statement in vb for a list box to populate data. something like: me.listbox.rowsource = "SELECT tblMain.ID, TblMain.FirstName, TblMain.LastName, tblMain.MobileNumber FROM tblMain;" then i count the result for display like: me.recordcounter = me.listbox.listc...

Arrays of unknown length in Visual Basic

I have a piece of code written in Visual Basic: Dim n As Double, i As Integer n = 4 Dim Ramp_length(1 To 4) As Double For i = 1 To n Ramp_length(i) = Cells(13 + i, 5) 'Cells(65 + i, 7) = Ramp_length(i)' Next i Is there a way I can reproduce the result without declaring the array with a "fixed" length? I eventually want the cod...

Adding a window listener to a WPF-Window?

How can I add an window/event listener/handler to a wpf-window? I want to know, if the user wants to close the window. ...

What is best couple for developing small and fast GUI application with some graphical editor features - C++ and (VB or Win32)?

It has to make some time consuming calculations, so i need it to work as fast as possible. Also thought about Delphi. So. Is it a question of taste(or habit) or not and what can you advice me then? ...

Receiving 'The input is not a complete block' error, tried everything I can find on google. Rjindael Encryption in .NET

Mornin', I'm trying to just get basic encryption working using System.Security.Cryptography.RjindaelManaged. I have google for this error and cannot find the problem, or what I am doing wrong. All I am attempting to do is encrypt a string, and then decrypt a string. Following is my code, and any help would be appreciated. Imports Syste...

VB .frm files, can they be imported into a C# project?

Hi, I am supposed to be updating a piece of software for someone. Originally written in VB 6 I want to import it into a .net c# project. My question is, I don't want to have to lay out all the forms again and I am wondering if, or how, I could import them into c# project. They originally come with the .frm extension and c# forms are ...

Looking for a BASIC interpreter implemented in PHP

Does anyone know of a PHP program that will interpret BASIC code? I have seen a LOLCODE implementation that looks like it's a good place to start, but if anyone has already developed something like that, i'd be grateful. ...

Programatically set margins in report viewer control

Hi, In onw of our application, we have some reports that need very specific margins that are dependant of the printer the user have. It is used to print into preformated paper with blanks to fill and depending of the printer, the printing is off by some margins. To make things worse, we don't actually control what printer is used becaus...

How to refresh applicationSettings in a dll

Can i force a dll to reload it's configuration? In my VB library I'm using this configuration: <applicationSettings> <ComWrapper.My.MySettings> <setting name="MySetting" serializeAs="String"> <value>This is an entry</value> </setting> </applicationSettings> It's no problem to access the "MySetting" val...

How can I run a Perl script through an ActiveX Control within Excel?

I want to run a Perl script at the click of a button inside an Excel spreadsheet. As the button is assigned to execute a VB macro, the macro should effectively execute the program. As my first ever VB script, this is what I came up with, which throws up an irritating Run-time error '424': Object required error. Sub RunPerlScript() ...

Linking 64bit DLL to Visual Basic 6

I'm working on a project that is using a DLL written in C that has both 32bit and 64bit compiles of the DLL for multiple reasons. The main application is written in Visual Basic 6. The component that brings in the functionality of the C DLL is a class within Visual Basic 6 that contains a module full of Public Declare Functions to the DL...

Initializing a textbox value in with Option Strict On

I tried to initialize a textbox value by using the .Text property Textbox.Text = 0 But Im getting the error Option Strict On disallows implicit conversions from 'Integer' to 'String'. ...

What is the file path, as a string, of a file in the application's resources?

The reason I ask is that I want to print, at run-time, a file in the application's resources, like this: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim printProcess As New Process printProcess.StartInfo.CreateNoWindow = True printProcess.StartInfo.FileName = "C:\Users\Ge...