|
Hello all,
Greetings for the day! I am working on a MOS Client , and i know all the stories in a rundown should have a unique ID, but i want to know whether we can have multiple story with same name inside one runorder. I read the MOS documentation thoroughly but can't figure it out. Any help will be highly appreciated. Thanks
Ankush Seth
|
|
|
|
|
Hi;
Does someone have an idea about creating a B2B procedure in vb6 or vba using the AS2 protocol to send and receive xml files.
I highly appreciate your help because I need it To upgrade my Access database.
Thanks.
|
|
|
|
|
As VB6 has not been support for many years it seems unlikely you are going to get much support for this.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello !
Does the vb.net 2013 has any possibility to compress a file with password protection ? I mean a built in feature without external tool ?
if , yes how can I do ?
Thank you !
|
|
|
|
|
That's depends on exactly what you're talking about.
No, VB.NET and the .NET Framework do not have anything built in to do this. YOU have to write the code to do it.
Now, in precise terms, what do you mean by "encrypt a file with a password"? Sure you can do that. Just pick an encryption algorithm and write an app that can accept a password and a source file, do the encryption using the password as a key or and/or salt and output an encrypted file.
Obviously, the app would also need to do the reverse.
Now, what exactly are you doing with the encrypted file and what do you hope to prevent?
|
|
|
|
|
No encrypt , just compress ( like .zip file) , but with a password to extract.
|
|
|
|
|
The .NET Framework ZIP file support doesn't support password protected Zip files.
You have to either write that kind of support yourself or use an external library, like DotNetZip[^].
|
|
|
|
|
I've seen the use of the CodeModule class to get the module code and procedure list from a project's modules. I've also seen the Find command to locate text.
However, I haven't found a way to jump to a particular line of code without changing it. The Find command doesn't seem to move the cursor.
Are there any examples of how to do this?
Ideally, I'd like to learn how to create a pane to list items that would allow a user to click and jump to code in a module.
Thanks.
|
|
|
|
|
You want to write an extension for an IDE that came out 17 years ago??
You're not going to find much more information than this[^].
There are examples out there. You just have to Google for "Visual Studio 6 add-in".
|
|
|
|
|
Hello !
Is there a way to detect if a file is a Word or Excel file regardless of the extension ?
I mean a file may be a Word file but has no extension ( by mistake ) , and also a file may have the .docx extension ( by mistake ) but it's not a true Word file.
What can I do ?
Thank you !
|
|
|
|
|
Some files contain identifiers at the beginning, but there is no guarantee that the file will be what you expect.
|
|
|
|
|
There is no 100% effective way to do this, other than opening trying to open the file in Word or Excel.
You can open the file using the normal file operations and look at the file header but you'll have to compare the header to the known headers of each file type you want to support.
But, that in no way means that you're really looking at a Word or Excel file.
|
|
|
|
|
Theoretically you could simply attempt to open it with all file-format-reading-"procedures" you have available and see if any of them work.
But I would suggest to simply not bother. Other applications also just tell you something like "invalid file format". You can't take care of every eventuality. There's probably other stuff related to your application where investing your time instead would pay off more.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
ok , but to display an "invalid file format" message , I want to know how to detect that this file is invalid ? for example how to detect if a .doc file is not a real Microsoft Word file ?
|
|
|
|
|
You could use Microsoft Office Interop to try opening it - if it succeeds it's probably a valid Word doc.
The simplest example I know of is in C# but I'm sure you'll be able to read it:
http://www.dotnetperls.com/word[^]
Suggested Google search terms for further reading:
vb.net word interop
vb.net open word interop
codeproject vb.net word interop
As you might have already guessed, there's also interop-functionality for other Office applications like Excel, so you could replace "word" with "office" in those search terms if you're also interested to validate other Office file types.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
Hello !
I want to give to my application the possibility to drag and drop some kind of files from windows explorer inside my application.
But before the Drag and Drop operation be completed , I want to detect some details :
1. The user is Dragging a files or folders ?
2. What is the number of Files being dragged ?
3. What is the type of files being dragged ( for example the files may be Word files , Excel files...etc , so how to find the type of each file being dragged )
Hoe can I find these information before the drag and drop process is completed ?
Thank you !
|
|
|
|
|
I think you really need to read up on Drag and Drop[^] first. A lot of what you're talking about already happens in a normal drag and drop operation.
You'll get a list of filepaths. Use the System.Io.Path class to figure out what those files/folders are.
|
|
|
|
|
Hello !
I have only 1 problem :
In the DragEnter Event ,I have an instruction like this :
.....
Dim ext = System.IO.Path.GetExtension(files(0))
If Not ( ext.Equals(".xlsx", StringComparison.CurrentCultureIgnoreCase) Or ext.Equals(".xls", StringComparison.CurrentCultureIgnoreCase)) Then
e.Effect = DragDropEffects.None
Return
End If
.....
The problem is that with this code , I'm expecting that all the drag operation that not contain .xls or .xlsx will be cancelled .
But I have a strange behavior : All the other files that doesn't have .xls or .xlsx are blocked to drag-drop , except the .txt files. The files with .txt extensions will still be drag drop.
Why ?
Thank you !
|
|
|
|
|
Well, that's not all the code in the DragEnter event.
And you're only checking the first filename extension with files(0) .
|
|
|
|
|
Hello !
I'm creating an application in VB.net 2013 , with entity Framework 6 and SQL server 2008R2.
I have noticed that every query that run for the first time ( against a specific entity ) , is too slow comparing with other queries.
For example :
Dim query= ( For t in context.Mytable1 where t.nr>5 select t).Tolist --------- Read only 1 records - 25 seconds
Second execution
Dim query= ( For t in context.Mytable1 where t.nr<5 select t).Tolist --------- Read 400 records - 2 seconds
If I try to execute a query against another entity , it's the same scenario , the first time is too slow.
I have tried to use pre-generated views using a tool on NuGet , but there;s no difference.
What can I do ?
Thank you 1
modified 25-May-15 3:51am.
|
|
|
|
|
You are not comparing like for like, the two queries are different. The first includes a where clause, which means the database must read every record and test for that condition. The second query just extracts all records.
|
|
|
|
|
it's just a mistake on typing. I have corrected in my question.
I try 2 queries with different condition , just to show that even the second query read more records , it's faster.
Of course , If I do the same query the first and the second time , the second time is faster.
|
|
|
|
|
How does one query return only 1 record, but the same query run later returns 400? Or is that another typo? It may be that information is cached in the server, so it is found faster the second time.
|
|
|
|
|
The first query has the condition >5 , the second query has the condition <5.
It's not the same query.
|
|
|
|
|
Then you are still making different comparisons so your test is not valid.
|
|
|
|