Listview - Right Click On Main Item.
How would I right-click on a listview's main item and make it show a menu via popupmenu?
So let's say I am showing a directory list using a listview and I right click on a file and it shows file options (rename, del, copy). How would I do that? It is kind of like explorer's view. I will include an image.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
**RESOLVED**Displaying ListView Main Item
I am loading my ListView with a main item and a number of SubItems. I know how to display my SubItems when dbl-clicking on the list:
Private Sub ListView1_DblClick()
MsgBox ListView1.SelectedItem.ListSubItems.Item(2), vbOkOnly
Exit Sub
How would I display my Main list item when the user dbl-clicks?
Click Item In Listview Then Show That Item In Combo As Index = 0
Hi guys,
I have a listview (lvwUserPunchedOut) that is populated with records in a database (persons first name in one column and last name in the second column), what I am looking to do is if I select a persons name by clicking on it in the listview on frmMain, and then bring up frmSearchCriteria, i would like to show that selected name in the combobox as default (cboEmployee.ListIndex = 0) on frmSearchCriteria (the combobox is sorted = True and is also populated with first name and last name of the person)
How would this be done? Hope I make sense. Thanks in advance.
Listview With Item Right-click
Hello,
I couldn't find a code on internet for listview with the list of the items and the right click. Please can you find to get me the code??
thanks
Listview With Item Right Click
Hello,
I couldn't find a code for listview with the list of the item and the right click. Please can you find to get me the code??
thanks
Select Listview Item By Right Click
I have a listview and I would like the user to be able to select and item by right clicking it and also haveing a popupmenu. I have it so if they first left click on it then right click it would work, but I want to have it so they are able to just right click and have the menu apear. Here is the code that I have so far.
If Button = 2 Then
Dim aPt As POINTAPI
Dim anInd As Long
GetCursorPos aPt
With viewEntry
.SelectedItem.Index = LBItemFromPt(.hwnd, aPt.X, aPt.Y, False)
End With
PopupMenu DepClick
End If
This isn't working right because I tried to port it from a listbox. Any help would be great, thanks.
Right-Click Select Item In ListView
Hi. How can I program a ListView so that when the user right-clicks on it, the corresponding item is selected just as if the user had left-clicked? I thought of the SendMessage API but then how do I convert the X and Y values from the ListView's MouseDown event into an lParam value? i.e. how do i do the opposite of extracting High and Low-Order words?
Thanks in advance.
How To Click External Listview Item?
Hi all could any one show me how i can click an external list view item . I have the following information about the listview :
hWnd=66310
Class=GradienTreeViewClass
Thanks
ListView: Click On Item By Code
hi all
with the ListView in report mode
how can I make an 'item click' by program code? [I want the
background to go blue]
I have tried calling listview_itemclick and _click but
they do not make the list item go blue backround ....
Listview Item Click Grrrrrr!!!!!!!!!!!
Okay I have a list control on a form. I fill the list view with files and subdirectorys in a folder. Fairly straight forward
when a user clicks on a subfoder it clears the listview and then shows files and subfolders of that folder (sound familiar ) however it now has somehow activated the mousedown event on the first item in the list and as soon as you move the mouse it drags it all over the show. Then if you click to deselect it.. it fires of my click event again on the item.
How can I stop this from happening
PS I tried putting item.selected = false at the end of the code in the item click event but becuase for a subfolder it clears and refills the listview I just recieve an error
HELP PLEASE
Capturing A Double-click On A ListView Item
How would I go about detecting double clicks on ListView items? I've looked at the DblClick, ItemClick and Mousedown events, but it seems the only way I can effectively do it is detect a single click and then use a timer with a short interval and wait to see if another click event occurs within the interval (very long-winded, in other words). Come on, Windows uses it all the time, there HAS to be an easier way...
Simulate A Click On An Item In An External Listview
I'm trying to simulate a mouse click on an item in an external listview (syslistview32) from my VB application.
I found out how to get an item highlighted, but it seems I need the actual mouse click simulation to get the effect I need. Anyone know what I'd need to do this?
Any help is very much appreciated
Listview: Arrow Keys Do Item Click
with the listview control (report mode)
when I move (from the selected item) up or down the list using the arrow keys it immediately causes an item_click event.
how do I stop this happening. I only want item_click to occur
when mouse is clicked on item
How Add Listview Item To Clip Board On Click Of A Button
hi all. i got a listview that loads sentences from a text file . I want to create a button so that it once clicked it copies the current select listview item to clip board.When next time the button is clicked it goes copies the next listview item and so on. could any one show me how this can be done?Thanks
Note: i want the listview item hightlight move to next item item as i click the button each time.
Add Icon To Main Menu Item In Vb 6.0
Hi All ,
I have tried many diffrent options
I want to add Icon /Picture to main menu
for eg
*File (main Menu)
Open (sub menus)
Save
I can add icon to sub menus suing GetMenu and SetMenuItemBitmaps
but how to add icons to topmost menu
Thanks
Add Icon To Main Menu Item In Vb 6.0
Hi All ,
I have tried many diffrent options
I want to add Icon /Picture to main menu
for eg
*File (main Menu)
Open (sub menus)
Save
I can add icon to sub menus suing GetMenu and SetMenuItemBitmaps
but how to add icons to topmost menu
Thanks
Click Outside The Main Program's Window
Hello !
Does anybody knows how can I click (programatically) outside the program's windows (e.g. in an internet explorer background ) from visual basic ?
I try to make a program that can automatically click an area inside a web page and I want to do it from VB.
Thank you.
Paul Teodorescu
Disabling Right Click On Main Menu Bar...
Hellow all,
Would anyone know how to disable a right click over "Main Menu Bar" to prohibit a user to add/remove command bars?
Set mainBar = Application.CommandBars("Worksheet Menu Bar")
can it be done on the mainBar object or should I somehow go through mouse event?
Thank you,
supernova
Fire Event In Main Form When Clicking On Item In Subform
When the user clicks on a record in the subform I want to get the key for that record and then transfer control to the main form to work with the chosen record.
The main form allows the user to filter records on several fields. For each filter chose the subform is updated. The resulting records listed in the subform are available for editing or deleting. So the user clicks on the desired record, the fields are displayed in text boxes on the main form and the record can be edited or deleted.
Any suggestions on the best way to handle this problem? All I have right now is this code to get a pointer to the clicked record and load an array with the values. The key is a combination of Plant, month, year and datapointID.
Code:
'When a field in the subform is clicked, then get the correct record.
Set RS = Me.RecordsetClone
RS.Bookmark = Me.Bookmark
'Save Current data for undo function
glVarCurRec(0) = RS!Plant
glVarCurRec(1) = RS!dataPointID
glVarCurRec(2) = RS!Year
glVarCurRec(3) = RS!Month
glVarCurRec(4) = RS!Measurement
glVarCurRec(5) = RS!Units
Thanks for your help.
Scott
The worst thing about wearing glasses is them being on your face.
Nothing is impossible, it just looks that way.
Right-click Menu And Sending Left Click To Item
Can anyone tell me how I can use insert a right-click menu into my program so that when the user has selected a file (in a file list) and right-clicks, a menu appears at the location of the mouse pointer. I aleady know how to use the PopupMenu function to show a menu as I suppose that will need to be used, I just don't know how to capture a right-click mouse event and also use the position of the mouse pointer to show the menu.
Thanks in advance!
Open Dialog And Not Click On Main Form?
OK I want a program to open up a dialog when I click a button. Then when the dialog is open I want it to be the only thing that can be used until it is closed. Like you know how if there is an error message on your computer you cant click anything in the background until you close the error message. Like that. I know how to make it open and all that just how can you get it to not allow the clicking and input anywhere but in the Dialog. Thanks in advance for any help on this topic.
Click Anywhere On The Main Form Hides The Mini
I have a main form with command buttons on it. When pressed, most of the command buttons bring up a smaller form where additional fields must be filled before the command can be executed.
I find it a bother when programs only allow you to abandon the new form for the main form by hitting the X in the upper right of the new form. What I would like is to have that form closed (not just hidden behind the main form) not only by clicking on the close button, but also by clicking anywhere on the main form.
I tried placing miniform.hide in the mini's lostfocus and in the main's got focus to no avail. Once this approach failed, the only way I can think of to accomplish this is to create a boolean flag that mirrors the mini's show / hide status and to toggle it when buttons which can open it are clicked, and to hide the mini when the main form and it's objects other than the command buttons are clicked.
Of course this would do the trick, but something tells me that someone here probably knows a more streamlined approach.
Single-click Vs. Double-click On Listview
Hey gang, can you help me on this one?
In my listview, if the user clicks an item, I basically don't want to do anything (the item that they clicked will be the current "SelectedItem" which can be used when needed).
However, if they double-click an item, I want that to act as a "shortcut" to an Update command.
Bottom line - how do I manage both single and double-click events?
Moving A Listview Item And Its Subitems To A New Listview
Hey Guys,
Having a bit of trouble. I am attemping to move a selected item and its subitems from one listview to another. I have no problem getting the contents of the first column, but I can't seem to get the subitems over.
Example: I have this in the first listview:
Code:
|Item |Quanity|Price |PQ |
Bananas 2 $.50 $1.00
Then when I try to move that whole row to the other listview I can only seem to get this:
Code:
|Item |Quanity|Price |PQ |
Bananas
No subitems . Any links or help would be appreciated.
Regards,
Max_Power
Right Click Item
Does anybody know how to make it so, when u click on a file an option will be there to scan it.. with your program? Is there something u need to add into the Windows Registry to do that, or some kind of ini file? I have absolutly no clue how to approach this.
Anybody know? Please help
Thank you in advance!
Right Click On TreeView Item
If I left click it enters the TreeView1_NodeClick Event. I want to have a right click that invokes a PopUp Menu, which I can do that, that is aware of what item was clicked on. I would rather not get involved in subclassing (not sure if that would even work).
Is there a way to know the node when right mouse clicking on the item?
API Click Menu Item?
u know with VB in AOL how u can click the buttons, like to send an IM or Open Email, by getting the handle and using the SendMessage() API. can u do it like this with a menu? im tring to be able to open email with the Mail menu, i was able to click it and bring down the menu, but how do i have it click on one of the menu items? to bring up New/Old/Sent Mail. or would u jus use the arrow keys (Virtual Keys[VK]) to do this?
Click On An Item In A Listbox
Hey guys I have a listbox called list 2, how would I get it so when i click on a single item in the listbox it gets added to another listbox called list3?
I can see clicking on a item in a listview would be like this..
VB Code:
Dim i As Integer Dim lstItem As ListItem ' List1.Clear List1.Refresh For i = lvwFound.ListItems.Count To 1 Step -1 If lvwFound.ListItems(i).Selected = True Then ' by including the index at end of next statement, items are placed ' in List1 top down vs bottom up in relation to lvwFound List1.AddItem lvwFound.ListItems(i).Text, 0 Form2.lvwFound.ListItems.Remove i Ignore.lvwFound.ListItems.Remove i End IfNext
Thanks!
Right Click On A Menu Item?
I need it for my webbrowser... I want the user to be able to right click on a menu item and choose... say open new window, or something like that.
Is it possible?
Right Click On A List Item
Is there a way to get the list.list with the right mouse click.
So if someone kliks with the right mouse button I want to get
the list.list(x), where x is the one under the mouse button.
and then show something (a pop-up menu) right under the mouse button.
Is this possible ??? Please help
Click On Menu Item [vb6]
Hi,
I have a menu with a lot of submenu.
I would like to know if it's possible to know when the user click on a main menu item, even if he show the submenu items.
I hope Im clear.
Let me know if part of code or example is needed.
Thanks you for your help.
best regards.
yk.
ListBox - Remove Item On Click
OK, I have created a listbox that holds string data, te functionality i want, si that when the user clicks on one of the items in the list, it is removed.
Code:
Private Sub lstReportSites2_Click()
lstReportSites2.RemoveItem (lstReportSites2.ListIndex)
End Sub
The problem seems to be, once the item is removed the 'click' event is triggered again, and it tries to delete the next item, but then errors.
Is there another way to do this?
Selecting Item In Listbox With Right-click
Hi,
Is it possible to select a item in a listbox with a right-click of the mouse. I have a popup menu that must run when the right mouse button is clicked on a item in the listbox.
The problem is that the item is not selected when I right-click on it. The popup menu displays 100% but the item stays unselected. I first have to left-click on the item to select it and then right-click to popup the menu.
Bezzie
Click Event On A Menu Item
I have 2 forms... one a MDIForm with a menu and the another mdichilt.
In the MDIform I have
Code:
Private Sub mnuIndividualSpinsTypeIn_Click()
frmNewSpins.Show
End Sub
What I want to achieve is create some buttons on the other form (a customized control panel) that i should add it to the right of my mdiform, as a task panel and have the same features as some menu items.
For example I have a button that i want to do the exact thing as the mnuIndividualSpinsTypeIn does on click.
I tried to call the click event function from the second form, but it doesn't work... how can I do this?
Code:
Private Sub imgNew_Click(Index As Integer)
Select Case Index
Case 0:
frmMain.mnuIndividualSpinsTypeIn_Click
End Select
End Sub
Flexgrid Item Double-Click
Is there any event that does the equivalent of double-clicking on an item in the flexgrid? The normal double-click event is for the entire flexgrid, correct? Thanks for the help!
API Click Popup Menu Item
i found out how to click a Menu with API:
Call PostMessage (targetWindow, WM_COMMAND, MenuID, 0)
but how do i do this with a popup menu? would i have to find the MenuID for the popup menu? if so, how would i do that?
THANKS
|