VS 2010 Converting Powershell WMI query to VB.NET
I've found the following Powershell script to extract information from Hyper-V machines. I'm trying to convert it to VB.NET but I'm having trouble figuring out the WQL syntax Code: $HyperVParent =...
View ArticleVS 2012 Does a List of T contain a value
Here is my code that I am working with: Code: MsgBox(ListOfPackageContents.FindIndex(Function(item) item.Name = "Schedule")) MsgBox(ListOfPackageContents.Contains(Function(item)...
View ArticleVS 2010 Symbols missing?
Hey all! I'm in the process of developing a program that allows me to spam either 1 line, or many lines given the number of seconds I decide to choose. So here is how it works. 1. I click the "Add...
View ArticleWorking with Forms
I have three (3) forms namely: Form1, Form2 and Form3 Using Form1, I will show the Form2. Code: Dim FormTwo as New Form2 FormTwo.ShowDialog Using Form1 again, I will the Form3 but the Title should be...
View ArticleHow to check connection before instantiating context in LINQ to Entities,
Hi Folks I've been using LINQ to Entites with the graphical Entity Designer taking care of creating all ORM stuff for my DB. Thus to use it I have something like the following that runs when my program...
View ArticleCapture the array number of the selected button in a radiobutton array
I'm fairly new to vb.net. At one time - many years ago I was reasonably competent GFA basic.I have written a basic banking program in vb.net which works well and I am now trying to tidy it up and...
View ArticleVS 2010 Attempted to read or write protected memory.
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then xlApp = New Excel.Application xlWorkBook = xlApp.Workbooks.Open(OpenFileDialog1.FileName) xlWorkSheet =...
View ArticleVS 2012 check if a batch file is running?
Hi All, I am writing a small programme part of which will execute a batch file and I want to question what the best approach should be to monitor when that batch file has completed its operation from...
View ArticleVS 2010 What's the best way to return data from a WCF data service?
I'm planning to use a VB.Net WCF data service as the way for various applications to retrieve data from a selection of back end databases. I don't want to have to fill my service with classes that...
View ArticleConverting and storing RGB values in SQL Server?
This is a 2-part question. First, I need to figure out how to retrieve the RGB value from the ColorDiaglog! Secondly, I not sure which is the best way to store the value in SQL Server...I'm assuming...
View ArticleVS 2010 Export setting form to a file
I AM DOING A PJT IN VB.NET AND INSIDE MY PROJECT I MADE A FORM FOR THE USER TO INPUT THE SETTINGS AND IT HAS SOME CHECKBOX, A COUPLE OF LIST BOX AND FEW OTHER CONTROLS. MY IDEA IS TO HAVE THE SETTINGS...
View ArticleVS 2012 Get array's to listbox in diffrent formats
Hello i am writing a cinema reservation project with 2 one dimension arrays . at this point i am having some problems with the array. My Question is : 'I dont know how to put my arry´s together and...
View ArticleVS 2012 INSERT INTO error?
This is the error I am getting: An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll Additional information: Syntax error in INSERT INTO statement. And here is...
View Article[RESOLVED] Grouping Enum's using Or when used as a parameter on a procedure
Hi, I am using a sub to handle the enabling/disabling of buttons on a form based on the Enum value provided as a parameter. For example my Enum looks like this: VB.NET Code: Enum ButtonState...
View ArticleHow to print a graphic from a form with scrollbar VB.NET serious help needed...
I have tried goggling and looking at example for hours and nothing worked. I have this form with graphics that i want to print however the printform only prints a screenshot but there is more of the...
View ArticleBest Way to Start New Task/Thread from Asynchronous Event
Hey All, I'm reading in from a comport from the datarecieved event and placing the bytes into a synclocked queue. (producer) Currently I'm running a timer on a separate thread to check for the number...
View ArticleVS 2010 Open specified path in registry
Hello, I want to open the specified location in Registry using VB.NET similar Registry Favorite, how to do? The regedit.exe can not open specified location. Here the code i tried. Code: Dim rKey As...
View ArticleNULL Value
Hi, I have th efollowing code; Code: Public Shared Function FixNull(ByVal dbvalue) As String If dbvalue Is DBNull.Value Then Return "" Else...
View ArticleVS 2012 How would one get items to appear in a ListBox contained in a...
I created a UserControl. This UserControl contains a Panel which contains a ListBox. This is so I can draw a custom border for the ListBox. I am exposing the ListBox's Items property like so: vb.net...
View Article[RESOLVED] converting DOS text files to UNIX
I'm generating text files that are being used on a linux machine, and they are all being generated with the ^M control character at the end. I am opening a file and placing it into a string array line...
View Article