Look at what you posted and think about what you supplied to us to help you solve this problem. NOTHING. We can't see your screen, your hard drive, see your code or read your mind. Hell, we don't even what kind of app this is! Is it Windows Forms? WPF? ASP.NET or MVC? or what?
Without seeing your code that loads the data and binds it to the grid and the code that saves it, it's impossible for anyone to tell you what you did wrong.
I have this dialog, I just want it to stay inside the mdi parent and be centered.
But I get this error message, I don't understand the top level vs mdi parent part.
credDialog = New dialog_credentials(True)
credDialog.TopLevel = True // Can't be top level and ?
credDialog.MdiParent = Me // generates the error below
credDialog.StartPosition = FormStartPosition.Manual
credDialog.Left = (Me.Width - credDialog.Width) / 2
credDialog.Top = (Me.Height - credDialog.Height) / 2 - 100
If (credDialog.ShowDialog(Me) = DialogResult.OK) Then // Windows Form Error
Additional information: Form that is not a top-level form cannot be displayed as a modal dialog box. Remove the form from any parent form before calling showDialog.
I know it's straight forward, remove the mdiparent.
I made a windows app that basically is a crawler for a friend. it crawls a dealer website and collect all the items, prices and stock.
The main window is a MDI parent.
The first form, MDI, is the main crawler that does the data acquisition. has a web browser
The 2nd form, MDI, allows you to work with the data collected. has a listview
I have 5 dialogs,
In hindsight, I really don't need the first form, so I'm going to try and move the functionality to the main Form.
I'll admin, I'm not an expert in windows program design, but decent at it.
I remember now, I run the progress dialog with MDI parent, so I thought I could do the same.
When I ran the UserInfo dialog with MDI parent, I wasn't able to get the values from the textbox in the dialog.
Imagine have a child window that is a Notepad like text editor. The MDI interface was designed to have multiple copies of that child window in the MdiClient area of the parent form, allowing you to edit multiple files at the same time.
MDI is an outdated concept that Microsoft doesn't even support/use any more.
What you're describing about your app doesn't lend itself to MDI at all, and frankly, I think hinders your UI by using it.
The rest is just dialogs.
I really don't need the child windows, I just need display containers that go full dock inside the parent window, but I have no clue how to go about it.
This is only my 3rd windows app in the last 4 years. So my UI and design knowledge is really out dated. I can write the code very well for function, but my UI program design is very 1996, which is when I wrote my last production windows app.
I have to get this project out this week, as a prototype for a future project next year.
But I will go back and remove each child window in the project after submitting the prototype.
They became hard to manage for me, but they did display correctly using the panel method.
Where do you put the code for the panels, that part was vague to me. I wanted to keep the code organized with the panels.
That's why I reverted back to the MDI forms for now.
We have a VB.Net 2010 Windows Desktop app that creates custom invoices for QuickBooks. The app uses the Microsoft.Office.Interop.Word reference.
For each item in the invoice we copy a row or table in Word via
Word.Find.Execute(Replace... to change the variables in a Template.Docx file to the real values.
The problem is that it takes too long. Doing 2 invoices with a total of 200 items is taking over 30 minutes on a I3280 quad 3.6 with 8 threads and 16G ram. This is running from a regular exe not from the vs ide.
That would not work since much of the data is not in QuickBooks. The Docx Template is also very complex. (We do use mail merge that with other programs when it fits but not with QB as a source but from an extracted file). The program also will save as a PDF and email the invoice once the new Docx file is created.
Really need to know how to speed up what we have currently.
Are certain Word functions just extremely slow? Are there replacements that can be used.
It is why Office should never be used in a development environment, that and the versioning nightmare it creates.
Personally I would use a proper reporting tool to generate the invoices. SSRS, Telerik, Dev Express all have excellent reporting tools that will use disparate data sources and produce the most complex output you could require.
Never underestimate the power of human stupidity