Hi everyone,
I'm using vb 2005, and I'm trying to make an application which waits for another application to start, then displays information about that application, including the command line calls made to it and the start-up time. Is there an object that would give this information?
Thanks.
User Profile
Collapse
-
Trap command line calls by other apps
-
In regard to my last post, perhaps not the most efficient, but certainly the simplest. This may get slow if you're trying to use it on large directories like C:, but for the most part it should be OK. -
The most efficient way would be to use recursivity:
...Code:Private Function getAllFolders(ByVal directory As String) As String() 'Create object Dim fi As New IO.DirectoryInfo(directory) 'Array to store paths Dim path() As String = {} 'Loop through subfolders For Each subfolder As IO.DirectoryInfo In fi.GetDirectories() 'Add thisLeave a comment:
-
Have you tried this?
Code:string number = yourstring.split(',')[1];Leave a comment:
-
VB web browser - new window
I've created a web browser application which makes use of the web browser control in VB 2005. However, whenever the user clicks a link which opens in a new window, Internet Explorer is used instead of my web browser application. When I checked the new window event of the web browser, there didn't seem to be any way to get the URL of the link or cancel the opening of Internet Explorer. Does anyone know how I can stop Internet Explorer from opening... -
-
vbscript date error
I have a script that generates a calendar. It's worked fine for two or three years now, but at the beginning of this month, the days were incorrect. It displays February 1, 2008 as being a Wednesday, when it was a Friday.
Here's the code:
[CODE=vb]
dim startday
startday = weekday(month & "/" & day & "/" & year)
select case startday
case 1
'Sunday... -
You mean you want each line in the file to be an element in the listbox? If so...
[CODE=vbnet]Private Sub btnload_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles btnload.Click
openFileDialog1 .InitialDirecto ry = "d:\"
openFileDialog1 .RestoreDirecto ry = True
openFileDialog1 .Multiselect = True
If openFileDialog1 .ShowDialog() = DialogResult.OK Then
For Each...Last edited by Killer42; Nov 19 '07, 02:36 AM.Leave a comment:
-
If you're just printing out the value in a console, you can format the number in the "printf" statement like this:
[CODE="c"]
printf ( "%.2f" , your_decimal );
[/CODE]
That will take a decimal value, round it to two places, and print the result. For example, if you had 12.5621, the output would be 12.56.Leave a comment:
-
-
Print Screen
Hi,
I'm trying to create a basic screen recorder, so my program takes screenshots at intervals of 200 ms. To take the screenshots, I have the following:
The problem is, whenever the code is called, it delays all running applications...Code:System::Drawing::Bitmap ^Screenshot (void) { SendKeys::Send("^%{PRTSC}"); return gcnew Bitmap(Clipboard::GetImage()); } -
Try getting the screen size through My.Computer.Scr een.PrimaryScre en, and adjust the PictureBox size according to the screen's width and height.Leave a comment:
-
A URL file looks like this:
So, to create one:Code:[Default] BASEURL=http://www.yoursite.com/yourpage.html [InternetShortcut] URL=http://www.yoursite.com/yourpage.html
[CODE=vb]
dim writefile as new IO.streamwriter (yourfile)
writefile.write line("[Default]")
writefile.write line("BASEURL=" & yourURL)
writefile.write line("[InternetShortcu t]")...Leave a comment:
-
Try this:
Warning: execution will stop at the "die" clause. If you need more to happen after the "die", do this:Code:$myFile = "images/p".$pic."n1.jpg"; @unlink($myFile) OR die("the user was deleted but there was no image attached to the user");
...Code:if (!@unlink($myFile)) echo "the user was deleted but there was no image attached to the user";
Leave a comment:
-
Try the "." opperator:
[CODE=php]echo "<td class='paratext '>" . odbc_result($se t,"somefield" ) . "</td>";[/CODE]Leave a comment:
-
VB 2005 question
Hi,
I'm using VB 2005 (express edition), building a windows application, and I'm wondering if the following is possible:
I want to take another running application (not built with or otherwise associated with VB), make an exact copy, in the state that it's in, and start up the copy, with the original continuing to run.
For example, let's say I had notepad open with the text "random message" typed...
No activity results to display
Show More
Leave a comment: