Forms :: KeyDown/ Shortcut Key Does Not Work?

Oct 30, 2010

I'm working on a simple calculator program for work in VB.NET and I'd like it that an operation could be performed without a mouse click and instead by using the Enter key. So essentially I want the segment of the program that is usually run by button to have the ability to be run by the Enter key.I'm using VS2010.This is what I was trying to do but I suppose I'm not doing it correctly because the Enter key does not do anything when I press it.

Private Sub btnCalc_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles btnCalc.KeyDown
Select Case e.KeyCode
Case Keys.Enter[code]....

View 3 Replies


ADVERTISEMENT

Get A Keydown Even To Work In 2010?

May 18, 2010

how to get a keydown even to work but in 2010 this seems to have changed

Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
If e.Keycode = Keys.Enter Then
MsgBox("test")
End If
End Sub

Apparently "KeyCode" is not in use anymore..

View 4 Replies

Use The PropertyGrid With KeyDown Event Doesn't Work

Jan 14, 2010

I can't do this: [URL]

1. Add PropertyGrid to a form in a new Windows Forms Application

2. Add follow Code

Private Sub PropertyGrid1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles PropertyGrid1.KeyDown
MsgBox(e.KeyCode)
End Sub

3. Run the project

4. Click a key and where is the msgbox ?

View 6 Replies

Shortcut Keys Do Not Work?

Jul 8, 2009

I have formA.vb and I added some shortcut keys using the key_up event handler. Before coding the handler I change the keypreview property of the form to true. I added this code :

Private Sub IntRMA_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp If e.KeyCode = Keys.ControlKey And e.KeyCode = Keys.C Then
modcustomer.Show()
ElseIf e.KeyCode = Keys.ControlKey And e.KeyCode = Keys.T Then
Me.Button6.PerformClick()

[Code]...

View 8 Replies

Shortcut Won\t Work - VB Quote Bug

Apr 13, 2011

I have been tryign for long time but I have had no progress on this problem. I'm tryign to make a shortcut of a executeable but the quote messes me up. I have this code in VB:

[Code]...

View 2 Replies

How To Get Shortcut Keys (like Control C) To Work

Dec 24, 2009

I was wondering about how to get shortcut keys (like control C) to work

View 4 Replies

Forms :: How To Get Shortcut Icon Name

Dec 16, 2011

I have an application in vb.net. after building i will be getting the exe. once i create the shortcur for this exe consider shortcur of myexe.exe in desktop, how can i get the name of the shortcur icon (i.e "shortcur of myexe.exe") through my vb.net application. Here i have below scenario.I have three shortcut(my1.exe,my2.exe,my3.exe) for an exe named as "My.exe" if i click on my1.exe i should get the shortcut icon name as my1.exe if i click on my2.exe i should get the shortcut icon name as my2.exe if i click on my3.exe i should get the shortcut icon name as my3.exe So based on shortcut name i am proceeding different thinks withing the application.

View 3 Replies

Forms :: Allow The User To Select The Shortcut Key?

Feb 12, 2006

is there any way to let user to set the shrtcut ?look like "shortcut key" in properties of the shortcut file i know about keypress and keydown or keyup but how to use them to auto detect the key and set it?example ctrl+h . when it happen one by one i can get keycode or keychar but if they press by user in one time and hold it together i cant read it by kecode or keypress.

View 1 Replies

Forms :: Creating Shortcut Keys?

Jul 17, 2009

So I've been trying to make a form in which a few of the buttons have keyboard shortcuts such as the F keys as well as the arrow buttons. Here's the code I've been using

Private Sub frmOrganizer_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If obSelect = True Then

[code].....

View 1 Replies

Forms :: Shortcut Key To Open Form?

Jun 17, 2010

may i know is that possibleto assign the form a shortcut key like crtl 0 to load/open the form?

View 2 Replies

C# - Convert System.Windows.Forms.Shortcut Into KeyData / KeyCode?

Nov 15, 2011

Is there an easy way to get the corresponding keydata (keycode combination) for some value in that enum? I cannot find one, and creating a switch statement for all those is a bit overkill...The integer values of the enum elements are not keycodes, but some 'unknown' big numbers, so simply casting to int won't work.

View 1 Replies

Set Focus On The Keydown Event So After The Button Control, Sets The Focus Into The Keydown?

