Porting a VB6 application with msflexgrid to vb.Net - vb.net

I am porting a vb6 application to VB.net. One of the key forms has a large msflexgrid on it - about a 1000 columns and 50 rows. It has 2 header rows - the first header row has merged cells to form a main header and the second row has sub headings. There is no requirement for any data entry and it's unbound. The code does the work in deciding what to display (if anything) in each cell. It is solely used to display data in the form of a character and a coloured background and to display a tooltip text with more information when you mouse over it. Works beautifully in vb6.
I'm trying to decide whether to:
a) use the vb6 msflexgrid in the .net version
b) use the datagridview - which at a first glance seems to have a problem merging the cells on the header row
c) build my own custom control to do the job
Has anyone got any suggestions for the best approach?

I would suggest using the DataGridView, primarily because using COM objects in .NET is a pain. There is a MSDN page for exactly what you want to do here, and some additional discussion here.

Related

How to use option buttons to change a value in a Word 2016 table

I am attempting to create a form that uses option buttons to assign a score, which would later be totaled for evaluation purposes. (I am using Word 2016 on Windows 10.)
Here is a pic of a portion of the proposed form, with 5 columns:Proposed Form
Here is a picture of the code I have attempted to use, which worked just exactly as I wanted it to "in EXCEL." Due to needs in other parts of the form, however we will be using Word, not Excel.Code Pic
Since we've decided to use Word, due to other features that Excel lacks, what code should I be using that would place a point value in the "Points" column? (I am assuming e2 to be the address of the 2nd row, 5th column?). I have spent 2 days so far trying to understand how to make this work. I know it can be done, but I lack the specific coding knowledge to make it happen. Thanks in advance for your help!
You appear to be using both formfields and ActiveX controls. It would be far simpler to use just formfields and, instead of having radio buttons, a simple dropdown for each item. That way, you don't need all those separate columns and the results could be tallied from the dropdown selections without the need for VBA.

vb.net datagridview and bindingsource

Im in the process over converting some legacy VB6 code over, in particular a TDBGrid linked to an ADODC data control.
Everything is going ok, ive got my columns and bindignsource reading sweet as a nut and performing what its supposed to do, correctly - but im having a problem converting this type of method over.
In the vb6 app, while a user scrolls through the grid, the grid fetchstyle (similar to cellformatting) go looking at the equivalent row of data in the adodc.
In .net, I cant seem to get that functionality to be the same, unless I add that field from the database, into a column in the grid and make it invisible (which I dont really want to be doing if i can help it) then read the cell via cellformatting and then perform some action, such as changing the cellstyle backcolor to something.
Is it possible to refer to a row in the bindingsource that would be the same row in the grid that a user is at, without having that field from the bindingsource - in a DGV column?
or do i just have to put up with placing more columns in the DGV than I want and just live with it?
Thanks!
I think you want the BindingSource.Current
object.

Excel show sheet inside scrollable square

A client is asking me what I think should be done with .NET Windows Forms or similar, but maybe it's possible to do in Excel:
I already added some buttons and actions in a data sheet, but instead of showing all cells as shown by default by Excel, he wants the sheet to be inside an scrollable area. Something like this:
Is this possible? In case it's not clear enough, the scrollbars are just around the data rows and columns, not about the buttons and form items around the actual data
EIDT: I'll try to be more clear, I need all my Excel sheet and workspace to look like a Windows forms application, and the actual data (all the Excel cells) to be inside an scrollable area. I think it's not easy to understand because it's quite weird, as I sayed is my client who wants this.
BTW it wasn't a trial version, I payed for the wireframe software
You could put the buttons in the top row(s) and use the Freeze Pane option
https://support.office.com/en-us/article/freeze-or-lock-rows-and-columns-3439cfe6-010c-4d2d-a3c9-d0e8ba62d724?ui=en-US&rs=en-US&ad=US

visualize 2-dimensional array visual basic

I started making a very simple application where a list of names is shown in a checked-listbox.
Now I would like to add a date as a second column value. This means i have two use a two-dimensional array.
What containers could be suitable to visualize a 2 dim-array on a form?
I was thinking as an alternative I could keep it one dimensional and use a delimiter. Would there then be a method to format this date on the extreme right side of a listbox? I guess I would have to extract the date part, but I don't see how i could position it in a listbox.
I am working with VS2010 and using a windows forms project. I have no experience in VB (but some in c++), and no experience with GUI's at all.
Thanks in advance
Either the ListView in details/report mode or the DataGrid would be good. Personally I prefer the ListView when possible.

VB.NET - Duplicate existing form in FOR loop

Hey, I'm building a code editor app in VB.NET (Framework 4.0) and it opens all ".por" files into individual forms consisting of a MenuBar and TextBox (multi-line).
Currently I have 20 forms (all duplicates of the first on I designed) and if there are say 4 ".por" files in a directory, the first four will open up while the others hide.
I think it would be far more efficient by coding a new form For each item in form1's ListView...but I want the next so many to be a copy of the first form I designed since I spent a good bit on it.
Thanks in advance!
I decided to use tabs instead.
It wasn't difficult, the problem was I didn't know how to use a form I couldn't see.
By sticking to tabs and making a huge IF statement, simply making a new tab for each new file, and I'm getting used to using controls which haven't actually been created with the designer.
Just passing through a wall here...