Search results

  1. C

    Saving changes made in a DataGridView to an Access Database

    Hi, I cant figure out how to update my database with changes made in the datagrid view. I am useing the following code to fill the datagridview: Dim dsContacts As New DataSet Dim connstr As String = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\MTA.mdb;Persist...
  2. C

    Query to produce true/false responsce

    Hi I am wanting to query a database to find if it contains a record, e.g. search all the the name fields in all the records for "bob" then execute a section of code if bob is found. Could anyone tell me how to do this, or does anyone of any examples on how to do this? Thanks
  3. C

    Key press event

    Hey, Im makeing a game and I want to be able to start a new game when the F4 button is pressed. So far I have this: Private Sub frmGame_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If e.KeyCode = Keys.F4 Then MsgBox("you...
  4. C

    moving a button out of a panel

    the document outline is a brilliant tip, its very usefull when your useing alot of controls, id never seen it before I never really explained the orginal thread very well, what id actuly meant was moveing the box with code rather than the ide. e.g. (controlname).Location = new point(x,y)...
  5. C

    moving a button out of a panel

    hey, I have a button inside a panel (pnlBoxesA) and i need to move out of the panel onto the main form. Any ideas how i can do this?
  6. C

    Picture Box Contents

    How can you find out if a picture box contains an image or is just empty? I want to be able to use a loop to empty all my picture boxes, however if one of them doesnt contain an image i get a runtime error. Here is the code I have so far: Dim counter As Integer For counter = 1 To...
  7. C

    Hiding Code

    Is there anyway to hide particular section of code that i chose, like how you would with a single subroutine? I want to be able to put several subroutines in one section that i can then expand/colpase.
  8. C

    displaying a message box when the 'X' is clicked on the toolbar

    How would you get a yes/no message box to appear when the red 'X' was clicked on the toolbar. I asumed it would work the same as if you were putting the code behind a button only with a different event. however i can not get it so that the form wont close when the no button is clicked This is...
  9. C

    selections - range of numbers

    hey, I need a better way of writing that code below. multipule5 is a double and i need to check when its a whole number between 0 and 20, so i cant use 1 to 20 or >1 or <20 as for example, 3.54 would count as being between 1 and 20. any ideas? Select Case multipule5...
  10. C

    Clearing data held in a text box

    Whats better to use; TextBox.Clear or Textbox.Text = ""I'd allways been taught to use second method, however the text book i was looking at, used the Clear prorpety.
  11. C

    Tab Controls

    I have two tabs "tabQuotation" and "tabDetails". I have a button on tabDetails and I want it to show the next tab (the same way that "tabDetails.show" would if they were seperate forms). Can anyone help?
  12. C

    capital letters

    thanks, got it workin
  13. C

    capital letters

    Is there a way of makeing all the letters in a text box capital letters? And also is there away makeing the first letter of each word a capital? e.g if the user enters mr smith, it would automatically make that Mr Smith. Any Ideas or suggestions? thanks
  14. C

    calling a sub from a different form

    How do you call a subroutines from a different form? The subroutine I want to handles a text box being changed, and i want it to do the same thing on a different form. I triedCall frmOrder.textbox_name_validationCan anyone help?
  15. C

    Directories

    Hey, I want to save a file in a directory, but i needa do this multiple times. I put this code under the form load event If Directory.Exists("Orders\") Then Exit Sub Else : Directory.CreateDirectory("Orders\" & DateString) End If and im putting this for a button...
  16. C

    multiplying two text boxes

    I need to multiply two integers in two different text boxes, i was useing the following code: Me.txtboxCost = (frmOrder.txtboxSize.Text * txtboxPsqm)and vs 2005 says: I'm sure this is something simple lol, i know the method I'm useing works in vs 2003, is this just a difference between the two...
  17. C

    Validation

    hey, I need some help with this: Private Sub txtboxName_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtboxName.TextChanged If txtboxName.Text = "" Then Exit Sub CustomerName = txtboxName.Text If IsNumeric(CustomerName) = True Then...
  18. C

    Records

    I have 3 strings, and 2 integers and 1 boolean value from a form which i need to be copyed to another form. They dont need to permantly saved. How would i copy these values from one form to another? Thanks, Martyn
Top Bottom