.net - There Is No Row At Position 0
Jul 2, 2011[Code]...
Is it possible to give like this m_qty = ds_uqc.Tables(0).Rows(0)(4)?
[Code]...
Is it possible to give like this m_qty = ds_uqc.Tables(0).Rows(0)(4)?
I have looking for a tutorial or class that demonstrates more than a trivial example of saving a windows position on closing. The ones I have found don't seem to work on all systems because of:
1. Multiple monitors. (and resolution between those monitors)
2. Toolbar size and position (toolbar is only on the primary monitor, well sometimes)
3. Sometimes the programs dont open on the right monitor they were closed on.
Is there an extensive class or tutorial on all the stuff a programmer needs to get right to have a window size and position persisted between executions?
I am using the following code to populate data in Textbox1:
[Code]...
I have few functions assigned in TextBox1_TextChanged event. The problem i am facing is this event is fired twice, once after the Fill command and another after the Position command whereas i want the event to fire only once after the Position command. What should i do?
I also have a function that returns ALL tiles on the map and they're X, Y position. How could I find out which one is closest to the position I specify? I can't figure out how to go about it. how to implement it with this. Heres a MADE UP example if what I'm trying to do:
Dim MyPosition as New Position()
MyPosition.X = 400
MyPosition.Y = 400
Dim tList as New List(Of Tile) = MyMap.GetTiles
Now, I can already do the stuff above, but what I need to make is something like this:
tList.GetTileClosestToPosition(MyPosition)
I have two forms: Main and Options.Main can be moved around the screen (like a normal window).When the user clicks a button, the Options form opens up and the Main form HIDES.How do I set the Options form to open in the exact place that the Main form was last on the screen (to give it the effect the MAIN form never went into hidding)I was thinking to set Option form's StartPosition to Main's current position, but I don't know the syntax for that or if it's even something you can do.
View 4 RepliesI'm Pilipino and im new here . and this is my first time making a program . I used VS2008 my database is access 2007 .. I'm making a program for our hospital.. Im using Listview as my data table. when i delete a row or information . The error is There is no row at position 0 .
View 3 Repliesi have a datagridview. On right click it shows a contextmenu but it is always in the right upper corner. I want it so that the menu appears on the cell where user right clicks. It could be Cell 1 or two or whatever.
View 1 RepliesI have a datagrid named as dtagrdScaleoffinance with 5 rows. Now I want to display the current row in my textbox controls on my MouseUp event.
Here is my sample code
Private Sub dtagrdScaleoffinance_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles dtagrdScaleoffinance.MouseUp
Dim rc As Integer
rc = dtagrdScaleoffinance.CurrentRow.Index
getemp(rc)
[Code] .....
Okay so i have created my search form and everything works perfectly when you type into the text box the list box is filtered when you selected a name from filtered list box the customer details are shown and when you select a booking id number for that customers bookings you get the booking information however when i try to close to form i get an error no row in position -1 Since the close button on the form takes you back to the main menu this is an issue but i cant see why its doing this or how to fix it.
[Code]...
i am trying to populate all the emails in my distribution-list where comms = 'to', when my code reaches this part it gives me the error: There is no row at position 2 since i have 2 emails with comms = 'to' [Code] that i could see is that the for loops twice and strEmails shows the 2 emails but it does no stops there it try a third loop ans it stops at row = oTable.Rows(i) then it gives the error.
View 2 RepliesI have a combobox that is triggering the population of some checkboxes depending on the user mode. For some reason, when I put a MsgBox() at the beginning of the function, it works fine. But without that MsgBox(), I get the error that there is no row at position 0. MsgBox("value changed") '<---- this is the box that clears the error
CODE:
How can I get the Y position of the ContextMenuStrip?
View 1 RepliesI have a string like this: mstring = "0123456789ABCDEF"
how can I get the vale at a given position, such as 12?
I know with PHP I can do this:
val = mstring{12}
and it will give me the twelfth value in the string, which would be "C"
I am getting the error there is no row at position 6 but there is data at position 6. May I know if there is any better way apart from this that will "see" the correct number of rows in the database and display out the correct rows in the database? So lets say you have one row auto - increment and one column containing the data. Currently now if i delete off the row no 6 and add back the row, the dataset cannot see this row anymore thus giving me the error, there is no row at position 6.
If i take off the auto - increment row and test this method out, i get the same error.
[Code]...
how i can find the position of a letter(let's say in a textbox of 50 letters) so then when its position is found i can change that letter by the position?
View 6 RepliesPrivate Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Clear()
TextBox2.Clear()
End Sub
How do I make the cursor appear in textbox1 after clicking the button?
Given a set of X,Y,Z data points, how would I interpolate a Z value for a known X,Y position? Are there any methods built into .NET to accomplish this. What algorithm could I use?
For example, say I have a graph of X, Y, Z data, and I know the cursor's position. I can find the four closest real data points. I would like to interpolate the z value for the X,Y position of the cursor.
Here is a dummy data set.
(x,y,z)
(-4, -2, 700.065);
(-4, 0, 932.907);
[Code].....
If the cursor was at (.3,.5), could I use the four closest real data points (0,0), (0,2), (2,0), and (2,2) to find the interpolated z value?
I am trying to save my scale configurations in the database so first I have to check if it exists in the database.and I am using the code below to do that . however when there is no data in the database I will get an error "No row at position 0" or when the scale number is not there i will get the same error.
View 8 RepliesI rotate an image, execute a drawstring, rotate it back, execute another drawstringbut when I execute the second drawstring it is further to the right than the original.This is the basic code that I am using.
Call label_inches(PROP8, True, JUST_LEFT, Pen1, _
(TBL_TOP * (517 / 219)), (GRPH_LEFT * (2038 / 875)), GRPH_LEFT, TBL_LIN_DATE_Y, _
"Ending", False, vbBlack)
[code].....
The below code is giving error "There is no row at position -1" when I click the mark completed button. The database field is being updated with the current date and time before it errors.[code]
View 2 Repliesi've been creating a program in VB that connects to a Microsoft database, and up until now, the program has been displaying the information fine. however, all i get now is the error message "No row at position 0" whenever it tries to display almost anything.
I am baffled as i have 3 forms that work and are programmed exactly the same way and only 1 works fine :/
[Code]...
I seem to have a problem with the following the follow code is in a click event of a new button:
sqlBindingSource.AddNew()
the follow code is in a click event of a delete button:
Try
[code].....
i have this little problem that i cannot get my gead around
i am loading list view from a table then checking if a specific column value in that table when i load the list view from the table everything works fine but when i ask the ds to give me a specific value out of the table i get error
there is not row at location 0
here is my code
Try
Dim dt As DateTime = (DriverRoster.lvViewRoster.SelectedItems(0).SubItems(0).Text)
'Dim culture As New System.Globalization.CultureInfo("en-AU")
[Code]......
in my document i am creating 3-4 pdfptables. at design time i dont know the size of the tables. i need to place the 2nd table right after the first, but i dont know the position of the first (i cant calculate it because i dont know how big it is). how do i know where to place the second table?
View 2 RepliesBut not my application.A app i use refuses to be brought forward, so wondered if there was a way for a vb app to run in the bg that can force a specified application to stay on top, & even maybe set its screen position and lock it there???
View 6 RepliesI would like to get the x, y position from the Params when the WM_LBUTTONDOWN is sent in vb.net.I got this to make the param but how do I get the position from it.
IntPtr lParam = (IntPtr)((y << 16) | x);
My function:
Protected Overrides Sub WndProc(ByRef m As Message)
Select Case m.Msg
Case WM_LBUTTONDOWN
[code]....
Update: I just tried this and it works perfectly.
Dim pos As New System.Drawing.Point(CInt(m.LParam))
How to set winform start position at top right? I mean when user click (start) my winform application the winform will appear at the top right of the screen?
View 2 RepliesI'm writing a VSTO add-in to add a button the Standard toolbar for all new MailItems in Outlook 2003. I've got it mostly finished, but I can't see to work out how to set the button's position on the taskbar I'd like to place it right next to the Send button.Here's the code I have so far.
Private Sub colInsp_NewInspector(ByVal Inspector As Microsoft.Office.Interop.Outlook.Inspector) Handles colInsp.NewInspector
[Code]...
I have the following problem in VB.net. I have a string like Dim str as String = "ABCDEFGHIJKLMNOPQRSTUVWX" now i want to add a delimiter from any one of them (Comma, Hyphen, Slash, Tab) into the string at the specified position like after every One, Two and so on characters. i WANT THE RESULTANT STRING LIKE
[Code]....
I am not attacking this in the correct manner. See this code snippet ' Where dgv is the form DataGridView
[Code]...