Can User Copy Out Of Listboxes
Sep 16, 2009
I've got my first ever program and it's working. Having tested it a bit it would be helpful for the user to be able to copy the results printed in a listbox into an email or text doc. Just somewhere where they can make a note of it really.Is there something I need to do to enable it? All the google results I found were referring more to doing this in code. I literally want to be able to support Ctrl+A, the Ctrl+C straight out of the program to wherever the user wants.
View 4 Replies
ADVERTISEMENT
Jan 5, 2010
Is there a way to highlight an item in a VB.Net listbox without allowing the user to change selection?
When I set the selection Mode to "NONE" I canīt select an item in the code.
Same when I disable the listbox.
View 1 Replies
Nov 25, 2011
I am new to vb and I am having so much trouble with this. What I need to do is this: I have a form application for winter sports equipment rental.I have a listbox filled with the equipment for the user to choose from then I have a combobox for the user to select the duration they would like to rent it. The book that I am using has no examples I can refrence and i have had no luck online either. I am posting what I have so far. However, i think I am going in the wrong direction. I have been working on this for so long that I think I have over thought it and made a mess of it. I am thinking that I need to add a new class for rentalRates then use enum of durationType and equipmentType but I am unsure how to move that way. That is using a enum, a 2d array and a parallel array? [code]
View 1 Replies
Dec 9, 2011
I have a question. I'm deploying my VB app that performs some task VIA SCCM. The application is run with the NTAuthoritySystem account.
I would like to copy a log file to a server all domain users/computer can right to this folder. I'm trying to get a log copied to the server but since it's running as the system account it can't authenticate to the share to save the log file on XP machines.
Can somebody show me example code of how to save a file as a different user when running the program with the system account . Would this be secure to use a domain account to impersonate and save the file?
View 2 Replies
May 14, 2012
i have a richtextbox in a user control my user control is loaded into a program with a menu strip..when a user tries to copy and paste into my RTB the key commands do no get to me because they are grabbed by the parent application..is there a simple way when the RTB gets focus to make sure it recieves the ctrl+C command?
View 2 Replies
Jan 14, 2011
I have a program in which the user should be able to copy and paste picturebox. So there is a drawing panel in which the user puts a Picturebox and then the user can select the picturebox by double clicking on it and after that the user can copy and paste it.
The copy code is as followed:
Private Sub Bcopy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bcopy.Click
Cheight = PB.Height
Cwidth = PB.Width
Cname = PB.Name
Casname = PB.AccessibleName
[Code] .....
View 7 Replies
Sep 12, 2011
I am trying to create a VB.NET application that allows a user to copy an Active Directory user or template in order to create a new Active Directory user. Currently a user right clicks on a template and chooses Copy, then enters info for new user.user is then created just like the template user. How can I perform these operations using the VB.NET framework and Active Directory or Account Management DLL's?
View 4 Replies
Mar 12, 2010
I would like to make a "deep copy" of a class object that I have defined. See Visual Basic 2005 Code below
Dim MyStuff1 as new MyClass
Dim MyStuff2 as new MyClass
mystuff1.getbyID(anID)
mystuff2 = mystuff1
Unfortunately the statement "mystuff2 = mystuff1" makes a "shallow copy" of mystuff1. Therefore, if mystuff1 is redefined then so is mystuff2. What do I have to do in MyClass to implement a deep copy method such that operations on mystuff1 and mystuff2 are independent?I would prefer something like
mystuff1.deepcopy(mystuff2)
or
mystuff2 = mystuff1.deepcopy()
View 4 Replies
Jan 28, 2011
Need to copy files to a directory within the user profile. simple task if i hard code the path, however i need the code to account for different users who run the code. this is where i run into the issue. code so far
Dim src As String
src = Environment.GetEnvironmentVariable("userprofile")
Label1.Text = src
[code].....
View 1 Replies
Aug 11, 2011
I am trying to copy an entire folder and all of its contents that is in the same location as my program that is running to a user selected location. I started off by using a SaveFileDialog, but now I am working with a FolderBrowserDialog. Here is some code:
Private Sub BackupButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackupButton.Click
Dim sourcePath As String
[Code]....
But when I run the program, it works, but it does not copy the entire folder in the application startup location.. how I can copy that folder that is in the same location as my program to a user selected location?
View 14 Replies
Dec 28, 2010
I need to know the time elapsed during this copy paste operation and then show it to the user
[Code]...
View 11 Replies
May 8, 2009
I wanted to know how to enable the user to copy and paste the text in a message box, how can I do this?
View 8 Replies
Feb 28, 2009
I'm wanting to write a program where a user can copy text from a pdf file, paste it into my program and it can identify which file the text came from and where in the file the text was copied from. This is so that later on, the user can then select the pasted text, and the program can load up the source pdf and highlight the text section.Are there any components out there which I can use to accomplish this
View 2 Replies
Dec 11, 2011
I'm writing an Excel file recovery program with VB.Net that tries to be a convenient place to gather and access Microsoft's recommended methods. If your interested in my probably kludgy, error filled, and lacking enough cleanup code it's here: http:[url]..... The basic functionality seems to work although I haven't tested graph macro table recovery yet.
It occurred to me that Vista and Windows 7 users could benefit from being offered a list of previous versions of the file within my application if the Shadow Copy Service is on and there are previous copies. How do I do this?I looked at a lot of web pages but found no easy to crib code. One possibility I guess would be to use vssadmin via the shell but that is pretty cumbersome. I just want to display a dialogue box like the Previous Versions property sheet and allow users to pick one of the previous versions. I guess I could just display the previous version property sheet via the shell by programmatically invoking the context menu and the "Restore previous versions choice", however I also want to be able to offer the list for Vista Home Basic and Premium Users who don't have access to that tab even though apparently the previous versions still exist. Additionally if it possible I would like to offer XP users the same functionality although I'm pretty sure with XP only the System files are in the shadow copies.
I looked at MSDN on the Shadow Copy Service and went through all the pages, I also looked at AlphaVSS and AlphaFS and all the comments. I'm kind of guessing that I need to use AlphaVss and AlphFS and do the following?Find out the list of snapshots/restore points that exist on the computer.Mount those snapshots.Navigate in the mounted volumes to the Excel file the user wants to recover and make a list of those paths.With the list of paths handy, compare with some kind of diff program, the shadow copies of the files with the original.Pull out the youngest or oldest version (I don't think it matters) of those shadow copies that differ from the recovery target.List those versions of the files that are found to be different.This seems cumbersome and slow, but maybe is the fastest way to do things. I just need some confirmation that is the way to go now.
View 2 Replies
Mar 9, 2012
I'm working on an app in which the user copy and pastes from a website into a richtextbox then the program uses the phone number, name and "match by string" from the richtexbox. What is copied is like an Excel table type thing but all the data is in Column "A". The data isn't tab deliminated. If i split on spaces then that will give incorrect results since some of the pieces of data have spaces in them. It looks like I'm about to do some really nasty ugly coding to get to the values I need. take a look at this snippet of data and tell me of a graceful way of getting the name, phone number and that last value in the line if such coding exists? This is the info I would need to pickup on in the first row of data. SHEKITA LLOYD, (xxx) 956-80, and Non-Payment of premium.
This is a sample of the data:
Producer Code Policy # Insured Name Insured Phone Policy Status
08xx57 350xxx1xxx Cancelled Non-Reinstateable 01/09/2012 Non-Payment of premium;
08xx57 350xxx1xxx SHEKITA LLOYD (xxx) 956-80 Cancelled Non-Reinstateable 11/18/2011 Non-Payment of premium;
[CODE]...
View 5 Replies
Nov 15, 2010
I have an OpenFileDialog. I want the program to copy the file that the user selects to my "temp" folder. If the user doesn't select any file, then it doesn't copy any thing. Here is my code:
Dim Temp As String = "Temp"
If Not Form6.OpenFileDialog12.FileName = "" Then
System.IO.File.Copy(Form6.OpenFileDialog12.FileName, Temp & System.IO.Path.GetFileName(Form6.OpenFileDialog12.FileName))
End If
But it doesn't copy any of my files over that are loaded in the OpenFileDialog.
View 1 Replies
Mar 19, 2012
I am creating a programme in which the user searches a file by typing into a textbox. if the search terms match anything in the file, it will be displayed in the list box. I understand this may be unclear so i will include an example:If the user enters "Oliver" into the textbox, the programme will search the file for any records that include "Oliver".The records are stored in structures:[code]The user will then click the desired record (several may appear)how would i get the integer and perform simple addition and subtractions on it?
View 10 Replies
Dec 1, 2011
What I am doing is iterating through all the groups that belong to the top group (Generic reports). Then I take advantage of the GroupPrincipal.GetMembers(True) which will recurse through a given group name. I test to see if the user exits under that group and if true I put the group name in an arraylist.
I use the for each principal in GroupPrincipal.GetMembers to loop through each returned user to see if they exist.
Is there a way to put all the returned users Principal.Name from a given group in GroupPrincipal.GetMembers into an ArrayList? This would allow me to to use Arraylist1.IndexOf to search for user. Which would be much faster then iterating through a returned list using the for each construct.
Sub RetAllMbrs(strUser As String)
Dim oPC As PrincipalContext = GetPrincipalContext() '<- this is function somewhere else in the code
[Code].....
View 1 Replies
Nov 8, 2011
i keep getting this very wierd problem were i put in audio into my forms and (Design) but when i put in a 4'th song, it stops working and comes up with a error. I havn't limited my audio to how much songs i can play but for some reason it just stops playing them. This code below is the code i use for this form
Public Class Form1
[Code]...
View 7 Replies
Nov 15, 2011
First my prog scan a specific path "C:music" which contain Mp3. Then it takes the MD5# of all mp3 and put it in a listbox1. Also on the formload it does open a ".txt" which also contain MD5# that goes into listbox2.Now this is what i am looking to have :When i click my button it compare each line of my listbox1 to listbox2. If , for exemple , the first line of listbox1 is already in the listbox2 then it delete the first line of listbox1 (listbox1.items.removeat(0)). And Do until listbox1.items.count = "0".
View 2 Replies
Feb 17, 2009
i am generating a listbox from a txt file this list box has ip's in and what im trying to do is run a for each statement
for each item in listbox.items
me.query()
next
this is what the query() is
Try
Dim UdpClient As New UdpClient()
UdpClient.Connect("my ip in here", 2005)
[code]....
this is the same code i used for my last app to populate a list box?
View 2 Replies
Jun 2, 2010
I have a program I'm trying to put together to allow my employees to submit shift reports. I'm doing this simply to make my life a little easier as this way, they will all be formatted the same. Instead of spending a large chunk of my afternoon thumbing through a bunch of differently formatted reports.
One feature that I need to figure out requires that one listbox can see what another is doing. Here, let me try to explain..
I have one list box that keeps track of EVERY action the employee does on a customers account. (cancel, upgrade, downgrade) and then a hidden listbox that JUST tracks "cancel" actions..one for "upgrade" actions and one for "downgrade" actions.
The reason behind that is that in the shift report, the all need to be listed separately. This way, I can just add each list to it's own array and list them where I need to.
The problem I've run into... If an employee handles an "upgrade" action at the beginning of the day..and then later on the upgrade is canceled, I can easily remove it from the main listbox that shows everything, however, I can't figure out how to find it in it's own listbox. The "Upgrade" box.
View 11 Replies
Jun 2, 2010
I have a program I'm trying to put together to allow my employees to submit shift reports. I'm doing this simply to make my life a little easier as this way, they will all be formatted the same. Instead of spending a large chunk of my afternoon thumbing through a bunch of differently formatted reports.
One feature that I need to figure out requires that one listbox can see what another is doing. Here, let me try to explain.I have one list box that keeps track of EVERY action the employee does on a customers account. (cancel, upgrade, downgrade) and then a hidden listbox that JUST tracks "cancel" actions..one for "upgrade" actions and one for "downgrade" actions.
The reason behind that is that in the shift report, the all need to be listed separately. This way, I can just add each list to it's own array and list them where I need to.The problem I've run into... If an employee handles an "upgrade" action at the beginning of the day..and then later on the upgrade is canceled, I can easily remove it from the main listbox that shows everything, however, I can't figure out how to find it in it's own listbox. The "Upgrade" box.
So unfortunately, on the shift report, it's still there even though it's gone in the program as far as the employee can see.The item in the main listbox doesn't have the same index as the item in each individual list boxes so I can't just tell it to remove the item at the same index..
View 1 Replies
Oct 5, 2009
Way to Print three listboxes
View 6 Replies
Mar 13, 2010
So I have a ListBox that animates the images in it. Now I think this is impossible, but I need to let the user choose a custom animation speed. Here's the
vb.net
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles animate.Click
Dim cananimate As Boolean = True
[Code]....
View 17 Replies
Jun 5, 2011
I am starting to feel completely dumb when it comes to VB.Net coding. I am using Visual Studio 2010 and am trying to compare the numbers in 2 listboxes. If an item from list A matches an item from list B, I want it to add that item to List C. Once it has added the item to List C, remove those searched items from list A & B. Continue until it runs out of numbers to check.
If you are wondering what I am trying to do, I want to make a Common Factor list. I already have the Factoring list done, but got stuck here.
So far, my code looks like
Private Sub CommonFactors(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Common.Click
Dim BoolAdd As Boolean, i As Double, j As Double
[Code].....
View 10 Replies
Apr 6, 2012
I have this exercise which says the following: Create a form with 2 listBoxes. Add a number of items to one listBox. Create a button that when clicked removes the selected item in the first list and adds it to the second list... Also How can i create a Messagebox that will display error when nothing is selected
I wrote this code:
CODE:
View 1 Replies
Dec 17, 2008
I have a datagridview (parent) and a (well, several) listboxes that I am trying to create a relation with.Datagrid has master records which contain ID fields to lookup tables. The lookup tables are populated into listboxes.I have 1 dataset which contains tables for my datagridview(s) and my listboxes.I need to create the relations so that when they click on a row in the grid, it shows the corrisponding item in the listboxes as well.Problem is, a lot of the ID's in the parent table are empty... so when I try to create the relation, it blows up.
Code: "This constraint cannot be enabled as not all values have corresponding parent values." I'm doing like like so
Code:
lo_relation = New DataRelation("RelationName",DataGridTableIDColumn, ListboxTableIDColumn)
I tried to reverse it, naming the ListboxTableColumn as the parent. That allows the relation to build, but I can't set the Listboxes .ValueMember to that...I'm kind of stumped... as it needs to be a two way relationship.
1) When the parent record (datagridview) changes, it changes the value in the listbox
2) When the Listbox changes, it changes the "value" in the parent datatable so it can be updated.
Would I resolve my issue if I populated the parent with a "default" ID in each field (say 0)... if the database value is null? And furthermore, populate each lookup table with a "blank" default value as well? i.e. First record is ID = 0, Desc = ''?
View 1 Replies
Jan 8, 2010
I've seen the code on this site to setup a drag-and-drop between 2 listboxes (and that works perfectly for me), but I have a need to be able to move items between up to 12 listboxes. For example, I move an item from listbox1 to listbox2; at some point in the future, I need to be able to move that same item from listbox2 to listbox3, then at another point in time from listbox3 back to listbox1, etc. When I make these moves, I need the item to be removed from its previous location. I've attempted to modify the 2-listbox code to include, on my test form, a third listbox, but that code copies to the third listbox, and when I attempt to move the item from the third listbox to the second, it, too, only copies and does not remove the item from listbox3.
View 1 Replies
May 20, 2009
I have almost completed coding moving entries between listboxes. My only hangup is: when I trigger the dragdrop event I get the target listbox x,y coordinates. I need a way to convert these coordinates to an entry number so that I can insert the source entry in the proper place. Any one have a solution?
View 2 Replies