
laroberts
Avatar/Signature-
Posts
35 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by laroberts
-
I have an appication that has a status screen on it. This is a software package and I do not have the source code or anything like that for it. I want to create a VB application that will monitor this status screen in this application for any change, if there is a change of anykind, it will then popup an alert screen and make a beep. The reason for this is due to the fact that the application screen that i want to monitor is a automated job runner at work. We have been having an issue where an job failes but no alert is getting send allthough the status screen is updating. So if I write something like this to monitor this screen for any change I can create my own alert. I hope everybody understands what I mean. :-) I basiclly need to monitor another Windows program with one I write in VB. Any help would be great. I have been looking for examples of how to monitor applications with another application in VB but have been unable to find anything. Thanks!
-
More... No the code is right and works on everything else just not on this but I think I found the problem. The software its talking to is UNISIS. I found they use some sort of interpiter using InterCom so I think this is whats screwing me. Hell I even tried using chr characters and still nothing past O. I am going to e-mail them and see what they say.
-
I am having a really strange thing happen to me when I am attempting to use shell.sendkeys on a program called INFOConnect Accessory Manager for UNISIS. Here is the code: private sub sendkeys (byval key as string) shell.sendkeys(key) threading.thread.sleep(500) end sub private sub button2_click (byval sender as system.object, byval e as system.eventargs) handles button2.click shell = new iwshruntimelibrary.wshshell shell.appactivate("Accessory Manager") threading.thread.sleep(900) sendkeys("Pack Spring") end sub Now when I try this it spells out: ack ing Thats it!!! :-( I have tried everything to get it to put the rest of the letters in there. I even tried changing it to PPPPPPpppppach Spring and it still droped all the P's. Any ideas as to why it just will not show certain letters and how to fix it maybe? Thanks! ****UPDATED**** Ok I have figured out this much, the program I am attempting to talk to will not take any letters past O. Figure that one out. I have tried breaking it up and everything but if its a letter past O it will not show it. For example if I send: abcdefghijklmnopqrstuvwxyz It will stop at O Even if I break that whole line into half or just send the second half it will not show.
-
Append/Remove info in a txt file
laroberts replied to laroberts's topic in Directory / File IO / Registry
Uuuumm.... Ummmm.... ok..... How the hell do I do that? Sorry, really new to all this. Thank you -
I am trying to figure out how to remove a line of text from a txt file from within VB.NET. This is what my current code looks like, I put a line that says ***** where I know the delete command should go. I can not figure out how to do this. The item that I want to delete is contained with in JobFile dim FILE_NAME as string = (String.format(H:\Operations\{0}\{1}\Master.txt", DayOfWeek, ShiftAssigned)) dim objwriter as new system.io.streamwriter(FILE_NAME, true) dim jobfile as string = CStr(Me.ComboBox3.SelectedItem) ***** The delete command should go here!!!***** Beep() MsgBox("Master List Updated.") Thank you!!!
-
I have a button on a form that links and starts up a web page in Internet Explorer. The web page has a user name and password login. Is there a way to have a VB.NET application fill in the information automaticlly and log in? Thanks!
-
I need to find a way to pause to allow time for the TelNet connection to take place and then answer the user name and password when it asks for it. Right now this runs so fast that it goes right through it before the TelNet is ready. Can somebody please show me an example of how I can do this with the code below. Thank you Private Sub TelnetGuiApp_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load m_Socket = New ASOCKETLib.SocketClass m_Constants = New Constants m_Socket.Protocol = m_Constants.asPROTOCOL_TELNET 'Host For FTP Location Dim TXT_HOST As String TXT_HOST = "library.uah.edu" m_Socket.Connect(TXT_HOST, 23) TXT_RESULT.Text = m_Socket.LastError.ToString() & " (" & m_Socket.GetErrorDescription(m_Socket.LastError) & ")" ' User Name For Host Dim TXT_COMMAND As String TXT_COMMAND = "guest" m_Socket.SendString(TXT_COMMAND, 1) TXT_RESULT.Text = m_Socket.LastError.ToString() & " (" & m_Socket.GetErrorDescription(m_Socket.LastError) & ")" ' Password For Host Dim TXT_PASSWORD As String TXT_PASSWORD = "5345" m_Socket.SendString(TXT_PASSWORD, 1) TXT_RESULT.Text = m_Socket.LastError.ToString() & " (" & m_Socket.GetErrorDescription(m_Socket.LastError) & ")" End Sub
-
Not sure Yeah I tried the thread method but that really did not work, I was thinking I could do some kind of timer or something but I am not sure how I would do it.
-
I am doing a TelNet deal with VB.NET however I am having one issue, the user name and password is getting sent to fast. How can I slow it down or make the program wait for the telnet to ask me for the user name and then password? Code below: Private Sub TelnetGuiApp_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load m_Socket = New ASOCKETLib.SocketClass m_Constants = New Constants m_Socket.Protocol = m_Constants.asPROTOCOL_TELNET 'Host For FTP Location Dim TXT_HOST As String TXT_HOST = "library.uah.edu" m_Socket.Connect(TXT_HOST, 23) TXT_RESULT.Text = m_Socket.LastError.ToString() & " (" & m_Socket.GetErrorDescription(m_Socket.LastError) & ")" ' User Name For Host Dim TXT_COMMAND As String TXT_COMMAND = "guest" m_Socket.SendString(TXT_COMMAND, 1) TXT_RESULT.Text = m_Socket.LastError.ToString() & " (" & m_Socket.GetErrorDescription(m_Socket.LastError) & ")" ' Password For Host Dim TXT_PASSWORD As String TXT_PASSWORD = "5345" m_Socket.SendString(TXT_PASSWORD, 1) TXT_RESULT.Text = m_Socket.LastError.ToString() & " (" & m_Socket.GetErrorDescription(m_Socket.LastError) & ")" End Sub
-
How to delete a file in VB.NET
laroberts replied to laroberts's topic in Directory / File IO / Registry
?? Huh? I don't understand.... -
I am having a problem trying to delete a file from within VB.NET. Below is the code I have now.... Can somebody tell me why the deletefile is not accepted. I know you can do a savefile or loadfile... How can i set it to delete a file? Thank you Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click 'Delete Monday Third Shift Job Number Dim textbox3 As String If textbox3 = "4535" Then Dim selecteditem As String = CStr(Me.ComboBox3.SelectedItem) Dim selectedjobnum As Integer = selecteditem.Substring(selecteditem.IndexOf("#"c) + 1) 'Process.Start(String.Format("E:\Job{0}.rtf", selectedjobnum)) RichTextBox2.DeleteFile(String.Format("J:\OperationsGenie\JobsHelp\Monday\ThirdShift\{0}.rtf", selectedjobnum)) Else MsgBox("You have entered an invalid Code. Please enter the code located is the validation box to proceed.") End If End Sub
-
I have a form with a couple of buttons on it. I do not want 3 of the buttons to enable untill the first question is answered on the form. How do I send a command in VB.NET to enable these buttons? Thank you
-
Opps... Yeah figured that out, lmao. Sorry, told you I am really new. Thanks!
-
This part does not work Hey thank you for the help. Most of it works however it does not seem to like this line... btnOkay.PerformClick() It is complaining about the btnOkay Any ideas?
-
On a form of mine I have a textbox in which a user places his password, below this box is a button that says Login. I would like to make it so that the user can just type in their password and either hit that button or just hit enter. How can I make it use the enter key as well from that box? Also when the form loads... How do I make the cursor default right to inside that textbox so they do not have to click in it before typing? Thank you!!!!!! :D
-
Works perfect! Thanks guys!
-
Thank you!h Hey thank you, I will give this new code a try in a little bit and see what happens. Yes, the string was to generate a full path. Like I said, I am really new to VB.NET. I have been teaching myself everything from books and with help from people like you. I love this site and really do appreciate the help of the members here. ;) Thanks again!
-
Ok I have a form... on the form is two combo drop down boxes. Also there is one text box. In the first combo box which is named: ComboBox22 The item listed in this box are the following: Monday Tuesday Wednesday Thursday Friday Saturday Sunday In the second Combo box which is named: Combobox23 The items listed in this box are the following: First Shift Second Shift Third Shift The text box on the form is named: TextBox1 Also there is a RichTextBox on the form for the person to fill out. Then there is a save button. I currently have the save button code looking like this: Dim dayofweek as String = CStr(Me.ComboBox22.SelectedItem) Dim ShiftAssigned as String = CStr(Me.ComboBox23.SelectedItem) RichTextBox1.SaveFile(String.Format("E:\", "Dayofweek", "\", "ShiftAssigned", "\", "({Textbox1}.rtf")) Now I am very new to VB and I am not doing something right with the above code cause when I push the save button it says: Access to the path "E:\" is denied" Not possible as its my own drive but I know its my coding. Can somebody please show me the correct code for this. Basicly the user needs to select a day of week from the first drop down, then select the shift from another drop down, then type in the job number they want to assign to it, then type some text for the RTF file then press save. When they press the save it should look out on drive E for the day of week folder, then the shift folder and then create a rtf file within that folder with the job number they gave it. MAJOR BIG THANKS!!!! IN ADVANCE!!! :o
-
No I can shutdown the application just fine if I use a button for it. Its when a user pushes the X in the right hand corner. I do not want to shutoff the controls up there so there must be a way to take care of that when they push it.
-
I have noticed with my VB.NET program that when I click on the X in the right corner of the window to close the program it is still running as a process in Windows. How do I stop this from taking place? When I push the X I want it to clear out of Windows completely. I know you can use application.exit to terminate everything but that does not help if somebody hits the X in the right corner. Thank you
-
Got It! Ok I figured it all out, its working perfect!!! MAJOR BIG THANKS for the help. :D
-
Nope still not working even after I change that. I do not think its the code thats the problem.... How should I format the name of the files for it to load? Another words should they be called "Job#xxxx" or "#0000" or just"xxxx" I think thats the problem and I am not sure exactly how this code is formating it. Thank you.
-
OH!!!! Now I see it. Thank you
-
??? What? I don't get it? Sorry....
-
Not working.... For some reason this is not working. I keep getting this error..... The system cannot find the file specified. It never changes the 0 to the job number that is selected from the drop down list...