Dec 15, 2010

Is it possible to set focus on the keydown event so after the button control, sets the focus into the keydown? although says often control can have focus,.Putting a button and a keydown event on a form...

View 2 Replies

Extract Shortcut Icon Without Shortcut Symbol?

Jun 5, 2010

I'm trying to extract the icon from a shortcut (lnk file), but I end up with the shortcut symbol in the lower-left hand corner of the image. How can I extract a shortcut's icon without this symbol?

Here's the code I'm using:

Dim ico As System.Drawing.Icon = System.Drawing.Icon.ExtractAssociatedIcon("C:shortcut.lnk")

View 3 Replies

Forms :: Work With Multiple Forms In .net?

Dec 15, 2009

i've been working with multiple forms. here's the situation.. i have 2 forms form1 and form2 every time i show the form2 from the cmd Bttn in form1 then i close and reopen it again it always prompts me with disposal error.

View 3 Replies

Getting Forms To Work With Each Other?

Mar 15, 2010

I was referred to this forum section for VB2008 questions instead of VB6, so Ill assume this is the right place to ask this question. Yes I copy/pasted.I'm EXTREMELY new to VB2008 and I was basically making a program that is used for "password storage" that will be used only by me, I have made a simple login page that will not allow new usernames/passwords and a simple text box-listbox-add-delete page for submitting and displaying what I wish. What Im trying to do is make it so every time I open the listbox form, you are prompted with the login form. Im not sure of a proper term for this as I just downloaded VB2008 2 days ago.

View 3 Replies

One Menu Work In Ten Forms

Jun 1, 2009

i want to put one font dialog and one color dialog in one content strip menu that work in every form i have.

View 1 Replies

.NET Forms Authentication Doesn't Work

Mar 20, 2011

I have an issue with my .NET application and it can only be reproduced sometimes and only on client's location, which makes it extremely difficult to resolve. In the application the forms authentication is used. There is a login page to which every anonymous user is redirected. After user enters username and password, it redirects to DefaultURL or some predefined page. The problem is that sometimes when user enters correct username and password, it doesn't login, instead it just refreshes the login page without any error messages. After several tries of inputing username and password, user is able to login to the system.

See my login page Submit_Click code below:

Dim userName As String = tbUsername.Text
Dim password As String = tbPassword.Text
Dim returnUrl As String = Request("returnUrl")

[code]....

View 2 Replies

Forms :: Get One Of The Lists In .Net To Work Like The Ones In CDBurnerXP?

Feb 22, 2009

Is there a list or a way to get one of the lists in VB.Net to work like the ones in CDBurnerXP?I shows a small icon at the side, then has a title and a little description under that.Have designed a program around this style of list but now when i have came to .net to write it...

View 1 Replies

Forms :: Monitor - Possible To Work Out What Program Is In Use

Nov 13, 2011

I am trying to build a program that monitors how other programs are being used and as part of it I need to figure out if it is possible to work out using VB code what window, program or process the user is currently using or Focused on.

View 1 Replies

Forms :: Work With Temp Folder

Feb 20, 2009

I hava a form app, that runs hidden, with just a notify icon, the goal is control worker schedule and alert them for some things they have to do.My problem is,when i open a form (with TopMost = True), it works if the user is admin of the machine or domain admin, if the user is "regular" user, the form just don't open or shown to the screen.I believe that it has got something to do with write permissions in the app folder. I have a contextmenu that works great, even restoring the hidden main form, it just doesn't show/open the other form, without any error.Shouldn't .net use the user $temp folder to write something? If not what's the best way for the app use the EnvironmentVariable("temp")?

View 7 Replies

Work With The COM Microsoft Forms 2.0 Multipage?

Jan 14, 2006

I was working with this control to make multiple pages fit on 1 main window. When clicking a menuitem, the program will go to the correct tab. Now the problem is, i only have the 2 standard tabs.. NOTE: This is NOT the standard Tab control found in VB.NEt 2005 ! Does anyone know how to add more tab pages

View 1 Replies

Forms :: Functions Work Only If Form Is Run Directly (non-MDI)?

Dec 14, 2010

I have this weird issue:I developed an application with a sequence like this login form -> mainform (=mdi parent) --> some functionform (mdi-child)--> report form

