Also I'm using a Spreadsheet control form a third party tools.
I have a problem :
I copy data from an excel document , and Paste to spreadsheet control.
But before paste , I want to analyze the data being pasted.
The analyze that I want to make is :
If the data have been copied from Excel , I want to know how many cells contains each row.
If this number is greater than a specific number (x) , I want to paste only the first x cells and ignoring the others.
Good noon friends! Recently, i posted on how to make two images appear far away. Now, i used the earlier method i was using before. I have painted the form with ground and cloud picture which now has the look of cloud and ground but finding it difficult to paint the walls to form a complete 3d look. How to paint the walls please? Language am using is vb6
Good morning friends! I am working on animation and painted a form with some textures to have 3d style and is working fine. Then i tried to place two walking boys animation. This is the logic i want to use: the two boys will walk towards each other and the one the at the rear will appear far away and the one at the base will appear near to viewers. How can I achieve this? Please... I know i need some math and physics calculation but i tried but couldn't do it.
Yep, i tried something of this nature but couldn't meet the requirement. Dim YGap As Long Dim XGap as Long Dim setHeight As Integer 'set boy2 at the rear height Dim curY as Long' get the boy2 current y position then on form load, i added this YGap=Me.Height XGap=Me.Width on timer tick, i added this boy2.Top = boy2.Top + 100 curY=boy2.Top If curY <= YGap/20 Then setHeight = 900 boy2.Height = setHeight End If If curY <= YGap/15 Then setHeight = 1200 boy2.Height = setHeight End If If curY <= YGap/10 Then setHeight = 1400 boy2.Height = setHeight End If If curY <= YGap/5 Then setHeight = 1800 boy2.Height = setHeight End If then, i added this to ensure boy2 returns to his starting once he gets to the Me.ScaleHeight If boy2.Top >= Me.ScaleHeight Then boy2.Top = Me.ScaleTop + 500 End if but, not working fine. Please give any idea.
Part of your problem is that you are using absolute values in your calculations, rather than scale values based on percentage differences between the images, and maybe even the background. The issue is really a mathematical problem rather than a programming one.
Also please use <pre> tags round your code so it looks readable like:
If boy2.Top >= Me.ScaleHeight Then
boy2.Top = Me.ScaleTop + 500Endif
Ok thanks. Then, what is the best idea? And please, i just downloaded something of that nature but unable to get the flow of the codes because there are no comments to understand the flow. The poster declared <pre>Dim i,j As Integer p(200,200)</pre> and he went further to say <pre>For i=1 To 200 For j=10 To 150 p(i,j) = 1 Next Next
For i=20 To 100 For j=10 To 100 p(i,j) = 1 Next Next</pre> and so on... What does this really mean? Please, any idea because am lost at the post and it was posted 2005 not sure if there will be any reply if i ask there.
Please be gentle, my first post. I am new at vb.net and am need help syncing my textbox and data grid so that when I move to the next record in the textbox the grid view also moves to the new row. Listed is my code, help would be greatly appreciated.
Dim sql AsString'********************* Populate DataGrid *********************
sql = "SELECT * FROM TempCreditors;"
MyConn = New OleDbConnection
MyConn.ConnectionString = connString
ds = New DataSet
tables = ds.Tables
da = New OleDbDataAdapter(sql, MyConn)
cm = New OleDbCommand(sql)
da.FillSchema(ds, SchemaType.Source, "TempCreditors")
Dim view AsNew DataView(tables("TempCreditors"))
grdDisplay.DataSource = ds
grdDisplay.DataMember = ds.Tables("TempCreditors").TableName
Catch ex As Exception
MessageBox.Show("Unable to connect to database, or an error occurred.")
EndTry'********************* End Populate DataGrid ******************
Binding_Source.DataSource = ds 'grdDisplay.DataSource
Binding_Source.DataMember = ds.Tables("TempCreditors").TableName 'grdDisplay.DataMember
'Bind Form's Textboxes
txtCreditor.DataBindings.Add("text", Binding_Source, "Creditor", False)
txtAmount.DataBindings.Add("Text", Binding_Source, "Amount", False)
txtAmtPaid.DataBindings.Add("Text", Binding_Source, "Amt Paid", False)
txtRemBal.DataBindings.Add("Text", Binding_Source, "Rem Bal", False)
'Right Align GridView text
grdDisplay.Columns("Amount").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
grdDisplay.Columns("Amt Paid").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
grdDisplay.Columns("Rem Bal").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
'Set Column Properties
.Width = 610
.Columns("Creditor").Width = 250
.Columns("Amount").DefaultCellStyle.Format = "c"
.Columns("Amt Paid").DefaultCellStyle.Format = "c"
.Columns("Rem Bal").DefaultCellStyle.Format = "c"'Hide Columns
.Columns("ID").Visible = False
.Columns("Due Date").Visible = False
.Columns("Paid").Visible = False
.Columns("Mid Month").Visible = False
.Columns("End Month").Visible = False
.Columns("Due Month").Visible = False' .Columns("Rem Bal").Visible = False
.Columns("Pay Date").Visible = False
.Columns("Deduction").Visible = FalseEndWith'Bind Grid to Nav buttons
MyCM = CType(BindingContext(Binding_Source), CurrencyManager)
MyCM.Position = 0' grdDisplay.Rows(0).Selected = True
Last Visit: 31-Dec-99 19:00 Last Update: 21-Nov-14 23:34