Jump to content
Xtreme .Net Talk

phreaky

Avatar/Signature
  • Posts

    72
  • Joined

  • Last visited

Everything posted by phreaky

  1. No, the parenthesis were there ONLY to make tell an example of the string, my string is just a number.
  2. How can I compare two numeric string to see which one is bigger?, I mean, I have two strings submited by textboxes....I try to compare if sting a (14) is bigger than string B (9), but it keeps saying me B is bigger (if I just compare textbox1 < textbox2). How can I compare two strings by its numeric values? I tried to use convert.toint16, but it says I give the string in bad format. How can I compare those???
  3. Thanks a lot! Works smoothly
  4. I'm orking on a simulation project, and I need to fill a Listox using a timer to do it, I'm simulating a phone central with 25 lines and many users, and I need to simulate users making a 'lane' to get access to telephone line and dial. For this, I need to put them in 'lane' (my lane will be the Listbox) every certain time, but I need to use the timer and I don't know how. I have consulted http://www.msdn.com, but it has an example for use the timer in console and NOT in Windows Form (and I'm not so expert with Visual Basic .NET), so I need an example of encolating people in my listbox using the timer.
  5. Well...thanks Ingis, but I don't know how to use what you gave me, because "Regex" is not a native function of VB, could you please teach me a little more about it? Sorry to bother, I'm kinda newbie with VB .NET, I'm using a txtbox, so, could you give me a piece of code using my txt_cariable.text, so I can use it? Thanks anyway for you concerning.
  6. Anyone has a code for validating email address (offline), I mean, to validate that the user type a good format (user@host.ext) in email txtbox? VB talking of course.
  7. Well, I already grouped in Group Boxes, the problem was that the 2 pairs of radio were on the same Group, anyway I already changed for a radio and a check box, thanks anyway for the answers.
  8. I'm trying to do Windows Form, and I have to different inputs in the same form, that needs to be made with radio buttons. Both of them are booleans questions, so they have to have pair of radios by questions (()"yes" ()"no"), and of course if you select one the other one will deselect automatically (that works perfectly since it it automatically setted up). The problem is that the second question depends on the first question's radio buttons, I mean if in the first question I selected any answer (yes or no), when I try to select yes or no in the second question it deselect the answer in the first question, how do I set this up so the first pair of radio become independent from the second pair?
  9. Hmmm....I don´t know George, I haven't tried your code but...as I can understand it will check only if the DB has ANY record, I need to know if it has the record I´m looking for (specifically). Anyway, I appreciate your help and Iwill try your code.
  10. I'm using the A_Jam tutorial for handling databases (it´s a excelent tutorial!), but I ahve some problems, I´m trying to do the following: I'm inserting an user and I want to see if the user already exists in the DB, if os, a MsgBox should appear saying that "The user is already on the DB", if not, then the user must be inserted into DB and a MsgBox saying "User inserted!". With the tutorial I already made the insertion, my problem is that I can´t check if the user is in the database or not, in fact, it gives me an error I don´t understand, here´s part of the code I used: Dim sql, ci As String Dim conn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\" & "Hardvards.mdb") conn.Open() Dim sqlsrch As New OleDb.OleDbCommand("SELECT FROM Cliente * WHERE Cedula_cliente = " + Cliente_cedula_numero_text.Text, conn) Dim search As OleDb.OleDbDataReader = sqlsrch.ExecuteReader() Dim sqlcmd As New OleDb.OleDbCommand("INSERT INTO Cliente (Nombre_cliente, Apellido_cliente, Cedula_cliente, Direccion_cliente, Telefono_cliente, Celular_cliente) VALUES ('" + Cliente_nombre_text.Text + "','" + Cliente_apellido_text.Text + "','" + Cliente_cedula_numero_text.Text + "','" + Cliente_direccion_text.Text + "','" + Cliente_codigotelefono_text.Text + Cliente_numerotelefono_text.Text + "','" + Cliente_codigocelular_text.Text + Cliente_numerocelular_text.Text + "')", conn) While search.Read ci = search(4) If ci = Cliente_cedula_numero_text.Text Then MsgBox("Cliente ya existe") Else sqlcmd.ExecuteNonQuery() conn.Close() sqlcmd.Dispose() MsgBox("Cliente Insertado") End If End While And the error I get when I run and I try to insert into DB is: An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll So, what I´m doing wrong? and...how it´s I´m supposed to do to check if the record is already on the DB?
  11. Many thanks!
  12. Hello, I have a problem when I change the name of a Windows Form (VB), I changed its name and when I try to run it gives me a compilation error, I can continue and...in fact it still works but it says: 'Sub Main' was not found in 'Hardvards.Form1'. and in fact, if I continue it still works and run perfectly, but I would like to change my code so it can work properly, who I am supposed to change the name of my form on the main too?, My Form1 now it's called "Cliente_Form", so in the main it should be Hardvards.Cliente_Form...but where do I find the "main" to change it? :confused:
  13. I'm starting Web Design for mobile devices, in fact I'm coding a service of images for WAP phones. I have a problem, I'm starting first with the basics. I first make a site that loads a preview of the image (the image but very little) and then with a link button I hide some text and display the same image but larger. That works perfectly on a web browser...but when I try to access it through my cell phone, it doesn't make the change of images, it just does nothing. Why could this be? I'm associating the following code to my link button: Private Sub link_button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles link_button1.Click img_preview.Visible = False lbl_preimage1.Visible = False img_download.Visible = True txt_download.Visible = True link_button1.Visible = False End Sub As you can see, it's just hiding and showing images and textboxes. Why it doesn't work in my cell phone? What should I do to reload the page with the new settings?
  14. Just perfect for me Alex!, it works like a charm, muito obrigado my friend, I owe you actions in the supermarket business we talked :)
  15. No, I'm not, I'm using a csMusicLibrary that I found over the internet (its free), so, I don't think it would be a problem to use a timer. Still, I dunno how to use the timer :o
  16. I'm trying to use a timer function to handle an event (starting and stoping music). I dunno how to use the timer well, I would appreciate some help on this (with some code included!). I know that I have to set up a variable timer, and that its events will give me the 'flags' for starting or stoping the music, suppose that I already have the play and stop functions (in fact, I do!), how do I use timer to set use them?, I mean, after doing: dim t1 as system.timers.timer = New system.timers.time () Which would be the rest of the code to make the music start to play on 30s after the time starts??
  17. Which one worked for you?, I made the csMusicLibrary work for me, the other one (Bass) couldn't get it to work, it seems like the library doesn't work. Anyway, it worked for another way, now I'm happy :) By the way, we're almost country related, I'm portuguese's son :D
  18. Thanks Alex, I tried what you indicated, it seems the file I downloaded is kinda corrupted or something cuz, I can't make it recognizable as a DLL file for the VB. There is another thing to use in the page for playing MP3s, it's a VB Class, so, how can I use it?, I mean, how can I call a VB Public Class to use its methods?
  19. I've founded a VB free library, so, now how can I use it?, I mean, how do I import it to my actual and make it recognize its modules? Yeap, I'm a newbie.
  20. Well, thanks for the post but...I'm using VB, so, it would be kinda of difficult (for time reasons) to use this C++ code. Any VB code for playing MP3s?
  21. How can I play an MP3?, I mean, which control should I use in a Windows Form?
  22. After posting my message I just did what the other message recommended and it worked....the MsgBox was just a "flag" for myself to see that I was doing the right SQL command, I forgot to take it out, sorry :P
  23. Well it seems the problem goes another level...here's the fragment of the code that gives me problems now: OleDbDataAdapter1.SelectCommand.CommandText = _ "SELECT * FROM Carro WHERE Name_car = '%" & TextBox1.Text & "%'" MsgBox("SELECT * FROM Car WHERE Name_car LIKE '%" & TextBox1.Text & "'") DataGrid1.ResetText() DataSet11.Clear() OleDbDataAdapter1.Fill(DataSet11.Carro) DataGrid1.Refresh() Now, this is working ONLY if I don't add the two "%", but when you add them...the code doesn't work...I mean, it must show two items in the DB: one called "Tiburon" and the other one called "Tiburon FX" however it doesn't show anyone. I don't see any mistake in the sentence or the sintaxis...so, what is it??? PS: I already tried LIKE instead of "="
  24. Perfectly, that worked, GEZ!, completely different from VB6, huh?
×
×
  • Create New...