Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
m_drawing = True
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If System.IO.File.Exists(FILE_NAME) = True Then Dim lines As New List(Of String) Dim text As Array = File.ReadAllLines(FILE_NAME) lines.AddRange(text)
[Code]...
i get this error Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
for the line lines.RemoveAt(lines.IndexOf(ListBox1.SelectedIndex))
i would like to be able to erase a graphic that was created.I would like to not have to redraw the graphics minus the graphic thats unwanted.Is there a way to delete a graphic?
I have 100 textboxes with different numbers on them how can i erase theses numbers all together not like this textbox1.text = "" Erase numbers with one click?
My program uses OCR dll to get text from other program. It copy and paste text to a text box. Can someone give me a code that will erase everything exept numbers or ".
I'm having some trouble getting my button to erase the text that is in the textboxes when I hit it. I thought it would be something like txtAnswerText.Text = "" in side of the Next1_Click sub but that didn't do anything at all.
Here' s my code to draw a single line on a windows form. Dim myPen As New System.Drawing.Pen(System.Drawing.Color.Red) Dim formGraphics as System.Drawing.Graphics formGraphics = Me.CreateGraphics() formGraphics.DrawLine(myPen, 0, 0, 200, 200) myPen.Dispose() formGraphics.Dispose() I would simply like to erase it now. I've read that the best way to do this is to re-draw the whole form, or to delete the line object..etc..
I have to automate a program that is outside of my control. The way I'm doing this is to use SendKeys.SendWait("keys") to the other program. The problem is, there are multiple fields that might be active and no way to select a single one with confidence. The fields are all different lengths, so my solution is to copy something really long, copy it to the clipboard, and look at the last character that made it though, so I know which field is selected in the other program. This overrides the clipboard, unfortunately.
I already have code to read ID3v1 and v2 tags. That's not the problem. I open an IOStream, locate the ID3v2 header and pull the bytes out. Handling unicode was a bit of a sod, but I got it working.
What I don't understand is how to remove an ID3v2 tag or write one out. ID3v1 is easy - just truncate the file, then append some bytes. Simple. But ID3v2 tags don't have to be at the start of the file, do they? It's conventional, but by no means mandatory. If I just crop the entire ID3 out of the file, and close the gap, will that work? And then, to write my own tags, should I just write the bytes to the front of the file? Or do I need to update other bits of the file so the player will know where the audio data has moved to?
Also, do I need to use unsynchronisation? How can I tell if I need to?
I've looked on CodeProject; I've googled; and I've read the specification on id3.org - which, by the way, is less than clear! For example, it says that the "Extended header size" can be 6 or 10 bytes in length. So um....how am I supposed to know which one? Is there some magic way of determining how many bytes this value is being stored as?
1) I still don't know how to link how to link form 1 and form 2...(can we link or NOT??) 2) How to create button erase the answer in form? 3) How to link micrososft access n vbnet? 4) How to create button next n go to the next form?(ex: from form 1 to form 2).
What I don't understand is how to remove an ID3v2 tag or write one out. ID3v1 is easy - just truncate the file, then append some bytes. Simple. But ID3v2 tags don't have to be at the start of the file, do they? It's conventional, but by no means mandatory. If I just crop the entire ID3 out of the file, and close the gap, will that work? And then, to write my own tags, should I just write the bytes to the front of the file? Or do I need to update other bits of the file so the player will know where the audio data has moved to?Also, do I need to use unsynchronisation? How can I tell if I need to?I've looked on CodeProject; I've googled; and I've read the specification on id3.org - which, by the way, is less than clear! For example, it says that the "Extended header size" can be 6 or 10 bytes in length. So um....how am I supposed to know which one? Is there some magic way of determining how many bytes this value is being stored as?
simple question. How do I erase all the rows in the DataGridView? This is the code I got:
[Code]...
It updates the values, but say a row was deleted from the database. It will get rid of all the values in the row, but it will keep a blank row. This results in it throwing this error: System.IndexOutOfRangeException: Index 1 does not have a value.
I have started to work some more on my 'shape editor'. If you're not familiar with it,ust imagine the Visual Studio form designer: a 'canvas' (the form) with a bunch of 'shapes' (the controls) that can be selected, moved, resized, etc. I have just finished implementing snapping between shapes and the canvas boundaries. But now I am having some slight issues with painting the snap lines.Just FYI: this is what I mean by snap lines:The blue lines that indicate that the 'buttons' are snapped to each other, and a purple line indicating that button1 is snapped to the boundary.
My shape editor is based loosely on jmcilhinney's 'manipulating GDI+ drawings' codebank entry, and a central idea in that post is to only draw what is necessary. In other words, when I move a shape I could re-draw the entire canvas, but it is much faster and smoother to only re-draw the old and the new location of the shape. Since nothing else has changed, I don't need to draw the rest. So, I simply invalidate the old bounds and the new bounds, and even with a lot of shapes all moving simultaneously it still feels very smooth.
I'm creating a BASIC application, and I can't figure out how to save a user selected file (FolderBrowserDialog) to a location selected in another dialog (SaveFileDialog).
THis code open my database Access and put the records into datagridview:[code]....I live(close) this form with datagridview,and when i return again the line marked in red don't make any affect in datagridview...The select jump to the first item in datagridview...
Okay so i have one list box and inside of it i have 4 items.Okay so what i want to do is.For example If the user selects item 1 i want msg to pop-up and say 1.
I want to let others to delete selected row in the following datagrid view and I have written it like this. Now when I select a row and press the delete button I can remove the selected row but it will not update the database which meant it will not deleting the above row.
I have bound my datagrid view using databinding. Private Sub dgvAllInvoices_UserDeletingRow(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewRowCancelEventArgs) Handles dgvAllInvoices.UserDeletingRow If MessageBox.Show("Do you really want to Delete this Invoice ?", "SD Technology", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = DialogResult.Yes Then [Code] .....
I am trying to use LINQTOSQL and I am new using it so could you please let me know how to take data once you write a query into an object.I got my query here which runs with no error and the count shows correctly being one when I login
Dim Data As New Data Dim DIMLOGIN = From a In Data.Members Where a.EMAIL = LOGINEMAIL.Text AndAlso a.PASSWORD = LOGINPASSWORD.Password Select a.ID
I've been working with a listview. I just need to know how to get the index of the selectedindex otherwise I can't work anything out, if the application doesn't know what is selected... I tried these codes but none tells me the index, I am just lost with it, thought shouldn't be that hard...
Dim index As Integer Dim item As ListViewItem lsvOrderDetails.SelectedItems.IndexOf item = lsvOrderDetails.SelectedItems.Item() index = item.Index
I have 2 listboxes, and i can't get out what i need to do for the method. The method is, if a item in listbox1 is selected, it will select the same line in listbox2 and same in reverse. there can be many many items.
I was wondering how i could color in pixels that are in a picturebox so say i have this image in my picturebox how could i turn it into this, i have a good idea on how i would accomplish this task , but i don't know how i would color in a sertin pixel at a x,y
im having a problem regard combobox selected index.the combobox wont change its index when i type a text that is the same with one of the items and pressing tab. when i check its selected index its -1. ill give an example to make it simple..combobox items = AB, AC, AD i entered "AB" by simply typing it not by selecting in the dropdown.its index is -1, how can i make the index the same with the items in the drop down?