|
This might work if it has a handled function:
If MessageBox.Show("Are you sure you want to delete this employee?", _
"Employee", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = Windows.Forms.DialogResult.Yes Then
EmployeeBindingSource.RemoveCurrent()
else
e.handled = true
End If
Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"
|
|
|
|
|
Thanks, but no such member exists for System.EventArgs.
Just Empty, Equals, GetHashcode, GetType, ReferenceEquals, and ToString.
I commented out my Remove line, and somewhere it is still being deleted. The table's Deleting and Deleted events are being fired.
The documentation for BindingNavigator states:
BindingNavigator.DeleteItem Property
When set, this property generates the Click event handler for the Delete button. This event handler calls the RemoveCurrent method when the Delete button is clicked at run time.
Paul Watson wrote:
Like, if you say sort of, like, you know, one more, you know, time, I'm going to, like, you know, sort of sort you out, you know.
|
|
|
|
|
After reading my last message, it dawned on me to set the DeleteItem property on the navigator to None.
The button click is still handled by me, so everything is fine now.
Paul Watson wrote:
Like, if you say sort of, like, you know, one more, you know, time, I'm going to, like, you know, sort of sort you out, you know.
|
|
|
|
|
I want to bring up the context menu when a choose a record from a listbox. By right clicking on the record but it does not select or highlight the record. How can I do this. I see where I can see a click event but not a rightclick event. If I can't how do I initiate the contextmenu without rightclicking.
Thanks.
|
|
|
|
|
IIRC there are CP articles on this. Use Search facilities !
|
|
|
|
|
thank you but, I am not finding anything that allows me to select an item in a list by rightclicking on it. do you know what article would have this info? thanks.
|
|
|
|
|
searching CP for "listbox contextmenu" yields more than 20 hits, including this one[^].
Showing a contextmenu and selecting an item are two different things.
If you need a contextmenu that depends on the item your mouse is hovering above,
that article will do it.
If you want the item to be selected, what is the problem ? determine the item's
index, then call myListBox.SetSelected(index, true);
Hope this helps.
|
|
|
|
|
I am trying to select a listbox item using the right click not the left click. At the same time I want the contextmenu to come up so I can use the listbox item with my menu.
Ex: Listbox
Tim Robbins 123 4th street
Bonny Tyler 1888 8th Street.
I want to hover over a record and right click and select(highlight) the record. The context menu will have edit in it. When I click on edit I want all the data from the record that I selected to populate into fields. Can this be done? I see this all the time in Microsoft applications.
|
|
|
|
|
Hi,
you are right, I just learned there is something different about mouse clicking
for a listbox; it does not behave like other controls such as a panel:
- Click and MouseClick events only work for the left click, not the right click.
and for both MSDN says "This event supports the .NET Framework infrastructure
and is not intended to be used directly from your code."
- MouseDown and MouseUp events do work normally; they offer a MouseEventArgs
with Button property, so that is what should get you started.
|
|
|
|
|
If some can give me the difference between all this three technology
this will help me very much or if you can guide me from where i can read about the difference between those 3 thechniques.
Thanks a lot
Assaf
|
|
|
|
|
I have made a string variable and have populated it into a Word document (.doc). Now, is it possible to make changes to the text in the word document, then parse that information back into a string variable in the VBA code? (perferably replace the string I used to populate the Word document in the first place) Thanks for your help.
---
reegan41
|
|
|
|
|
It is probably possible and ugly
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
How to Change the color of Message Box in vb.net
|
|
|
|
|
You can't. You have to create your own message box using a standard form and a couple of buttons.
Only then will you have complete control over the visual appearance of your message box.
|
|
|
|
|
hy guys,
I have a simple question for you i suppose. Can you give me a hint how to open the new mail window of microsoft outlook throuwh vb.net?
I would like to open new mail window with filled subject, body and attachment. Then it would be nice to save this in msg format. Is this possible?
Dejan
|
|
|
|
|
hi frnd spektrino,
try this,
Dim oProcess As New system.Diagnostics.Process
oProcess.StartInfo.FileName = "mailto:meow@example.com?subject=Spam&body=This is the body text."
oProcess.StartInfo.UseShellExecute = True
oProcess.StartInfo.WorkingDirectory = "C:\"
oProcess.Start()
regards,
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Thanks for your answer. Is it possible to add the attachment using this method?
|
|
|
|
|
I think anything other than what Prasad has shown will require you to Interop with Outlook. Search Google[^] for details.
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
I did that But I will do it again thanks for now
|
|
|
|
|
Hello !
I have a query and i reqiure very urgent reply.
I want to read image from sql server 2000, which is in image datatype.
And i want to display it on my windows form's picture box..
Can U help me for this
i am egrly waiting for ur response..
Poll Adams
|
|
|
|
|
I'v never tryd this before (I always use a ftp fileserver and a path in the database) but I think you can just get the image the same way as you would request a string from the sql server.
If not you might want to consider using a file server and only a path in the database for it will most likly be faster and you're database size will be much smaller
|
|
|
|
|
There are almost as many examples of this on the web as there are chat applications. All you have to do is Google for "sql server 2000 vb.net store retrieve image[^]".
Do NOT use the term "urgent" aywhere in your posts. This tends to get you ignored. If it were that urgent, you'd be Googling this question yourself, until your fingers bled.
|
|
|
|
|
hi
look at this sample code. i use it for reading image from sql server database and showing in picturebox at my form.
<br />
<br />
Dim arrPicture() As Byte = CType(dsPictures.Tables(0).Rows(rowindex)("Picture"), Byte())<br />
<br />
Dim ms As New MemoryStream(arrPicture)<br />
PictureBox1.Image = Image.FromStream(ms)
|
|
|
|
|
hi
do you have vb.net code to find harddisk serial number and mainboard
thanks
|
|
|
|
|
So, how many timers are you going to post this question, then ignore the replys you get?
You're making a huge assumption. Most motherboard don't expose any kind of serial number.
You can get the serial number of most harddrives using the links you got 2 days ago.
CPU serial numbers (CPUID) are turnedoff by defulat in just about all systems. Relying on either CPU or motherboard serial numbers is a very bad idea if you're looking to use them for securing your application. There is NOTHING that says a hardware manufacturer has to incorporate them into the hardware and even less that says it should be readable by any code.
|
|
|
|