VB 2012: Assign Variables to PictureBox

I'm currently creating a board game using VB 2012. One issue I've found while trying to code the game itself is assigning numerical values to a PictureBox. For context, I need to assign a value to each cardinal point of the Image for use in the gam...
more »

2017-01-11 10:01 (0) Answers

Replace all URLs with hyperlinks

I have following code which uses regex to find all the urls within a given string: Dim regex As New Regex("(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)", RegexOptions.IgnoreCase) Now, I want...
more »

2017-01-09 13:01 (1) Answers

Calling and serializing FB feed

I am calling FB feed from multiple FB pages with /posts?ids=OI.Plavipingvin,217384491624554&limit=5&fields=message,created_time,id This is the feed I get: { "217384491624554": { "data": [ { "message": "Obećanje i ...
more »

2017-01-08 21:01 (2) Answers

Auto-Fill I-9 PDF XFA Form

Good morning. I am hoping someone can help me on this topic. Last year I set up a VB.NET program using iTextSharp where a user could enter the information to fill the I9 and that information would fill in the PDF and print. With the new I9 I am havin...
more »

2017-01-06 17:01 (2) Answers

VB.net Media Player - Save playlist

I am trying to add the ability to save the playlist in my media player (based on WMP), so that it can be or will be loaded automatically in the next session. The media player itself and the playlist work flawlessly. I've tried some methods I found o...
more »

2017-01-04 22:01 (0) Answers

VB.Net: Searching Word Document By Line

I'm attempting to read through a Word Document (800+ pages) line by line, and if that line contains certain text, in this case Section, simply print that line to console. Public Sub doIt() SearchFile("theFilePath", "Section") Console.WriteLi...
more »

2017-01-04 20:01 (2) Answers

Issue binding datatable to WPF datagrid

My XAML is as follows: <DataGrid x:Name="WaterfallDataGrid" HorizontalAlignment="Left" Height="540" Margin="10,410,0,0" VerticalAlignment="Top" Width="1650" CanUserSortColumns="False" ColumnWidth="60"> <DataGrid.Columns> <...
more »

2016-12-30 16:12 (2) Answers

Scroll WPF DataGrid to show selected item on top

I have a DataGrid with many items and I need to programmatically scroll to the SelectedItem. I have searched on StackOverflow and Google, and it seems the solution is ScrollIntoView, as follows: grid.ScrollIntoView(grid.SelectedItem) which scrolls...
more »

2016-12-28 14:12 (3) Answers

MVC DropDownList look and feel

So I'm creating a site using MVC, and my DropDownLists and DropDownListFors do not look the same as the other input elements on the page. I tried setting their class to be the same "form-control", and even tried adding my own class in the css that h...
more »

2016-12-24 23:12 (1) Answers

How to save an object after exit

So I'm currently working with VB.net and winforms and I need the have objects created from my classes saved so they are still there if I exit the program and open it again. I also needed to make them dynamically so I was going to add them to a dictio...
more »

2016-12-22 02:12 (1) Answers

Find All Items In RichTextBox

I have a .css file and I want to find all strings that start with /images_rtl/ and end with .png, then add them in list box. What sort of code would be required to program this? ...
more »

2016-12-21 20:12 (1) Answers

Color a DataGrid row based on a DataTable value

I'm pulling data from a CSV file, parsing it in a DataTable, and then, setting this DataTable as the ItemsSource of a DataGrid. I'm then looping the DataTable to do some verifications on the data, and I want to color the DataGrid rows accordingly. ...
more »

2016-12-21 17:12 (1) Answers

InvalidOperationException with XML literals vb.net

I am re-writing a WinForm desktop application in WPF, everything worked fine in WinForm, but I am getting an exception thrown in WPF The part of the app that is causing issues is reading an XML file and displaying the data in textboxes, pretty basic...
more »

2016-12-18 19:12 (2) Answers

combine classic asp with asp.net

I have a (huge) website written in classic asp. Now do I have to switch to vb.net (razor). Is there a way to combine those 2 till the switch is complete ? Is there a way to let the application work with classic asp and vb.net ? (I use webmatrix)(do...
more »

2016-12-16 12:12 (1) Answers

Disable load page on button click

I am trying to fill a gridView in asp.net when search imgButton is clicked. The problem is that whenever I click on this button, page enters in load event before reaching the event that handles the search click. I found some solutions: I added an ...
more »

2016-12-15 10:12 (1) Answers

Property vs. Variable as ByRef parameter

I created a base class that implements the INotifyPropertyChanged interface. This class also contains a generic function SetProperty to set the value of any property and raise the PropertyChanged event, if necessary. Public Class BaseClass Imple...
more »

2016-11-28 15:11 (2) Answers

How to cut off overlapping areas?

My problem is that I want to create my own custom Control. In this control there is only a rectangle. This rectangle can be rotated. When i e.g. rotate the rectangle for 45 degrees then the rectangle overlaps. But i want that the overlappinmg areas a...
more »

2016-11-24 21:11 (1) Answers

Reload a Datagrid View returns Nothing

I have the a Function that loads data into from a Microsoft Access DB into a DGV as shown in code below: Public Sub LoaddgvCombined() Try '//Clear DataGrid ds.Clear() dgvSales.DataSource = Nothing 'dgvSales.Ref...
more »

2016-11-21 07:11 (1) Answers