Good day, i have an application which can upload and preview image files, e-presentations, word duments, excel files and pdf files. On my program i used Web Browser Control and I'm planning to change the component or upgrade the software. Aside from Web Browser Control, what else can I use to preview those file types? Any suggestions and comments will be appreciated.
No, the error has occurred because a file cannot be found. Check the build logs to see where the file is supposed to be stored and check those directories. If the file is definitely missing then a re-install of VS should fix it.
Solution concept: I am doing a recursive search through directories to find Excel files and then silently open them to find all the macro code, copy the code and then store it.
Problem: When I open some Excel documents, some of these documents have external data connections (ODBC and XML Sharepoint Lists). When the refresh occurs prompts for data source credentials pop-up. Excel tries to refresh the data on this line:
before I can get the chance to iterate through the connection collection and disable refresh.
My code snippet for opening the Excel workbook is:
Dim ExcelWb As Microsoft.Office.Interop.Excel.Workbook
Dim ExcelApp As Microsoft.Office.Interop.Excel.Application
ExcelApp = New Microsoft.Office.Interop.Excel.Application
ExcelApp.DisplayAlerts = False
ExcelApp.EnableEvents = False
ExcelWb = ExcelApp.Workbooks.Open(FileName, , True, )
which is fine and everything else in the solution works.
The .ConnectionsDisabled property of the .Workbook object is a read only property, and as I say the refresh occurs in the .Open method before going to the next line of code, not giving me the opportunity to disable conneciton objects in the collection.
I am using the Interop namespace rather than the tools namespace, but I don't think that makes much of a difference regarding object methods and properties.
Is there a better way to manage this to disable the connection refresh?
I have a DataSet with two tables that have a common field.
Table 1 contains order header data and table 2 order row data. Both tables contain data of multiple orders.
I want to handle each order separately, and my current method is a loop inside a loop and a "manual" check. For example something like this:
ForEach rwH as DataRow in ds.Tables("H").Rows
'Get some header data'...ForEach rwR as DataRow in ds.Tables("R").Rows
If rwH.Item("KeyField").ToString = rwR.Item("KeyField").ToString Then'Get the relevant row data'...EndIfNextNext
The question is, is there a way to avoid having to loop through the rows, and use this sort of crudish comparison ?
I was thinking maybe creating a foreign key constraint. However, although I know how to create the constraint, I do not know how to use it to my advantage with any loop (assuming it is possible at all) ?
Or can someone suggest an alternative (better) method ?
All input is appreciated.
My advice is free, and you may get what you paid for.
Soooo, you're going to look at the same set of records (inner loop) over and over again, until you match them up with the records in the outer loop?? How many records in the outer loop again?? That seems AWFULLY inefficient.
Why not just create a SQL query that matches everything up for you?
In this scenario I need to create orders into an ERP system via a proprietary driver.
That means that I need to declare a new "order" object, and fill in all its properties. Some header data (customer name, and address, and such), and an unknown number of rows (product number, quantity, price, etc.). In addition I need to translate that same information into an email message.
So if I combine both header and row data into a single query, I would have to populate the header data of the order object over and over, for each row, or build in some kind of is-it-already-populated method. Somehow that does not seem very efficient (or elegant) either (I may very well be wrong of course).
For clarity, the header table will generally only contain between 1 and 10 records, the rows table however can contain anywhere between 1 and 150 records per header record. Eliminating the nested loop is therefore my main concern here.
My advice is free, and you may get what you paid for.
Several weeks ago you folks helped me with a problem and I have another problem I hope you can help with.
I created, with your help, a small program that spun three will like a slot machine and randomly placed 2 values and a sign, in picture boxes to create a very basic math problem to be solved. I did this for my 6 year old granddaughter and she LOVES IT!.
In fact she took the program to school and the teacher loved it as well. After a little work I jazzed up the program with some flashy graphics and sound. She wants to add the program to her teaching library. Before I give her a copy I wanted to add some animation to the reels by adding short AVI files. Creating the files was no problem, getting them to play was.
Can anyone steer me to some actually complete code that will play a AVI file in a picture box, that IS DOCUMENTED with remark statements so I can see what they are doing in the code.
On the same note is there a format the AVI file must be in to play? I learned that to play a wave file using the Autoplaymode function the wave file had to be in PCM format. Is there some such requirement for AVI files?