I'm trying to make a prank program that registers all of the letter keys on the keyboard and then will make random message boxes pop-up when you press certain ones, or just re-arrange the letters.But before adding any pranks, I'm trying to just get all of the hotkeys to work like a normal keyboard because when you register a key to be a hotkey, it no longer works for anything else. So registering "e" in the program will cause "e" to do nothing when your in notepad or something.
So far I've gotten pretty much everything to work except for this weird Shift bug. Whenever I press Shift and then a letter, the Sendkeys will correctly send the uppercase key, however as soon as I release shift and press a key without it, it still keeps the uppercase for one more letter.So if I press Shift + E then "E" will be successfully sent to Notepad, but then if I just press "b", "B" will be sent instead, but then after that first error it will successfully send lowercase again.
I was using wordlabel to store the letters so as to see if the shift uppercase problem was something in my coding, but actually when I press Shift + A and then just press a, it will do Aa in the label but AA in a program with the focus, like Notepad. So I don't know if this is a problem with Sendkeys or what but does anyone know of a solution?
In my keydown event handler, when Keys.Numpad4 is pressed with Shift, I get the same keycode code as for Keys.Right. Is this by design? How can I distinguish between the two?
I playing a video with Microsoft.Directx.AudioVideoPLayback. My code is pretty simple: I create a Video object wich opens an avi movie, I assign its owner property to panel1 control and then I play the movie.I want to capture images every second from the movie that is being played.I try with panel1's DrawToBitmap() method and then saving the drawn bitmap, but it just draw the panel1, not the image.Is there a way of doing it?.
I am trying to get the screen capture of a MDI children form. Somehow it is just not working.
Private Sub btnScreen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnScreen.Click Dim frmMain As frmParent = Me.MdiParent For Each ctl As Control In frmMain.MdiChildren If TypeOf ctl Is frmOverview Then
If I execute any shell command in VB application How can I capture the return code from the shell command. I have written something like this shell(db2look ....,AppWinStyle.Hide) Now I want to know the return code of the above command which ran using shell script.
Hi.. Im using an application to capture selected part of screen by resizing the form and capturing area of it!! now i want to reset the form once my work id done!! i mean if i press a "RESET" button the form should be load as first time it was loaded.(the real form size..)
So I am hacking together an app which listens to traffic using SharpPcap library, it reconstructs the packets from sessions using the code from TpcRcon.
Listening and reconstructing part work on their own . What I want is on each packet arrival main window gets an event so it can display the packet , and when session is reconstructed display a complete packet (I am interested in HTTP ones) . -That is where it breaks with weird symptoms: for example right now it does not stop on invoking stop listening method - the sharppcap library function hangs there forever waiting on this line of code : m_pcapThreadEvent.WaitOne();//wait for the 'stopped' signal from thread
I also had it not working and crashing in sharppcap function because I had omitted one parameter in form delegate- which makes no sense, because form delegate does not deal with packet capture at all and only reacts on "New Packet" event from my "Listener" class (which is only there to notify main form)
My app starts as module main instancing class "Listener". MainForm has it registered as friend with event and handles even "New Packet"
Main Form: Private Sub uiListenStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btListenStart.Click aLogger.AddMessage("Started Listening")
Can VB.NET Form keyDown event determine whether left or right shift (alt, control) key was pressed? I always receive the same keycode (16) for both left and shift key!
I have been able to toggle CAPS, NUM AND SCROLL lock using the method below but using the code below that although no error occours when I click the button nothing happens?The code which works for caps, num and scroll
The interesting thing is, that when I try to shift any number greater than int32 in .net, it yields bad results.. Every number under int32 (2147483647) yields the same results from php and c#.net or vb.net Is there a workaround for this in .net?
I am running out of function keys and it will be nice if I can double up on some of them with the Shift Alt or Ctrl keys.I am using
if e.keydown = keys.F3 then{it does what it is supposed to}end if I tried e.keydown = keys.F3 AND e.keydown = keys.Shift but it gets ignored. Am I seeking the impossible or am I just missing something?Can some one tell me what I am missing or point me to an example?
Trying to develop a text editor, I've got two textboxes, and a button below each one.When the button below textbox1 is pressed, it is supposed to convert the Unicode text (intended to be Japanese) to Shift-JIS.The reason why I am doing this is because the software VOCALOID2 only allows ANSI and Shift-JIS encoding text to be pasted into the lyrics system. Users of the application normally have their keyboard set to change to Japanese already, but it types in Unicode.How can I convert Unicode text to Shift-JIS when SJIS isn't available in the System.Text.Encoding types?
In vb6 when you wanted to alter the effect of a mouse click, you could use the mouse down event and alternate the action depending on the value of the shift, control and alternate key. (and also detecting if the right or left mouse button was clicked)
When trying these in my project, I couldn't find the right codes to do this. I can't imagine this feature isn't available so I'm sure I am just messing up somehow.
I am trying to rotate a select number of bits to right with click of a button. ( bit 7 to bit 0 and rotate.) The patterns should not matter. It could be any combination of set or reset bits. The bit patterns are selected by checkbox0 to checkbox7. I like to rotate without a carry bit. Is there any way(s) to do this?
I have been working on a visual Basic 2010 program to writw a Telnet script in VB Script. I have exerything working fine but need a way to send Shift+CNTL+6 to exit the telnet session.
I have this code which shifts the alphabet by a certain amount. The size of the alphabet is 26. When I enter a larger size shift (for example 22) I get some weird characters displaying. I think I need to mod the ASCII alphabet to 26 to get it working but Im not quite sure which bit to mod. Basically I need to wrap around the alphabet (once it reaches Z it goes back to letter A) Do I have to create a dictionary for the mod to work (like A = 0... Z = 26) or can I stick with using the normal ASCII table? Here is the code below:
Public Function encrypt(ByVal input As String) 'input is a variable within the funcion Dim n as Integer Dim i As Integer
I have some questions regarding vb.net bit shifting. I understand the << >> operators are bit shift operators in vb.net. I have a two byte hex value 0x3ACC, each bit in this two byte represents either a day, month or year. The bit structure of this hex value is yyyy yyym mmmd dddd. I am confused as to how I should bit shift these values so that year, month and day are in their own UINT16 values. Just want to know about shifting numbers and if I need to add any padding to the shift?
I've been trying to write code below many time, but it still doesn't work. Public Class Form1 Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown If e.KeyCode = Keys.LShiftKey Then MsgBox("Left Shift") End If End Sub End Class So I don't how to do it continue to get Left Shift Key pressing.