Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 3 online users. » 1 Member(s) | 1 Guest(s) Google, MorrissgoX
|
Latest Threads |
Looking for Adventure? Fi...
Forum: Random Discussion
Last Post: iHOMEz
11-16-2024, 09:18 PM
» Replies: 0
» Views: 475
|
Prettys Womans in your to...
Forum: Random Discussion
Last Post: iHOMEz
10-30-2024, 07:45 AM
» Replies: 0
» Views: 755
|
Prettys Womans in your ci...
Forum: Random Discussion
Last Post: iHOMEz
10-26-2024, 10:50 AM
» Replies: 0
» Views: 785
|
Beautiful Womans from you...
Forum: Random Discussion
Last Post: iHOMEz
10-19-2024, 02:48 PM
» Replies: 0
» Views: 885
|
Prettys Womans in your ci...
Forum: Random Discussion
Last Post: iHOMEz
10-06-2024, 05:00 PM
» Replies: 0
» Views: 1,045
|
Womans from your city - V...
Forum: Random Discussion
Last Post: iHOMEz
07-28-2024, 10:26 AM
» Replies: 0
» Views: 1,419
|
Supreme Сasual Dating - A...
Forum: Random Discussion
Last Post: iHOMEz
06-14-2024, 11:28 AM
» Replies: 0
» Views: 1,847
|
Beautiful Womans in your ...
Forum: VB.NET
Last Post: iHOMEz
06-09-2024, 09:23 PM
» Replies: 0
» Views: 1,653
|
Hangman in Rust
Forum: Other
Last Post: brandonio21
02-04-2018, 11:14 AM
» Replies: 2
» Views: 20,648
|
How to: Search files from...
Forum: VB.NET
Last Post: brandonio21
11-25-2017, 12:55 PM
» Replies: 1
» Views: 15,958
|
|
|
VS2008 or VS2010? |
Posted by: Sohail - 09-08-2012, 10:44 AM - Forum: VB.NET (Visual Basic 2010/2008)
- Replies (3)
|
|
Hello guys,I'm new in BP forums as well as in programming.I just wanna ask a little easy question.Which visual studio edition you prefer would be better to use,VS2008 or VS2010?
And I don't speak English really well,so just underestimate it.
Thanks in advance...
|
|
|
Half-Life 2 Episode 3 |
Posted by: Vinwarez - 09-07-2012, 12:09 PM - Forum: Gaming
- Replies (8)
|
|
Am I the only person on this forums who waits for this HL2 episode since 2008? Do you think they will release this episode?
|
|
|
Least appreciated font? |
Posted by: brandonio21 - 09-05-2012, 08:39 PM - Forum: Computing
- Replies (4)
|
|
So, I recently received a professional e-mail from someone who works above me. This e-mail was written in Comic Sans. Because of this, I couldn't take any part of the e-mail seriously.
Are there any fonts that you guys just can't stand?
|
|
|
Generating a Random Color in Visual Basic .NET |
Posted by: Macatone - 09-03-2012, 10:47 AM - Forum: Code Snippets
- Replies (6)
|
|
Here is a helpful code snippit that I converted to Visual Basic .NET from Brandon's post in the Java forum.
This function returns a color with random red, green, and blue values.
Pastebin: http://pastebin.com/aS7hxDu5
[code2=vbnet]'This function returns a color with random red, green, and blue values
Function getRandomColor() As Color
Dim random As Random = New Random()
Return Color.FromArgb(random.Next(256), random.Next(256), random.Next(256))
End Function[/code2]
|
|
|
Loading DB data into Combobox then populate TextBox Controls |
Posted by: kismetgerald - 09-02-2012, 08:44 PM - Forum: Programming Help
- No Replies
|
|
Hey guys,
I'm using the following code to pull data from two tables in my MySQL database. Currently, the data is being loaded directly to the TextBox controls on my form.
What I want to do is this, but don't know how:
- 1. Load only Credit Card Number (ccNumber) into a ComboBox
- 2. Load the data into the TextBox controls only after the Credit Card loaded earlier has been selected from the ComboBox
HERE'S MY CURRENT CODE:
[code2=vbnet]Public Sub InitiateQuery()
Try
If TextBoxAccount.Text = "" Then
MessageBox.Show("Sorry, you must enter an ACCOUNT# before proceeding!")
TextBoxAccount.Focus()
Else
dbConn = New MySqlConnection("Server=" & FormLogin.ComboBoxServerIP.SelectedItem & ";Port=3306;Uid=hello;Password=123##123;Database=accounting")
If dbConn.State = ConnectionState.Open Then
dbConn.Close()
End If
dbConn.Open()
Dim dbAdapter As New MySqlDataAdapter("SELECT * FROM customer a INNER JOIN cc_master b ON a.accountNumber = b.customer_accountNumber WHERE a.accountNumber = " & TextBoxAccount.Text, dbConn)
Dim myDatatable As New DataTable
dbAdapter.Fill(myDatatable)
If myDatatable.Rows.Count > 0 Then
'MessageBox.Show("Customer Account Found!")
TextBoxLastName.Text = myDatatable.Rows(0).Item("nameLAST")
TextBoxFirstName.Text = myDatatable.Rows(0).Item("nameFIRST")
TextBoxSalutation.Text = myDatatable.Rows(0).Item("nameSALUTATION")
TextBoxCompanyName.Text = myDatatable.Rows(0).Item("nameCOMPANY")
TextBoxCard.Text = myDatatable.Rows(0).Item("ccNumber")
TextBoxCardType.Text = myDatatable.Rows(0).Item("ccType")
TextBoxExpireMonth.Text = myDatatable.Rows(0).Item("ccExpireMonth")
TextBoxExpireYear.Text = myDatatable.Rows(0).Item("ccExpireYear")
TextBoxCVV2.Text = myDatatable.Rows(0).Item("ccCode")
TextBoxZip.Text = myDatatable.Rows(0).Item("ccZipcode")
Else
MessageBox.Show("No Credit/Debit Card on file for this customer! Please try again!")
TextBoxAccount.Focus()
End If
dbConn.Close()
End If
Catch ex As Exception
MessageBox.Show("A DATABASE ERROR HAS OCCURED" & vbCrLf & vbCrLf & ex.Message & vbCrLf & _
vbCrLf + "Please report this to the IT/Systems Helpdesk at Ext 131.")
End Try
End Sub[/code2]
Thanks to you Brandon, I was able to learn how to do this query following your video tutorials.
|
|
|
Generating a Random Color in C# |
Posted by: Macatone - 09-02-2012, 03:23 PM - Forum: C#.NET (Visual C# 2010/2008)
- Replies (2)
|
|
Here is a helpful code snippit that I converted to C# from Brandon's post in the Java forum.
This method returns a color with random red, green, and blue values.
Pastebin: http://pastebin.com/PceciHEE
[code2=csharp]//This method returns a color with random red, green, and blue values
public Color getRandomColor()
{
Random random = new Random();
return Color.FromArgb(random.Next(256), random.Next(256), random.Next(256));
}[/code2]
|
|
|
|