Sorry that im asking a lot of questions, i know, but i have a lot of things im curious about...
Well to begin, how do i make sure that the file that i am printing to keeps the original text that is already located in that file?
Second... In a screen shot application that uses CTRL + PRTSC then pastes to PAINT and SAVES how do you make it paste into paint and not another program?.... Script below.... - Public Class Form1
-
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
-
Me.Visible = False
-
End Sub
-
-
Private Sub Timer1_Tick3(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
-
Timer1.Enabled = True
-
Timer1.Interval = 3
-
End Sub
-
-
-
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
-
SendKeys.Send("^{PRTSC}")
-
Call Shell("C:\Windows\System32\mspaint.exe", AppWinStyle.MaximizedFocus)
-
SendKeys.Send("^V")
-
SendKeys.Send("^S")
-
SendKeys.Send("{Enter}")
-
SendKeys.Send("%{F4}")
-
End Sub
-
End Class
^ Also is there a way for the Form to hide itself faster, because you can see it pop up then go away?
- Is there a way to make an output for GetAsyncKeyState not be in all capital letters? I'm having trouble with that....
Finally... How would you be able to change the characters that are logged into a file from GetAsyncKeyState from strange characters that aren't easy to decifer to get logged as normal keystrokes?... Can i have an example of this? (You don't have to respond to all of this at once.... any help is appreciated) Anything that you know is much more than I do... so if you have anything to post about one of these post it) P.S. - I HAVE VB08 7 1971
As for the form visibility, you should be able to set it to False at design time. Either that, or don't start with a form. Start up your project using a sub in a module (if possible) then have it load the form without displaying it. I use VB6, so things may be too different. But I can just set the project to start up a sub called Main instead of a form.
Can you explain what you mean by "normal keystrokes" and "strange characters"? There are more characters than there are keys, so what do you want to do?
...how do i make sure that the file that i am printing to keeps the original text that is already located in that file?
Can you explain in more detail what you mean by this? Do you want to append to a file? And what sort of technique are you using to write to the file now?
As for Paint, you might be able to use an Automation interface to drive Paint the way we do with Office apps. If so, you'd have much more control than by pretending the user is pressing keys.
Oh, and I'm not sure what you mean about capitals from GetAsynchKeyState. If I remember correctly, that tests the state of physical keys on the keyboard, not what characters are coming from them. The "A" key is still the "A" key whether cap-lock is switched on or not.
Oh, and I'm not sure what you mean about capitals from GetAsynchKeyState. If I remember correctly, that tests the state of physical keys on the keyboard, not what characters are coming from them. The "A" key is still the "A" key whether cap-lock is switched on or not.
well do you know how i can have this happen instead?
well do you know how i can have this happen instead?
Sorry, I'm confused about what is happening, and what you want to happen.
This is for the ....brother control huh??
I was wondering whether it would be better to use the imagelist function that vb08 has....
instead of pasting it into paint.... Because it means you do not have to control another program...which might cause problems...it also then allows you to view the images back...
Bty inserting some simple buttons to go to view next and previous pictures
The code below is a guideline.....Made for vb6
You need to replace the picture1.picture ...with the location that you are gonna paste the picture -
Private Declare Sub keybd_event Lib "user32" _
-
(ByVal bVk As Byte, ByVal bScan As Byte, _
-
ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
-
-
Private Sub Command1_Click()
-
DoEvents
-
Clipboard.Clear
-
keybd_event vbKeySnapshot, 0, 0, 0
-
DoEvents
-
keybd_event vbKeySnapshot, 0, &H2, 0
-
DoEvents
-
Picture1.Picture = Clipboard.GetData(vbCFBitmap)
-
DoEvents
-
Me.Refresh
-
End Sub
As for the form visibility, you should be able to set it to False at design time. Either that, or don't start with a form. Start up your project using a sub in a module (if possible) then have it load the form without displaying it. I use VB6, so things may be too different. But I can just set the project to start up a sub called Main instead of a form.
Can you explain what you mean by "normal keystrokes" and "strange characters"? There are more characters than there are keys, so what do you want to do?
Can you explain in more detail what you mean by this? Do you want to append to a file? And what sort of technique are you using to write to the file now?
As for Paint, you might be able to use an Automation interface to drive Paint the way we do with Office apps. If so, you'd have much more control than by pretending the user is pressing keys.
OK, the module sounds like a good idea, ill try it out
Well i use GetAsyncKeyState to see what characters have been pressed and it gives me weird characters when i press a button for example, instead of recording the {LShift} key it uses the symbol ..... I want to try to make it so these symbols are changed to the actual keys..... and if there is another thing i could use to get character instead of keystrokes.... or to make GetAsyncKeyState record characters instead of keys
Well to write to the file i use this code...... - FileOpen(2, "C:\DSO\DOSCOMMANDS.txt", OpenMode.Output)
-
Print(2, TextBox1.Text)
Everything first must be written to a text box before it can get saved into the file.... is there a way for it to go straight to the file instead of the textbox then the .txt document? And can i make it so that the text in the DOSCOMMANDS.txt document doesnt get erased everytime that the program runs and logs a key?
How do i use an automation interface? That sounds like a better idea...
Sorry, heading for bed now (it's 1am but I will say this...
OpenMode.Output probably need to change (my guess would be OpenMode.Append) in order to append to the file.
GetAsynchKeyState is designed to report the state of the keyboard. How that then gets translated is another matter. I don't know how it's normally handled. You could just set up an array holding all the possible entries and what you want to call them. But I recommend some more searching first, as this function may already exist.
And to send your text to the file, I'd suggest you probably just need to use the Print statement multiple times.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: genetic.error |
last post by:
I'm moving from Vb6 to VB.Net. I have a feeling this has come up
before...
The VS.Net MSDN file seems to state that the following should work:
Form1.Show
Form1.Visible = True
Form1.Hide...
|
by: John Michael |
last post by:
I have created some password routines to protect certain forms from access
without a password.
This allows me to create some security for apps that will be used on diff
machines for users that...
|
by: Mark |
last post by:
I have a FE/BD 2002 DB on a XP pro platform.
I know this is ugly but it works for me......
A text file is produced from our Oracle WMS. (Average 20k records)
A command button deletes all records...
|
by: MLH |
last post by:
I have a logo image that I can paste into MS Paint as an image with
clear background. Think of the logo as a black circle in a white,
rectangular background. When I paste into Paint, the white...
|
by: Jrsmith |
last post by:
I am developing a mdi application that will act as a front end to a database.
I am finding that when i show any of the mdi child forms in my application
it is noticeable that the form is shown...
|
by: steve |
last post by:
Hi All
I have a VB.net 2005 App which has a form set as the Application splash
screen in Project properties
Another form is set as the startup form
All works great until the splash screen...
|
by: laredotornado |
last post by:
Hi,
I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed
using Apache's apxs and the php library was installed to
/usr/local/php. However, when I set my "error_reporting"...
|
by: wvmbark |
last post by:
First time poster... I just found this forum and it appears there's plenty of people here that could make short work of problem that's been driving me absolutely bonkers for months.
Every day we...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |