Jump to content
Xtreme .Net Talk

Robby

Moderators
  • Posts

    3848
  • Joined

  • Last visited

Everything posted by Robby

  1. Let's say they update the same row 30 minutes apart, would you want to inform them? What about 1 minute, or 3 seconds. What I getting at is that they're all handled the same way.
  2. Having to design GUI through coding is pretty tedious. think of how much more you'll learn. :)
  3. what does this have to do with Dreamweaver ?
  4. try this 'you can use the SubItems to itterate through all the columns and get each value... MessageBox.Show(Listview1.Items(Listview1.Items.Count - 1).SubItems(2).Text.ToString()) 'this removes the second to the last row... Listview1.Items.RemoveAt(Listview1.Items.Count - 2)
  5. Look here... http://www.xtremedotnettalk.com/showthread.php?s=&threadid=69332&highlight=INSERT
  6. yeah sure.
  7. Pass the whole thing to your function as a string (1.34%), then... Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Text = calc(TextBox1.Text.ToString) End Sub Private Function calc(ByVal s As String) As String If s.EndsWith("%") Then s = s.Substring(0, s.Length - 1) End If Dim n As Double If IsNumeric(s) Then n = CType(s, Double) n += 25.2 End If Return n.ToString & "%" End Function another way is to return as double and do the formatting in the textbox.
  8. use the IndexOf method of your string if str.IndexOf("%") = -1 then ' no %
  9. hmm, learn something new every day... Divil, where is the Parent (Label1.Parent = PictureBox1)
  10. then this has nothing to do with TransparencyKey or 32 bit res. It seems that setting the label to transparent does nothing. the only thing I can say is to set it's BG color to the same as the control. You can download this Color Picker I made a while back, use the Eye-Dropper to grab the color of any object on your desktop.
  11. I don't know about this specific control, but if your using a TransparencyKey , your desktop bit-rate be 24 or less.
  12. Which database are you using?
  13. I think it was late when I answered this, just realized what you were talking about Smartid.
  14. James this is because you're adding/declaring controls in some wrong manner within the code-behind. Or even some invalid properties in the designer. If you want, Zip and post a corrupt project and I'll find the problem.
  15. I had a small project (1000 lines), the wizard made a mess of things. Every second line used the compatibilty Library. argh! I recently re-wrote the app in .NET and it works nicely. :)
  16. Welcome home. :)
  17. here's a sample from Microsoft ...http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvssamp/html/vbcs_OwnerDrawnMenus.asp
  18. you can use Controls.Removeat() or Controls.Remove(label1) Or even the child of a container Panel1.Controls.Remove(label1)
  19. Try this.... Right-Click on your project (in Solution Explorer) >> Properties >> Configuration Properties >> Debugging ... Near the bottom, in the Debuggers section there are 4 check boxes, Which ones are selected?
  20. Can a dropdown have duplicate value even if the text is different Value no, text yes.
  21. Can you Zip a text file instead, thanks.
  22. You mean that if you select Dallas the onselectChange is triggered and NY is not triggered?
  23. Because it is a random thought, not a programming question.
  24. you can use this function... Protected Function Nz(ByVal vValue As Object, ByVal vDefValue As Object) As Object If IsDBNull(vValue) Then Return vDefValue Else If vValue Is Nothing Then Return vDefValue Else Return vValue End If End If End Function 'and call it this way CType(Nz(drSqlReader.Item("SomeStringField"), ""), String) 'or CType(Nz(drSqlReader.Item("SomeNumericField"), ""), Integer)
  25. You can call the function from a button click... Protected Friend Function SetTableValue(ByVal sSql As String) As Integer 'pass the INSERT INTO statement as the argument (as sSql) Dim cmd As SqlCommand Dim con As New SqlConnection("Your connection String") Dim recordsAffected As Integer Try If con.State = ConnectionState.Closed Then con.Open() cmd = New SqlCommand(sSql, con) recordsAffected = cmd.ExecuteNonQuery() Catch recordsAffected = -1 Finally If con.State = ConnectionState.Open Then con.Close() If Not cmd Is Nothing Then cmd.Dispose() End Try Return recordsAffected End Function
×
×
  • Create New...