.net - Mods And ASCII In VB Caesar Shift?
Apr 10, 2012
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
[code]....
View 1 Replies
ADVERTISEMENT
Jan 10, 2010
How to hold shift and then click button a and b (while holding shift)?
View 7 Replies
Dec 15, 2009
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?
View 5 Replies
Apr 5, 2009
Visual Studio Version 9.0.30729.1 SP
.NET Version 3.5 SP1
I have a button click handler that is coded. I typed in a new line of code without any errors, but the new line of code does not execute. To troubleshoot, I tried to add a simple message box, commented out the code, and deleted the entire code. With everything I try, even deleting the code, the original code exectutes at run time. I can't find any other instance of the code anywhere else in the application. Other events update normally.
I gather the code is either not updated upon build/compile, or this bit of code is stored somewhere.
View 10 Replies
May 30, 2009
I have questions on this [FAQ's: OD] How do I open an existing Excel Workbook? I have playing around with the code little. Trying to mod the code to display the selected path and File name in the textbox I have on a form. I can to get it to work right
View 1 Replies
Dec 11, 2010
I am using Microsoft.VisualBasic.Fileio.TextFieldParser to parse a CSV file that was created with Excel 2003. The parser is working great with the exception that it is converting extended ascii values to question marks! So if the file content was:
± 3
The TextFieldParser is returning
? 3
I have tried all of the encodings in the System.Text.Encoding package with no luck. I thought I had it with UTF7 but it was dropping other characters like replacing the + sign with a space.
View 2 Replies
May 9, 2011
I'm working on decoding a NMEA sentence that is a compressed 8-bit string. I'm having a very hard time of wrapping my head around the bit manipulation needed to convert this string. If someone could get me started with this it would be great.
Here is the incomming string:
!AIVDM,1,1,,A,14eG;o@034o8sd<L9i:a;WF>062D,0*7D
and here is the expected output:
[code]...
View 10 Replies
Nov 4, 2009
I would like to pass a whitespace character by using the System.Text.Encoding.ASCII.GetBytes(" "), and System.Text.Encoding.Unicode.GetBytes(" ") , where " " is the whitespace Character required. What do I need to type (" ") to get a whitespace character passed.?
View 6 Replies
Aug 7, 2009
So I have an ASP.Net (vb.net) application. It has a textbox and the user is pasting text from Microsoft Word into it. So things like the long dash (charcode 150) are coming through as input. Other examples would be the smart quotes or accented characters. In my app I'm encoding them in xml and passing that to the database as an xml parameter to a sql stored procedure. It gets inserted in the database just as the user entered it.
The problem is the app that reads this data doesn't like these characters. So I need to translate them into the lower ascii (7bit I think) character set. How do I do that? How do I determine what encoding they are in so I can do something like the following. And would just requesting the ASCII equivalent translate them intelligently or do I have to write some code for that?
Also maybe it might be easier to solve this problem in the web page to begin with. When you copy the selection of characters from Word it puts several formats in the clipboard. The straight text one is the one I want. Is there a way to have the html textbox get that text when the user pastes into it? Do I have to set the encoding of the web page somehow?
[Code]...
View 4 Replies
Feb 9, 2011
I don't know how to get shift modifier key as when I pressed shift and another key, it show message box "Modifier shift key"
View 1 Replies
Mar 24, 2010
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!
View 3 Replies
Dec 6, 2011
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
[Code]...
View 1 Replies
Nov 16, 2011
I just found an interesting problem between translating some data:
VB.NET: CByte(4) << 8 Returns 4
But C#: (byte)4 << 8 Returns 1024
[code].....
View 3 Replies
May 15, 2011
When I run this command in PHP, I get:
[Code]...
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?
View 2 Replies
Feb 7, 2012
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?
View 2 Replies
Jun 10, 2010
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?
View 1 Replies
Sep 5, 2011
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.
View 2 Replies
May 11, 2010
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?
View 6 Replies
Nov 19, 2011
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.
View 7 Replies
Sep 13, 2009
How do I bitwise shift right/left in VB.NET? Does it even have operators for this, or do I have to use some utility method?
View 4 Replies
Oct 3, 2008
Is there a pre-existing method in vb.net to shift elements? Like the following.
Code:
testArray elements:
0: ""
1: ""
[Code].....
View 3 Replies
Dec 12, 2009
I know how to sendkeys, SendKeys.Send("Hello") I know how to hit other keys, Sendkeys.Send("{ENTER}")
But how do I HOLD DOWN the Shift key, I want to be able to highlight text, I know, I need to press the Arrow keys while the shift key is held down...
So... How is it possible to Hold down the Shift key
Oh yeah, and I even know how to simimulate a mouse click, drag, let go, ect. ect...
how to hold down the shift key in VB.NET?
View 4 Replies
Feb 27, 2009
I am trying to simulate holding down the shift key in code while I open an Access database to bypass the Autoexec macro using the following code.
1
Imports Microsoft.Office.Interop
2
Imports System.IO
[Code].....
View 1 Replies
Apr 25, 2009
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?
View 1 Replies
Nov 5, 2010
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?
View 1 Replies
Jan 20, 2011
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.
View 2 Replies
Jan 15, 2012
Possible Duplicate: How do I get the current state of Caps Lock in VB.NET? I am wanting to create two functions related to key input:
Dim capsLock As Boolean = GetCapsLockState() 'imaginary function
Dim shiftKey As Boolean = GetShiftKeyState() 'imaginary function
View 1 Replies
May 30, 2011
a company have many employees and Time In & Time Out Logs for attendance. they are not assign any shift time for each employees. day shift and nightshift also available. How to find the shiftdate and corresponding TimeIn-TimeOut Log for each employees?
View 3 Replies
Sep 9, 2009
I want a form to pop-up when I click ctrl+shift+l how can i do that
View 1 Replies
Aug 24, 2011
How can we prepare a rota application which changes the shift so that all the employees get to work in different shifts and in the month end the number of shifts done by all the employees should be the same..
View 1 Replies