The reportform contains a reportviewer and will display different dataset queries depending on the state of some radio buttons which are located on the previous form ('some function form'). When I run the project directly from the 'some function form' (set startup form for project) things work great. The report shows the correct data depending on choices made on the previous form.But....when I run the project all the way from login and mainform it doesn't work. Seems like the choices made on the "some function form' are not coming through to the report form.

View 5 Replies

Forms :: Make Apps Work In Network?

Apr 10, 2009

i have finished build a simple inventory program. But this program just only work in single pc not at network. Could any body tell me how to make it work in network (multiple pc in network)?

View 7 Replies

Forms :: Rebooting Error For VB Frame Work?

Nov 5, 2010

I was sent here by someone else that said someone here might.Below. is the message I get every time I reboot. I am not sure if it's a .NetFrame Work 1.0 or 1.1 error or not. It may be Visual Basic as I really don't know. Also, may be where I uninstalled some program or another the wrong way, by just deleting the folder instead of using the add and remove programs. I did have 1 program uninstall in-correctly by Revo Pro Uninstaller also about the time I started getting this error. But, I do know in the header error box it does say ".NetFrame Work" though... I just adding these suggestion as it might help you know what the problem might be. I have XP Home 2002 with Service Pack 3 installed. I have repaired the .Net FrameWork 2.0, 3.0 , 3.5 and 4.0. I couldn't repair the 1.0 or the 1.1 as I have deleted my temp folders that must have had something the installer needed in them. I tried to repair them with the "Installer" located in the "Installer" folder but it ask for some file in the temp directory that I did not have so I had to cancel the repair.

[Code]...

View 3 Replies

Forms :: Short Cut Keys Dont Work?

Jul 8, 2009

I have formA.vb and I added some shortcut keys using the key_up event handler. Before coding the handler I change the keypreview property of the form to true. I added this code :

Private Sub IntRMA_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
If e.KeyCode = Keys.ControlKey And e.KeyCode = Keys.C Then

[code].....

View 3 Replies

Forms In DLL Files. Form.Isdisposed Won't Work

Jun 8, 2010

I did a function to one of my projects to a DLL file, and when the user starts the function a icon for that function grows (to show that the function is open).When the user closes the function the icon should shrink back again. But i have some problem whit that.The problem is: when i open a other form, the icon shrinks even if i haven't closed the function.What make it strange is that i have 2 function like that, the first one is the one that is behaving like this and the second one works the same way, but the second icon do not shrink when i open a new form. The second icon only shrinks when i close that function.

Here is the code for the opening of the first function:

Private Sub MedlemskortToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MedlemskortToolStripMenuItem.Click
frmm = New Medlemdskort.Form1
frmm.datap = Application.StartupPath & "\database2.mdb"

[code]....

View 2 Replies

Doesnt Work For The Forms Which Gets Loaded Into A Mdi Parent Form?

Mar 8, 2009

hey I have a piece of code which gives fade effect to a form at load eventBut it works only with normal forms and doesnt work for the forms which gets loaded into a mdi parent form

View 13 Replies

Forms - Combobox Formatstring Property Doesn't Work

Jan 19, 2012

I have a form created in VB.net. It is used to get some information form a user. The form is not bound to any data source.

A combobox on this form is used to enter a cost. I want the value entered by the user to be displayed using currency format. I have used the Format String Dialog that opens from the ellipses button on the FormatString property of the combobox and selected Currency. This put C2 into the FormatString property.

When I run my application, this format is not applied to the value entered into the combobox at the time the number is entered or when I leave the combobox.

View 2 Replies

Forms :: KeyPreview Stops Work After Some Control Is Disabled

Oct 20, 2010

I set the HourGlass, disable the button (to avoid ppl that are too used with FPS games), do the serial communication bit that last a couple of seconds, then the set the mouse back to normal and re-enable the button.And I have a few more like those through the software using text boxes or drop-down menus.[code]My form is set in design time to be KeyPreview = True and I even tried to set it again after the Click. The routine is simply not called and the ESC key on the keyboard does not hide the form anymore.

View 1 Replies

Forms :: Make Listbox1 = Listbox 2 (all Items) Does Not Work

Feb 19, 2010

Basically on form2 i have a listbox. And on form3 i have 6 listboxes. I want listbox 2 to equal listbox (a listbox on form3) my current code does not work Private Sub formAustralia_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

[Code]....

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved