Show Menu When Clicked Without Focus?

Nov 9, 2010

If my form does not have focus and I click on a menu item (think File, Edit, View) the sub-menu does not appear. All it does it return focus to the form. I have to first click to give the form focus and then click on the menu. Most other programs do not behave this way. Is there anything that can be done to change it.

View 2 Replies


ADVERTISEMENT

Remove Focus When Clicked Anywhere Else?

Apr 10, 2011

I have a textbox, and I want it so if the user clicks anywhere on the form that is not the textbox itself, such textbox will lose focus

View 2 Replies

DataGridView - Focus On Cell That Was Right Clicked

Mar 26, 2010

I have a datagridview that I have put a ContextMenuStrip1 on. I would like it to remove a row in the datagridview when the row is right clicked on and they click on "delete row". I have the delete working and the menu is showing up but this isn't firing when you right click on the datagridview.

This is where I am setting the row to edit:
Private Sub ModifyRowToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ModifyRowToolStripMenuItem.Click
If Not datagridview_TagAssignment.CurrentRow Is Nothing Then
[Code] .....

I am always ending up on row(0) and never the row I right clicked on.
Private Sub datagridview_TagAssignment_CellMouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles datagridview_TagAssignment.CellMouseClick
If e.Button = Windows.Forms.MouseButtons.Right AndAlso e.RowIndex >= 0 Then
datagridview_TagAssignment.Rows(e.RowIndex).Selected = True
End If
End Sub

View 1 Replies

Make Form Not Focus When Clicked?

Jul 12, 2010

I how can I make my form not get focus when it, or a control on it, is clicked?

Basically i want to be able to click a button on the form, and the buttonclick event occurs, but the current window retains focus. How can I do that?

View 20 Replies

Show Context Menu On Drop Down Menu Item Right Click?

Jun 22, 2009

i want to show context menu on drop down menu item right click...As an example,Suppose we add bookmark in mozilla & when we right click on that item..context menu is showing

Code:
Private Sub MenuAddToFavorites_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MenuAddToFavorites.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then

[Code]......

View 5 Replies

Show A Context Menu On Right Click On A Menu?

Mar 22, 2009

I want to show a context menu on right click on a menu, but the menu disappears every time it is right clicked and I dont get the right coordinates for my menu.

Here is my code:

Code:Private Sub colMenus_MenuContextMenu(ByRef Sender As Object, ByRef e As clscolMenus.MenuContextEventArgs) Handles colMenus.MenuContextMenu Dim p As Drawing.Point Dim tm As ToolStripMenuItem

[Code].....

View 3 Replies

Add A Menu Item That Loads Url In Users Web Browser When Its Clicked?

Feb 7, 2010

Also want it to load in the users default web browser if possible. I'm working on a little app for a small community online radio station and want to have a menu in the menu strip for the stations website, twitter profile and facebook profile. I'm new to VB and haven't figured out what I need to input for the click settings.

View 7 Replies

Tell What Form Control A Context Menu Was Over When Clicked One Of Its Items

Mar 22, 2011

I have 10 textboxes on a windows form. Each textbox has the same contextmenu. Say they are named textbox1 - textbox10. What I need is when I right click in one of the textboxes I need to capture the name of the textbox in which the contextmenu was called. So if I am over textbox2 and right click for contextmenu then select menu item #2 in the click event I need to capturethe textbox control I called the contextmenu from (textbox2) so I can send that name to a function to process my other code.

View 2 Replies

Track Which Menu Item Was Clicked In ContextMenuStrip1_Click Event

Nov 21, 2009

I am trying to track which menu item has been clicked in a ContextMenuStrip. I am trying to do so in a ContextMenuStrip1_Click event. I want to track which item was clicked and pass the text from the cliced item to a variable. The code below does not work. I get the following error: "Unable to cast object of type 'System.Windows.Forms.ContextMenuStrip' to type 'System.Windows.Forms.ToolStripMenuItem'."

[Code]...

View 4 Replies

Detect The Cell That's Right-clicked On In A Datagrid View When A Context Menu Is Being Used?

Aug 22, 2011

I can do the context menu. When I'm NOT using a context menu, I can detect a right-click using the mouse click event.BUT how do I detect which cell that's beiing right-clicked on in a datagrid WHEN a context menu is being used (as the mouse-click doesn't seem to fire when a context menu is used - so I assume that the menu mechanism consumes the right-click message and doesn't pass it on so to speak).I have tried to manually call the context menu on a right-click, but then the context menu comes up at the wrong location.Rather than send a long listing of my multinedia program so far - here's something I tried as a separate proglet. I can send the long multimedia project listing if you like (so you can see why this it is important to resolve this little issue).

[code]...

View 1 Replies

Tell Which Node In A TreeView Was Clicked In A Context Sensitive Menu Call?

Aug 23, 2010

How do i tell which node in a TreeView was clicked in a Context Sensitive Menu call?

View 2 Replies

Context Menu Will Not Proceed With Command When It Loses Focus

Jun 3, 2009

i have a checkbox, when checked, contextmenu shows and remains visible until unchecked.. then i ran into a problem.. if i click any other control on my form, the context menu disappears and the checkbox remains checked. i have tried placing

[Code]...

View 5 Replies

IDE :: Show A Decimal Value Less Than Zero When Button One Is Clicked

Aug 26, 2009

this should take a matter of seconds for someone to sort out, I wish to show a decimal value less than zero when button one is clicked ie

[Code]....

View 5 Replies

When Button Is Clicked, Show Object

Dec 11, 2010

I wanted to know how I could make a button and textbox appear when a different button is clicked. For example, when I click "Button1," which is already there, then "Button2" and "Textbox2" (I already have a "Textbox1") would show. I also already have an "openFileDialog" on "Button1."

At first I thought I should use

If Button1_Click Then

but I didn't know what to put after that. Is there any way I could use "If... ...Then..."? I find those easy to understand.

View 6 Replies

Forms :: Get TextBox1 To Show Which Button Clicked?

Mar 3, 2010

using System;
using System.Collections.Generic;
using System.ComponentModel;

[Code].....

So what I am trying to do is to get textBox1 to show which button i have clicked. Because I have Form_Activated I only see changes when i reactivate the Form. So I would like to have Event that is Active all the time and listens to everything that happens in Application and NOT only when something is clicked or some text have changed.

View 6 Replies

Hide Buttons And Then Show Them When Another Button Is Clicked?

Jun 22, 2010

I made a form with only 1 Button. I want that when i click that button, 2 more buttons should be appeared. Example: Button1 is clicked. Button2 and Button3 are displayed. I have named Button1 as Scan. When i click on Scan, the Button2(Pause) and Button3(Stop) should be displayed. When it is scanning, i have placed the progress bar with the timer. When the progress bar finishes loading, Button2(Pause) and Button3(Stop) should be hidden again.

[Code]...

View 4 Replies

Show Different ContextMenu When Right Clicked On A Listview Columns?

Apr 13, 2010

How can i make it so when the user right clicks the listview column a different listview will show up instead of the orignal one

View 1 Replies

Make Listbox To Show Something Else Like Combo Boxes When Its Item Is Clicked?

Dec 24, 2011

How to make the listbox to show something else when the item inside the listbox is clicked. For example, inside the listbox has 10 items like "resistor 1", "resistor 2", "resistor 3"...when i clicked on each item, it will show other thing like combo boxes to let the user fill up the color codes for each resistor

View 2 Replies

Remove The Textbox's Focus When Mouse Is Clicked In The Textbox?

Jul 18, 2009

Is there any way to remove the textbox's focus when mouse is clicked in the textbox? the blinking focus in the textbox is not needed for kiosk system. so i try remove it with

[Code]...

View 2 Replies

How To Show A Form Without Setting Focus To It

Dec 4, 2010

I need to dynamically show/hide a form without loosing focus from the original form. How to do this?.

View 1 Replies

Set Focus On Textbox After Messagebox.show()

Mar 5, 2010

The coding in under lostfocus event for a combo box. When user type in the some item that not in the list it will promt out a messagebo box telling the user that the item is not found in the list. Then i set the focus back on the combo box. But what happen now is, it keep promp the messagebox, like a infinite loop. Here is the sample coding. How i goin to make the message no more looping and focos on the combo box.

[Code]...

View 3 Replies

Show A Window Without Taking Focus?

Oct 22, 2009

to be so simple turns out to have me scratching my head.I have a program that monitors input inside of Quickbooks. When a customer is entered into a sales order my program checks my database for any special information and if it exists, opens a TopMost window to the lower third of the screen with the information showing that is special to that customer. The problem I have is that when the customer is found and the window opens, focus is taken away from Quickbooks and given to my newly opened form. Is there a way to prevent this so that the users input isn't interrupted?

With frmMessage
.Width = Screen.PrimaryScreen.WorkingArea.Width
.TopMost = True

[code]......

View 3 Replies

Show Form Without Losing Focus?

Aug 23, 2010

I've created a small form that acts like the office notifications (fades inout above the notification icon tray)I'm having problems showing this form, I want to display it without the focus being taken from my main application (or any other form), I've managed to get the attached code doing roughly this, (using Me.Activate to take back focus) But this isn't great - focus switches for an instant plus I want to show the form from various areas in my application...

Dim frm2 As New frmNotification()
frm2.TopMost = True
frm2.Show()
Me.Activate()

View 1 Replies

WinForms - Show Form Without Focus?

May 16, 2012

I would like to show a Form without focus - PLUS - I would like to have 'Enable Application Framework' enabled on the My Project > Application form. Having 'Enable Application Framework' enabled allows trapping of unhandled exceptions project-wide.

I have added this to my code:

Protected Overrides ReadOnly Property ShowWithoutActivation() As Boolean
Get
Return True

[Code].....

View 8 Replies

VS 2008 - MessageBox.Show When ProgressBar1.Value = 1000 Or After 10 Seconds Button1 Was Clicked

Feb 17, 2010

I need to do a MessageBox.Show when ProgressBar1.Value = 1000 or after 10 seconds Button1 was clicked. For the second method, I thought of making a loop but I didn't know how to. I also need to search a string in a file (The string to search will be the text which was entered in a TextBox) and do different things depending on if the string was found or not.

View 8 Replies

Display/Focus/Show Form On Top Of PC Game?

May 4, 2011

What I am trying to accomplish is this: I want to be able to press the F5 key on my keyboard, while playing a PC game, to show (bring forward, focus, etc.) my program. My 3 attempts so far have failed. Any idea on how I could accomplish my goal? Similar posts on other forums say to set the form's key preview to true and use on keyPress... which failed.

View 1 Replies

DB/Reporting :: Give User A List Of Names And When Gets Clicked It Will Show All Details In A Report

Dec 11, 2008

Ive been trying to figure out what report I should use as it appears I have crystal reports built in and also have Microsoft Report Viewer in this VB 2008.What I need to do is give the user a list of names and when a ame gets clicked it will show all the details in a report.I have loaded a ListView Control with the names from my database and this is letting the user pick a report so I can get the name and ID number of the record to show this way and just need to figure out how to get that record onto a report and what report to use?Ive done similar in VB6 but have never looked at .Net. The data is comming from an access database.

View 2 Replies

Forms :: Focus() Method Fails With Second Show Form?

Feb 7, 2010

I have a simple login field, which works fine with the exception of one quirk. The form is set up with the tab order to go to the UserID first and the Password text box second. This works fine when the form is used the first time, but when the form is used the second time the focus in placed in the Password field. If the form is used a third time, focus is moved the OK button, that is each time moves to the next tab order. I even tried to set the focus in the Load event as in Me.txtUserID.Focus(), but this doesn't change the behavior. Again, I should note that I close the form and not hide the form.

View 3 Replies

VS 2008 - Show As A Drop Down Does Not Appear To Take The Focus Off The Main Form That Is Calling It?

Nov 3, 2009

Q1: How can i make it so that my window that i want to show as a drop down does not appear to take the focus off the main form that is calling it?

Q2: The form that is dropping down has the FormBorderStyle Property set to None - thus the window does not have a drop down shadow - how can I make the popup window have a shadow?

View 1 Replies

Context Menu Strips Won't Show

Feb 10, 2011

i have 2 context menu strip and the wont show when i run debugger

View 4 Replies







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