VB6 Transcription - Program That Contains A 2d Grid Of Panel Objects
Oct 13, 2010
I have a program that contains a 2d grid of panel objects and I just realized that the computer I need to run this program on does not use .Net4 and I cannot upgrade its framework either. Because of this, I have to rewrite the program in vb6, which was not so bad until I had to make the grid of panels...
Here is the code I am using in vb2010 to make the grid and I was wondering how to transcribe this into vb6.
Dim regionGrid(0 To 37, 0 To 37) As System.Windows.Forms.Panel
(in nested loop)
regionGrid(i, j) = New System.Windows.Forms.Panel()
how can i implement a pre vb.net style snap to grid effect on a panel (at design time)?if you remember, you start dragging a control + the grid has a (gravitational) pull on the control
i have created a panel wherein i am to insert the labels and data needed for printing. i have found a code to print labels and textboxes, however, datagridview is not included in the code.
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click PrintDocument1.Print() End Sub
my panel contains datagridview and labels, i think i copied the code here. the problem is, it only prints labels, textboxes, and pictureboxes as the code states in the conditional statement. here is the code i am using:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click PrintDocument1.Print() End Sub Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Visual Basic 2005 I have a DataGridView on a form. It's bound to a DataSet, and I'm working by way through the dataset doing various things to the records based on the "status". What I would like to do is scroll the grid, so that the row that the program is 'looking at' is in the middle of the grid.
I have a custom class (Class1) with a bunch of properties. One of the properties of this class is another custom class (Class2) with its own properties.I have a property grid with the selected object set to Class 1. I can see Class 2 as a property, but i would like to expand Class 2 to show its properties in the same property grid.
Im basically trying to do the exact same thing as the Font Class on a form. If you look at the properties of a form in the designer, you can see the font property. You can then expand that to show the properties of the font class.
I need to center the red panel in the middle of the dark grey panel, when you resize the form the red panel should be in the middle, and the red panel can't be resize, anyone have a code or property to do this?
How can I retrieve data from a gridview to text box in VB.NET? I want to select the first row of values (suppose that it contains:rollno and name) and to display it in textbox1 and textbox2. That is, I want to display the values of selected rows.
I have created a basic OS with VB.net and in that I have a panel docked at the bottom which would be my taskbar. My problem is if i minimize any forms or programs I open they all minimize to the windows taskbar. How can i make them minimize to my panel?
I use Vb 2003 and SQL server as the DB. The SQL server is on the server. I use a RS to populate the Data grid. But for some reason the it wont populate and I will have to get out of my program and then load it back on for the RS to populate the grid. I tried putting a message box just to give the RS to receive its data from the SERVER but still it wont work. It does not happen all the time. I don't think it is a problem with VB or SQL SERVER, I think the Server is not returning the request.
I have a datalogger with his own program on Windows via a RS232 port. This datalogger records data in two ways :
1- continuously (see picture 1) 2- when pressing 'Start recording' button.
The datalogger record a value each 1 sec. Between 2 values, I need to move a stepper motor. I want to synchronize the stepper motor with the datalogger. So, right after the data is recorded, I move the motor and I wait for the second data to be recorded, etc. The problem is the synchronisation. I have access to 2 triggering method when the data is recorded :
1-when a row is added in the grid (picture 1) 2-when the 'Recording' value change (from 5 to 6 by example)(picture 2)
The easiest option would be the second one because the 'Recording' value isn't a textbox, it's included in the general form. I cannot access to it directly. The class of the datagrid is Thundergrid and his name (Caption) is LIST. I want a VB program that will do the following..When I press a button in My Form :
-Get the handle of Thundergrid class, LIST named. -Wait until the datagrid row number is 10. -Then, a variable n will count +1 at each added row in the datagrid. -Each time the n value will change (datagrid add a row), the motor will move. -When the n value = 121, the cycle is done and I can collect the data.
For the interaction with the motor, it will be done by grounding a pin in the parallel port.I do not need help with the motor control, only the n value need to be synchronized with the datagrid.Please refer to the attached pics. I used Winspector to get the class of the datagrid. It is in the red box.
winforms .net 3.5 Ultrawingrid 9.2 In my subclass of Ultrawingrid.Ultragrid :
[Code]...
This works fine. But when the grid is dropped on a TabControl tabpage, the ctrl-tab looks very different to the sub above. e.keycode is seen as controlkey {17} I realize that by default cntrl-Tab moves between tabpages. I need to override this behavior. My thought is I probably need a subclass of the tabControl which will pass the keycombo through just as the form does but I confess to being clueless as to how to accomplish that. I tried to override the onkeydown of a tabcontrol subclass and just issuing a return and not and base call to onkeydown if the ctrl-tab combo was pressed but it seemed to see the e.keycode as controlkey as well.
I have a Car object that does a few things, but I need the program to create New Cars without having to write the code for every new one. Basically, the user checks some combination of Checkboxes and then pushes a button. And I need the program to create a New Car with a unique name for each combination of checked Checkboxes when the button is pushed.
For example, if Checkboxes 1,3,5 were all checked, it would create a New Car that had a different name than the New Car that is created when Checkboxes 1,2,3 are checked.
But I also need the program to be able to check when a New Car has already been assigned to some combination of checkboxes, so that it doesn't create a New Car every time that Checkbox 1,2,3 are checked and instead will use the Car that was already created.
I have a panel sitting in a div, and I want to use that panel as a container to add more panels! Why would I want to add a panel to a panel? Because the panel that I'm adding to the existing panel, is also made to contain objects, but only and image and label.
The existing master container panel is created during design time, and goes by the lovely name of "toolboxpanel". During run time, I have a for/next loop that dynamically creates an image, a label, adds them both to a panel, then adds that panel to the toolboxpanel,[code]...
How to create composite grid. ie , i need all the features of gridview in the Framework 3.5 and above,but also need to include some other functionality to that grid.please suggest me what to do . if possible please share sample code.
How do you read a CSV file and display the results in a grid in Visual Basic 2010? This sounds so simple but I still can't find the answer to it after googling for a while. I have DataGridView on a form and it's called DataGridView1. I have a csv with just 3 columsn of data and I want to be able to display them.
I am student of MCS and i am working on my final project i face some problems regarding to show cubes data in grid control in vb.net around with dimensions
My project is a server/client application, how do I copy existing panel with labels and pictureboxes to show stats of clients connected? I mean once the server accepts a client, stats of that client is shown on a new panel but has the same contents as the existing panel. Any Idea how to do this? I was thinking to make a set of panels and hide them if there's no client connecting but what if there are too many clients connecting more than the set of panels already made?
This is simple program, draws a rectangle, marks the x & y axis, & plots a dashed line grid. However, the grid sub has to be called twice - only then will the grid line be visible. Why does this happen?
I would like to add an effect where a panel sweeps out of the way to make room for another panel. This is sort of like a sliding effect, and I think at one point in time this could be seen on Apple's website under their product pages. I came up with some code, but it isn't working.
i'm using the MVCContrib grid trying to override the start of a row and the end of a row. It's not working as advertised. This is an extract from my MVC2.0 view.
<div id="chargestable"> <br /> <% With Html.Grid(Model.InvoiceListingInformation) .Columns(Function(column)
[code]....
The stuff i put in the begin row and end row functions is being rendered above the grid entirely.(PS i can't just use the attributes as i need to wrap the row in another html element)
i have a prob that i have a gridview on the parent window. when i open a child window using showmodaldialog, i enter some data in the textboxes. now when i close my child window i want to display the text entered by me in the grid. i want to know how can i access the grid in child window
Trying to understand the basics of grid design so how would I make a over sized grid or a grid larger then whats viewable on my screen resolution? Below is a simple chart describeing what i want to make roughly. I would like to build the grid in "blocks".[URL]..
When a user is editing a given piece of data, they're allowed to add messages/comments. These are stored as child records in a SQL database. Clicking on the Add Message button brings up a panel (pnlMessage) courtesy of the AJAX ModalPopup Extender. This takes some input and, when the "Send Message" button in the panel is clicked (I learned the hard way to NOT make that the 'OkButton' property), the message is stored in the database and an email is sent to the intended recipients. No problem there.
However, I need to be able to allow the user to add new email addresses (so long as they are registered in our database). I have another ModalPopup / panel combo (pnlSearch) that's tied to a button on the previous panel (pnlMessage).
The user is supposed to be able to add an email or click on a search button to populate a list to choose from.
The pop-up panel (pnlSearch) comes up just fine, but clicking the "Lookup" button (which instigates the search and returns a collection of records that the user is supposed to pick from) closes the panel.
Previously, I ran into the problem of having the Button.Click event never firing when I put the Button into the "OkControlID" property (the CancelControlID works fine since I don't want to do anything). Removing the "OkControlID=Button" line allowed it to work perfectly with the Button.Click event firing as expected.
So now I have the Search panel with a button for "OK" and a button for "Search" - but the panel should stay up and visible after the Search.Click does it's thing. Am I missing some property that basically says "don't close the panel when this button is clicked"? Of course, if I bring up the panel again in the same session, the results from the previous effort are there (the search results).