|
Thank you
I am using this code to get files, but I can not get it to search for all files on C: drive.
How can I get it to show all files Like *.pdf of the dirve in the list box
Imports System.IO
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Public Class SearchAvi
Private Sub BtnGetAviFiles_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnGetAviFiles.Click
Dim dir1 As New IO.DirectoryInfo("c:")
Dim dir2 As IO.FileInfo() = dir1.GetFiles()
Dim files1 As IO.FileInfo
For Each files1 In dir2
FrmListBox.Items.Add(files1)
Next
End Sub
|
|
|
|
|
You also have search all SUBDIRECTORIES of a given Startpoint.
You should write a function getting all files and directories, and then you can call this function recursive (calling it for each subdirectory with an new startdir).
I cannot remember: What did I before google?
|
|
|
|
|
I suggest using a LIFO stack (Stack collection in .NET) in stead of recursing. I've done this a couple of times now and the basic algorithm works like:
Push start directory onto stack
loop while stack is non-empty
pop last element off the stack (directory)
do action on element (here: find all *.pdf files)
list all subdirectories and for each push full subdirectory path on the stack
end loop
|
|
|
|
|
I have an application that has a DBGrid on a dialog. When I view certain data in the grid, sometimes data is not displayed, but only when the application is installed on a Windows 7 machine. The exact same program works reliably on any XP machine. The grid has its "DataSource" property set to a Data ActiveX control. I know the data is read properly because i can loop through the data with a "while not eof" loop and see the data. I can also open the data in MS Access and use the exact SQL statement I am using to read the data for the DBGrid and the proper data is displayed.
Does anyone have any ideas? I have other applications that utilize these controls and I am afraid to upgrade any of my office PC's to Windows 7 becuse of this problem.
Thank you
|
|
|
|
|
Have you tried running the program in XP Compatibility mode under Windows 7?
|
|
|
|
|
Why are you not asking the manufacturer of the control this question??
They wrote it, they tested it, they support it. We didn't.
|
|
|
|
|
Is your Windows 7 machine 64-bit? I believe 32-bit ActiveX controls will not work in 64-bit applications.
|
|
|
|
|
True, but it won't cause an problem like this. He'll get some kind of "invalid image" error and the app won't even run.
|
|
|
|
|
Correct. I didn't read the question completely. Thanks for correcting me.
|
|
|
|
|
Hi all,
I've been tasked with ensuring our add-in works in both Powerpoint 2007 and Powerpoint 2010. We'd really rather not have to keep up with two sets of code - imagine the headaches that might entail. I've searched online and on CodeProject for what I need to do to enable functionality in both versions but apparently I don't have the right search terms. Anyone know of any article(s) or other postings that address this issue?
Thanks in advance for your assistance!
Denise "Hypermommy" Duggan
|
|
|
|
|
How about if you check the version of PP in your addin and react according to the version? I never programmed any PP addin and don't even know if you can read the version info but I know this works in Outlook and Word.
Tosch
|
|
|
|
|
I appreciate the answer. Yes, that does sound like a viable solution as long as I can code in VS2010 and it'll work in both of them. The problem I'm finding with coding this add-in is there's a dearth of information about programming for PowerPoint. Lots of info for how to use PP, but not much about programming for it.
But thanks for the assist. Any little bit helps.
Denise "Hypermommy" Duggan
|
|
|
|
|
Hi,
Is there a way to check if email is send or not in vb.net?
I have a program which will send an email using ms outlook.
When ever the user click the Email button on my vb.net form.
The email outlook message will display with it's recipients,
subject and body. Then user will just click the send button
after the user adds body information. Now,I want to trap
if user click the send button in email outlook form.
I want this so that if the user click the send button in email outlook,
I will automatically close the vb.net form.
Thanks in advance!
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
There is a Send-Event on the MailItem object in Outlook which is raised then the user hits the send button on an email.
Tosch
|
|
|
|
|
HOW TO MAKE SIMPLE WEB SERVICES IN VB6.0 ANY ONE KNOWS PLEASE EXPLAIN!!!!!!!!
THANKS YOU
WITH REGARDS
SATHISH
|
|
|
|
|
STOP YELLING!!!
You can't do it very easily. VB6 doesn't support it and writing a COM object that you host in an ASP web page is problematic at best.
Save yourself the immense pile of grief and move up to VB.NET where web services are very easy to write.
|
|
|
|
|
dineshp123 wrote: HOW TO MAKE SIMPLE WEB SERVICES IN VB6.0 ANY ONE KNOWS PLEASE EXPLAIN!!!!!!!!
Definitely not by shouting for "help" into a forum like that and using eight exclamation marks, the sure sign of an insane mind (according to Terry Pratchett).
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Hi to all,
I am trying to replicate Menu in Toolbar I can add a first level Toolbar Menu Item. But I am not able to second level or higher.
Is it possible to add multi level sub menu ?
Regards,
Nanda
|
|
|
|
|
|
hi Suresh,
Thanks for reply but I am using visual Basic 6.0
Regards,
Nanda
|
|
|
|
|
if you are using the drop down menu on the MDIform interface (Control E to get into it) then you will notice there are arrow buttons, use the right arrow to indent a menu option which makes it a sub menu of the first entry above it that has a lesser indent
left arrow reduces the level of the menu entry
not sure that was best explanation but try it and you will see what happens
Mike
|
|
|
|
|
Hi!
I've created InnoSetup output files for a VB application a long time ago. I lost the script files(.iss files). But I've the output files(Setup files). Is it possible to install the setup and retrieve the GUID(AppId) from the installation? How?
|
|
|
|
|
If you're talking about the ProductCode, then this is a script I use by putting a shortcut in the SendTo menu to get it. All I do is right-click the .MSI, Send To -> GetProductCode.
Dim msi,database,view1,record,productCode
Set msi = CreateObject("WindowsInstaller.Installer")
Set database = msi.OpenDatabase(WScript.Arguments(0), 1)
Set view1 = database.OpenView("SELECT `Value` FROM `Property` WHERE `Property` = 'ProductCode'")
Call view1.Execute
Set record = view1.Fetch
If record Is Nothing Then
MsgBox "Unable to find a ProductCode in the MSI database!"
WScript.Quit
End if
productCode = record.StringData(1)
Set record = view1.Fetch
If record Is Nothing Then
RecordsReturned = 1
Else
RecordsReturned = 2
End If
Set record = Nothing
view1.Close
Set view1 = Nothing
Set database = Nothing
Set msi = Nothing
If RecordsReturned = 1 Then
InputBox "The ProductCode is:", WScript.Arguments(0), productCode
Else
MsgBox "There was more than one 'ProductCode' record returned from the MSI database!!"
End If
|
|
|
|
|
I need the ability to print files out from our application. I can use the ProcessStartInfo to do this in the background with out any issue using the following code:
Dim psi As New ProcessStartInfo()
With psi
.Verb = "print"
.WindowStyle = ProcessWindowStyle.Hidden
.FileName = "C:\Quote.pdf"
.UseShellExecute = True
End With
I also need to be able to change the printer that it uses depending on the reports specified. But I need to be able to change the printer in the background without user interaction
Does anyone know how to change the printer for the print job? or am I going about this the wrong way?
Thanks
Simon
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Change the .Verb to "printto", then add the printer name, preferrably in quotes, in the Arguments property:
.Verb = "printto"
.Arguments = """printerName"""
|
|
|
|