So I've been doing a lot of reading today and apparently SendKeys isn't very reliable anymore.Does anyone know of another alternative to it for what I need:
The application works by the form being positioned over a open window, notepad, word, excel etc and it then determines what it is over, notepad, word, excel etc and then reads the file, and does some processing using SendKeys at the moment.Though I do believe I could probably change the later at some point. The problem I'm having right now is when I try to send the Alt + Tab to change focus it's working roughly 12% of the time.If you are wondering I ran it 50 times and it worked 6 of those,thus the 12%.I'm thinking that is rather unacceptable.This is what I'm using which should work: SendKeys.SendWait("%{TAB}")
First off, using VB2010. I'm in the process of upgrading some applications from VB6 to 2010 and haveing a great time of it. The current application I'm working on is using Sendkeys of which I have changed over to the WSH.Sendkeys of which is pretty decent. Basically the program is copy and pasting the current open file, reading some data and saving it as a different file type. It also has to change xls files to csv and then saving it to the format as well as a smiliar thing with word. Thus the reason for the copy and paste as it's changing the extension to a dot date (for example, test.830).This is the flow of how it works for a text file (most basic)
hey been looking around for an example of Sendmessege to send keys, but all you find is the basic notepad example, can anyone please show me the way to use Sendmessege to sendkeystrokes to any application (i have the hwnd)
What is the difference between SendKeys.SendWait and SendKeys.Send?Send obviously will just send they key immediately, but does SendWait actually wait for the message to be processed or does it also send it immediately?The function's name itself is just confusing. Which one should I use if I want to send keystrokes to a 3rd party app immediately, or is there no difference? To me, a few milliseconds is a big difference.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click CheckBox1.Checked = True While CheckBox1.Checked = True SendKeys("{END}") End While End Sub
That is the code, the error is "SendKeys is a type and cannot be used as an expression."
I'm looking for the underlying Win32 API call that the DotNET Framework invokes on a SendKeys.Send or .SendWait call, or a Win32 API Equivalent to SendKeys. I've already experimented with SetKeyboardState which seems like the way to go, except that it does not raise any kind of keyboard event that causes the set keystates to register with an active application or the OS (at least not until another key is pressed; for example I can meddle with the keyboardstate before events process on a natural keystroke, but I can't invoke a keystroke programmatically).
I have a VB.Net 2.0 application, on my form I am using a Component ONE PDF reader control.I am trying to send to this control a F4 keystoke to close the navigation panel when it opens the PDF file. It is not working or not accepting the sendkey.I put focus on the control first. Code below:
Me.PDF1.Focus()
Me.PDF1.Select()
My.Computer.Keyboard.SendKeys("{F4}", True)
I have tried different variations of the Sendkeys with no success.
I've created an app (VB.NET) where each installation of the app works with a single local database on the PC. No multiuser and no ability for the user to change databases - the database is effectively part of the app, with a fixed scema, only the data will change.At the moment the database is SQL CE. It has about 30 tables with some simple relationships between the tables.
I'm wondering if there is an alternative to SQL CE that might be faster in this scenario. Although SQL CE is excellent and easy to use, I get the feeling there is perhaps an unecessary overhead when using it for something simple - and it does seem a little slow when my app is doing complex stuff that interacts a lot with the DB. In my prototype I actually loaded the 'database' tables from text files into Arrays and developed subs and functions to perform the database searches etc. It was blindingly fast but I realised it wasn't a scaleable solution because it was an 'in-memory' database. A compromise would be to 'page' data into array when needed, but it all gets horribly complex and that's probably why some very clver people have created SQL CE !
Using VB.net, I have a namespace which I'd like to rename for the future. However, I'd also like to keep the old obsolete namespace for a time to ensure backward-compatibility for our consumers for awhile. Is there a way in .NET to have two namespaces, one ordinary and one that merely is an alternative name for the other?
Below is the code for a linked list search I have tried to implement in to searching through each of the elements of htmlelements .For some reason If element.InnerText = (item) will only work if if is only a string ("example") .Are there any other ways of Implementing the for each loop to search through my item linked list?
Original code for searching for 1 string
Private Sub block() Dim elements As HtmlElementCollection = webBrowser.document.All Dim word_found As Boolean word_found = False
[CODE]...
This is the Loop for item I have tried to implement but is not working ,because of the for each loop .The value of element.Innertext = "" or null when I try to use one of the linked list item[If element.InnerText = (item)] is used and only have a value when a string is used to [If element.InnerText = (google)]
Private Sub block() Dim elements As HtmlElementCollection = webBrowser.document.All Dim word_found As Boolean word_found = False Dim item As LinkedListItem = words.Head
I've encountered a problem in a application that I inherited. It contains a combo box that loads information.The problem is that there are more data that the control will hold (32767
Is there an alternative to Uri.EscapeDataString? I'm trying to upload an image, by converting it into a base64 string, but I need to use Uri.EscapeDataString on it first, and if the image is big then Uri.EscapeDataString will say that the URI is too long.
My clients web application is using TidyCOM to clean up dynamically created XML files from a SQL database query. With this TidyCOM, they are not able to upgrade the web application to .Net 4.0 framework. Is there an alternative to using TidyCOM so that these dynamically created XML files are validated correctly?
We heard a lot about the vulnerabilities of using QueryStrings and the possible attacks.Aside from that, yesterday, an error irritated me so much that i just decide to stop using QueryStrings, i was passing something like[code]....
My VB application also needs to manage simple appointments in an agenda, however one user has no MSOutlook. Someone knows of an alternative calendar tool, with which I can do this?
I need a good alternative for System.Web that is included in the .NET 4 Client Profile. Currently all of my frameworks are included in the client profile, except System.Web. What is a good alternative?
I have an MDI Windows Forms application (.net 2008) that allows the user to associate various file types with the application. I currently do this with a registry entry something like this, that causes the application to load and access the file name via the command line:[code...]
In the pre-.net version of the application, I used DDE (ddeexec in the registry). If an instance of the application was executing when a file was double-clicked in Windows Explorer, it would open the file without starting up a new instance of the application.
Now that DDE has been deprecated by Microsoft, what is the best way in .net for an executing MDI application to open an additional file when the file is double-clicked in Explorer, as opposed to starting a new instance of the application?
I'm running Visual Basic.net. I used to use the INKEY command, available in older DOS versions of Basic, to allow the user to change the flow of a program by touching a keyboard key. It seems to be available only in Visual Fox Pro. Is there an alternative for Visual Basic?
If I wanted to make changes in page site (using with WebBrowser, and only the user will see it) I would do it:
Dim Rstring As String = WebBrowser1.Document.Body.InnerHtml Rstring = Replace(Rstring, "Some Text To Replace", "<B>Some Text To Replace</B>") WebBrowser1.Document.Body.InnerHtml = Rstring
In my project i am using begin transaction commit or rollback changes. but this causes lock to the tables in that particular functionality.
So if the any other user does any other functionality those locked table are not available until the transaction is completed. I want to know if there is any alternative to transaction which insures data security but the tables are not locked out.
in my database i have an admin form, where it allows you to do admin stuff.Example: Allows you to enter price per membership, and change it.Problem i'm having is how would i save it, since all previous files had more than 1 records, so it would be in the form of:
FilePut(1, OnePerson, NumberOfRecords + 1)
Since this file will only cosist of one record, i don't know how i would save it.i tried FilePut(1, OnePerson, Index) But it doesn't work.
im a C# dev trying to convert some code to VB.net so I can use the Interop Toolkit 2.1. Im trying to find the out parameter alternative, Ive found that its ByRef but I cant quite figure out how to implement it.