
nbrege
Avatar/Signature-
Posts
34 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by nbrege
-
How can I edit/alter a PDF file through VB? Specifically, I want to search through a PDF file for some specific text & replace it with other text. What do I need in order to accomplish this? Acrobat SDK? 3rd party control? Thanks for any help or recommendations...
-
Is there a way to find all the users who are currently logged on to our Windows network? I searched through the past posts but couldn't find anything helpful. Thanks for any help...
-
You have a "win32" in your .StartInfo line that's not in your command line. Could that be the problem? Also, is the filename "dbeng.exe" or "dbeng8.exe"?
-
Is it possible to create a simple terminal emulator program similar to HyperTerminal using VB2005 Express? Could someone point me in the right direction or to some sample code? Thanks...
-
Is there a way to close an error window of another application? I am using proc.start & proc.close to programatically start & close an application, but when my VB app executes the .close method, the other app does close, but it gives an error. It is the common error window where you have the option to send or not send the error report to Microsoft. Is there a way I can close that error window programatically? Thanks...
-
This seems to be the easiest way so far. It lets you read all the attributes of a shortcut as well as change them or create a new shortcut from scratch. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim WshShell As Object, Shortcut As Object WshShell = CreateObject("WScript.Shell") Shortcut = WshShell.CreateShortcut("c:\\Shortcut Test.lnk") MessageBox.Show(Shortcut.targetpath) End Sub This code should run as-is...
-
I was just wondering the same thing. Also, is it possible to change the target of a shortcut or create a new shortcut? I hope someone can answer this...
-
The files are just text files that are created with notepad. How do I determine which events are being fired?
-
I have set up a FileSystemWatcher component in my program to watch a certain folder for new files. It is working fine except that it is firing 2 or 3 times whenever a new file is created in the watched folder, which is causing problems elsewhere in my program. Is there a way in which I can set the FileSystemWatcher component to fire only once for each new file that gets created? I have tried changing the .NotifyFilter property to the various options, but I still get the multiple events firing. Thanks for any help...
-
Here is another way: Dim t1 As Integer = My.Computer.Clock.TickCount executeROApproval() Dim elapsedtime As Integer = My.Computer.Clock.TickCount - t1
-
Get List of Files in a Directory
nbrege replied to session101's topic in Directory / File IO / Registry
If you're using VB2005 you can use : My.Computer.FileSystem.GetDirectories("C:\\Temp",FileIO.SearchOption.SearchAllSubDirectories, "*.pdf") -
I have been assigned the task of finding a way to make our VB apps run-able from our network. From everything I've read about doing this, it sounds like I have to run the .net framework wizard & change the setting for the .exe file to be fully trusted. I don't actually have the wizard on my machine to try it & our network admin is reluctant to try it without knowing exactly what to do. So I have several questions on this: 1) Can someone walk me through the exact steps in the wizard to configure a VB app to run from a network share location? 2) Will every machine need to be configured individually for each app that needs to be run? We have 100+ users that will need to run up to maybe 5-10 different apps. That seems like it will be a lot of work. Is there an better way? 3) Can we configure a folder to be fully trusted, so that any app in that folder will be run-able? This seems like the easiest solution, if it is possible. 4) We also have about 50 users running thin clients on a citrix server. Will they be able to run our VB apps? If so, how do we do this? Any help or advice will be greatly appreciated. Thanks...
-
How can I print a line of text on an angle ... say at a 45 or 90 degree angle or any angle for that matter? Thanks...
-
So, just for the heck of it, how would I do this using regex?
-
How do I use IndexOf? I'm not familiar with it. I'm currently using .Contains twice, but I thought maybe a regex would be better.
-
I want to check a string to see if it contains (2) specific words. ie. if the string contains "red" & "blue" anywhere in it, in any order, then return true. Can someone show me a regex to do this? Thanks...
-
I have a notify icon in the system tray for my application. When I right click the icon, a menu pops up with 3 items to pick. Here's where I'm stuck - how do I make my program do something when I pick one of the 3 items on the menu? ie. what is the event to catch the click on a context menu? Here is my code so far: Public Class Form1 Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ' Initalize the NotifyIcon object's shortcut menu. Dim menuList() As MenuItem = New MenuItem() {New MenuItem("Menu 1"), New MenuItem("Menu 2"), New MenuItem("Exit")} Dim clickMenu As New ContextMenu(menuList) NotifyIcon1.ContextMenu = clickMenu End Sub Private Sub TrayButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrayButton.Click NotifyIcon1.Icon = System.Drawing.SystemIcons.Information NotifyIcon1.Text = "Tray Test" NotifyIcon1.Visible = True Me.Hide() End Sub Private Sub NotifyIcon1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles NotifyIcon1.DoubleClick NotifyIcon1.Visible = False Me.Show() End Sub Private Sub ExitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitButton.Click NotifyIcon1.Visible = False Me.Close() End Sub End Class Thanks for any help...
-
Thank you ... you have been a great help.
-
Thanks yet again. One last question for you ... is it possible to specify two completely different patterns in the same regex? Is there some sort of OR operator I can use? I will check out some of the tools you suggested so I don't have to keep bugging you about this...
-
Thanks, it worked! Heres another one for you ... suppose I want to match all strings that either start with "J" followed by 6 digits (ie. "Jxxxxx") or just start with 6 digits (ie. "xxxxxx")? The leading "J" may or may not be present. Can I do that with one regex? Thanks...
-
Iceplug ... you have any code for this test app? I think it would be a good way for me to learn regular expressions. Thanks...
-
I have never used regular expressions before so please excuse my stupidity. I just need to check for strings that matches a particular pattern, in this case, a "J" followed by six digits. ie. "Jxxxxxx" Here is the psuedo code: If testString = "Jxxxxxx" Then 'do some stuff End If Can someone show me how to code this in VB2005express? I searched through the forums but couldn't find any examples. Thanks...
-
I get the following error: The CLR has been unable to transition from COM context 0x1a01d0 to COM context 0x1a0340 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations. when I run the following code: Dim files As ReadOnlyCollection(Of String) files = My.Computer.FileSystem.GetDirectories(pathString, FileIO.SearchOption.SearchAllSubDirectories) This just gets all the sub-directories in a specified folder. The error only occurs when pathString is set to a folder with a lot of subfolders in it (4000+). I dont know how to interpret the error message to make this code work. I just know that after 60 seconds the program errors out. Can anyone tell me what I need to do to make this work when there is a lot of folders/subfolders? Thanks...
-
I need to make an application that performs a task at a given time each day, based on the system time. For a simple example, lets say I want to delete all the files in a folder at 11:00 am everyday. The program would obviously be running on a computer thats always on. What is the best way to do this? Do I continuously compare the current time with the target time & when they're equal fire the event? This seems like a waste of cpu resources, but maybe thats the only way to do it. Can somebody post some code to get me started on this? Thanks...
-
I need to send a text file on the local machine to a unix server. I know the IP address, username & password to connect. I have tried using the following line of code: My.Computer.Network.UploadFile("c:\test.txt", "10.2.2.10", "username", "password") This gives me the following error: '10.2.2.10' is not a valid remote file address. A valid address should include a protocol, a path and a file name. Parameter name: address Do I have to specify the destination path on the remote server? If so how do I specify that with an IP address? Maybe like this ... 10.2.2.10/foldername/subfoldername/etc... ? I am able to ping the server & get a response. I am also able to send the file using the Dos ftp command. I just don't know the proper syntax in VBexpress. Thanks for any help...