Key board shortcut Control C
-
can we write a code in vb which is equivalent to control c keyboad action, If yes pl provide me the code
Prakash Mishra(Banglore,India)
-
can we write a code in vb which is equivalent to control c keyboad action, If yes pl provide me the code
Prakash Mishra(Banglore,India)
'Set form1 keypreview property to true' 'Add 2 labels Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If e.Control And e.KeyCode = Keys.C Then Clipboard.Clear() Clipboard.SetText(label1.text) End If If e.Control And e.KeyCode = Keys.V Then Label2.Text = Clipboard.GetText() End If End Sub
Shay Noy
-
can we write a code in vb which is equivalent to control c keyboad action, If yes pl provide me the code
Prakash Mishra(Banglore,India)
you want to copy certain text I presume. this will usualy work without any code (if windows is the OS) if you want another action to happen you'll need to catch the keydown event and check wether the control key and the c key are pressed. Another way (perhaps better/easier) is to add a menustrip to you'r form (put it invisible) and then in code (or design):
Dim mnuselectie As New ToolStripMenuItem("selectie")
mnuselectie.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.C), System.Windows.Forms.Keys)
AddHandler mnuselectie.Click, AddressOf mnuselectie_Click
msAlgemeen.Items.Add(mnuselectie) 'msalgemeen=menustrip on the formthen add code to mnuselectie_click hope this helps
If my help was helpfull let me know, if not let me know why. The only way we learn is by making mistaks.
-
you want to copy certain text I presume. this will usualy work without any code (if windows is the OS) if you want another action to happen you'll need to catch the keydown event and check wether the control key and the c key are pressed. Another way (perhaps better/easier) is to add a menustrip to you'r form (put it invisible) and then in code (or design):
Dim mnuselectie As New ToolStripMenuItem("selectie")
mnuselectie.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.C), System.Windows.Forms.Keys)
AddHandler mnuselectie.Click, AddressOf mnuselectie_Click
msAlgemeen.Items.Add(mnuselectie) 'msalgemeen=menustrip on the formthen add code to mnuselectie_click hope this helps
If my help was helpfull let me know, if not let me know why. The only way we learn is by making mistaks.
hi I want to perform a the action like 1) select a file. 2)click the button ( here i want to perform 3 actions CntrlA + CntrlC + CntrlV) that is select all + Copy + Paste. 3) The output will get paste in a specified word file. So i want on a button click these 3 action to get performed. Pl help
Prakash Mishra(Banglore,India)
-
hi I want to perform a the action like 1) select a file. 2)click the button ( here i want to perform 3 actions CntrlA + CntrlC + CntrlV) that is select all + Copy + Paste. 3) The output will get paste in a specified word file. So i want on a button click these 3 action to get performed. Pl help
Prakash Mishra(Banglore,India)
I'll need a bit more information to answer this the file is in wich format?? the file is on the hdd and you select it in you're programme or just in windows explorer?? the word file is specified in you're programme?? all the actions have to perform in sequence without any further user input?? you work with a button or a shortcut?? once the button is pressed you know the filepath and the word path??
If my help was helpfull let me know, if not let me know why. The only way we learn is by making mistaks.
-
I'll need a bit more information to answer this the file is in wich format?? the file is on the hdd and you select it in you're programme or just in windows explorer?? the word file is specified in you're programme?? all the actions have to perform in sequence without any further user input?? you work with a button or a shortcut?? once the button is pressed you know the filepath and the word path??
If my help was helpfull let me know, if not let me know why. The only way we learn is by making mistaks.
thanks lot for your patience. 1)the action ( CntolA + ControlC) i want o perform on a pdf file 2)I want to create a browse button which will give the path of the pdf file)I think i have to open the file before performing the CntolA + ControlC action. 3)Then the i want a button say the name is action ( which will perform the events sequentially select all(pdf) + Copy + Paste(in word) Hope i am clear to u this time Regards
Prakash Mishra(Banglore,India)
-
thanks lot for your patience. 1)the action ( CntolA + ControlC) i want o perform on a pdf file 2)I want to create a browse button which will give the path of the pdf file)I think i have to open the file before performing the CntolA + ControlC action. 3)Then the i want a button say the name is action ( which will perform the events sequentially select all(pdf) + Copy + Paste(in word) Hope i am clear to u this time Regards
Prakash Mishra(Banglore,India)
in the button action you'll need to do the following: access the pdf file (don't know for shure but I think you need a component for it and it's not cheap) these articles might be of help for this: http://www.codeproject.com/showcase/TallComponents.asp[^] http://www.codeproject.com/cs/library/iTextSharpTutorial.asp[^] once you can read the pdf file you should be able to select everything then you can add it to the clipboard: Clipboard.SetText(pdf.selectedtext(or somthing)) then you'll need to open the word file (there are enough examples about this) and paste the text: word = Clipboard.GetText() some articles for help: http://www.codeproject.com/office/DocumentMaker.asp[^] http://www.codeproject.com/office/WordInDotnet.asp[^] hope this helps
If my help was helpfull let me know, if not let me know why. The only way we learn is by making mistaks.