Jx_Man 987 Nearly a Senior Poster Featured Poster
textunit.SelStart = Len(textunit.Text)/2
Jx_Man 987 Nearly a Senior Poster Featured Poster

you simply can not...a msgbox is a modal window that uses the standard windows system font.
you can manipulate it with use form as your message box..

Jx_Man 987 Nearly a Senior Poster Featured Poster

you want to make some reports?
then you can use Data Report Designer..

Jx_Man 987 Nearly a Senior Poster Featured Poster

so..you on form2 and after msg u want to back to form1?right?
so just showing form 1 after message..

Private Sub Command1_Click()

If Text1.Text = "" Then

MsgBox ("You have no content on your 1st Textbox")
Form1.Show
Unload Me
Else

End If
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

on timer tick event
- make randomize function to get new X and Y,so your button always get new location to moving every timer tick.

Jx_Man 987 Nearly a Senior Poster Featured Poster

what event do you want?button event?click event?or what?

Jx_Man 987 Nearly a Senior Poster Featured Poster

use condition on your select statment.

Jx_Man 987 Nearly a Senior Poster Featured Poster

very good. Would you like to share with us how to do it, so if other members get the same problem they can solved it.
And don't forget to mark this thread as solved..
Thanks :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

on datagrid double click event, get data on selected then show it on main form.

Jx_Man 987 Nearly a Senior Poster Featured Poster

write this on the top of codes

Imports System.Data.Odbc
Sawamura commented: jaauh +2
Jx_Man 987 Nearly a Senior Poster Featured Poster

using ascii checking on your button event.

Jx_Man 987 Nearly a Senior Poster Featured Poster

check the references of your project.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Ok. i understand it.
you mean why sohel in checkwinner got player name from sohel in global variable and why didn't get from other variable.

sohel in checkwinner get value when you called checkwinner and put which variable to used.
Ex :
there are 3 variable in global declaration

Dim ab as string
Dim sohel as string
Dim jewel as string

...
when u call checkwinner function you must fill parameter value.
say you want using ab as input value. then it become bellow code : Call CheckWinner(Text1, Text2, Text3, ab, jewel) so, ab will giving value and checkwinner get value from ab not sohel again.

Jx_Man 987 Nearly a Senior Poster Featured Poster

>> If I have other variable with (dim sohel as string) like dim ab as integer then the variable fox will work?
i didn't get what u mean.

what a function of variable ab?

Jx_Man 987 Nearly a Senior Poster Featured Poster

post the code that you've done...

Jx_Man 987 Nearly a Senior Poster Featured Poster

1. Yes, its for input name.
2. Yes, sohel used to know input name and show in msgbox. (same for jewel)
3. Yes, it connected.
First, sohel in CheckWinner function parameter and sohel in global declaration is different.
Sohel in checkwinner paramete got player name from sohel in global variable (from inputbox).
So you can change sohel paramete in checkwinner function with other name variable, its just a variable name. Same too for jewel.
Ex : sohel is fox and jewel is xof

Public Function CheckWinner(T1 As TextBox, T2 As TextBox, T3 As TextBox, fox As String, xof As String)
If (T1.BackColor = vbBlue) And (T2.BackColor = vbBlue) And (T3.BackColor = vbBlue) Then
    MsgBox "" & xof & "  win", vbOKOnly, "win"
    SetBackColor
End If
If (T1.BackColor = vbRed) And (T2.BackColor = vbRed) And (T3.BackColor = vbRed) Then
    MsgBox "" & fox & "  win", vbOKOnly, "win"
    SetBackColor
End If
End Function

But its still same when u call CheckWinner function (i mean the way to call).
Ex :

...
....
Call CheckWinner(Text1, Text2, Text3, sohel, jewel) ' sohel & jewel from global var
....
...

here, sohel and jewel from global variable for input name in the option button.

abu taher commented: thanks. I realy get a lot of help. +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

oh...i'm sorry for that (missing it).
In general declaration, you declare sohel and jewel but one by one.

Dim sohel As String
Dim jewel As String

then in module, add parameter of CheckWinner()

Public Function CheckWinner(T1 As TextBox, T2 As TextBox, T3 As TextBox, sohel As String, jewel As String)
If (T1.BackColor = vbBlue) And (T2.BackColor = vbBlue) And (T3.BackColor = vbBlue) Then
    MsgBox "" & jewel & "  win", vbOKOnly, "win"
    SetBackColor
End If
If (T1.BackColor = vbRed) And (T2.BackColor = vbRed) And (T3.BackColor = vbRed) Then
    MsgBox "" & sohel & "  win", vbOKOnly, "win"
    SetBackColor
End If
End Function

So, when u call it at form you must to add 2 parameter again :
ex :

....
Call CheckWinner(Text1, Text2, Text3, sohel, jewel)
....

do it to all CheckWinner calling function.

Jx_Man 987 Nearly a Senior Poster Featured Poster

dim selectedItem as string
selectedItem = ComboBox.Text

why didn't use selectedItem = ComboBox.SelectedItem ?
and there are path on combobox item to loaded?

Jx_Man 987 Nearly a Senior Poster Featured Poster

why it didn't work?what error come up?
and it not variable but function. and it working for me when i post an attachment.

Jx_Man 987 Nearly a Senior Poster Featured Poster
Jx_Man 987 Nearly a Senior Poster Featured Poster

Try This :
Declaration :

Option explicit

' Contrl variable
Private ctlName As Control

Code :

' This program demonstrates how you can add and delete
' controls on your form dynamically.


' Creates text box and label.
Private Sub cmdCreate_Click()
   ' Creates label.  controls.Add function takes three variables.
   ' first ("vb.label") accepts what type of control you want created,
   ' second ("lblLabel1") accepts the name of the control, the last
   ' one (frmControl) accepts where you want this control to be placed.
   Set ctlName = frmControl.Controls.Add("vb.label", "lblLabel1", frmControl)
   ' Make controls visible.  This step is required if you want the control
   ' to be visible.
   ctlName.Visible = True
   ' Move positions the control requires four arguments
   ' (left, top, width, height)
   ctlName.Move 500, 500, 1500, 250
   ctlName.Caption = "Label 1"
   Set ctlName = _
  frmControl.Controls.Add("vb.textbox", "txtTextBox", frmControl)
   ctlName.Visible = True
   ctlName.Move 2000, 500, 1500, 250

End Sub
' Quits the program.
Private Sub cmdExit_Click()
   End
End Sub

' Removes the controls created in the cmdCreate_Click()
' procedure.
Private Sub cmdRemove_Click()
   frmControl.Controls.Remove "txtTextBox"
   frmControl.Controls.Remove "lblLabel1"
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

>> Call CheckWinner(Text1, Text2, Text3)
here text1 mean t1 what was write in the module?
Yes. text1 will assigned with T1, then T1 used to check back color of textbox.

>> Public Sub SetBackColor()
For Each controlx In Form1.Controls
If TypeOf controlx Is TextBox Then
controlx.BackColor = vbWhite
Next controlx
End Sub.
please explain under few lines. what is controlx?

Controlx is a Control (Form1.controls). It can be any controls (textbox, button,label, etc).
But in this function i check controlx as textbox.
See this line : If TypeOf controlx Is TextBox so i check on the form1, if i find text box control in form1 then back color of textbox become white. So you didn't have to spending times for writing code to change all textbox back color one by one, but you can do it with check control type. If control type is textbox then u can change any properties of text box (backcolor in this case).

You can change controlx type (ex. button) :

For Each controlx In Form1.Controls
If TypeOf controlx Is CommandButton Then
controlx.BackColor = vbWhite
Next controlx
End Sub

this code means for every controlx, if controlx is button then back color of button become white.

Sawamura commented: You work to hard for this :) +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

I already see your project.
You write too many if statement (make me dizzy) and it redundant.
Actually you can simplify your if statement become a function. so you just call function in each textbox checking.
I modified your program with added a module. In this module i put a function to check who is won and function to make all backcolor of textbox is white.

Module using to declare function/procedure or variable. with module you can call each function or variable from any form.

NB : you can make this program more simplify again. just see redundant if statement and exchange it become a function/procedure.

Jade_me commented: you make this program so simply.... +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

SELECT * FROM participants WHERE Date between DTPicker1.Value and DTPicker2.Value

abu taher commented: thanks a lot. +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

You're Welcome...
Don't Forget to mark this thread as Solved :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Just add that code above and set FormBorderStyle = None on form properties to make form without title bar.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Actually i didn't agree with your if statement :
If you want to know check box is checked or not then use Checked function :
Try this :

Private Sub chkboxLadiesShoes_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkboxLadiesShoes.CheckedChanged
        Dim ladiesShoes As String = "Ladies Shoes"

        If chkboxLadiesShoes.Checked = True Then
            lstDisplay.Items.Add(ladiesShoes)
        ElseIf chkboxLadiesShoes.Checked = False Then
            lstDisplay.Items.Clear()
        End If
End Sub
bpacheco1227 commented: a great help +2
Jx_Man 987 Nearly a Senior Poster Featured Poster

Try This code :

Dim path as String
path = "D:\Test\Music.wav"
My.Computer.Audio.Play(path)
Estella commented: how about mp3 file? +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

Try this

Microsoft.VisualBasic.Right("Daniweb",3)
november_pooh commented: simple code but great +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

so this line is wrong "lstDisplay.Text"
change with lstDisplay.Items.Add(CurrentItem) ex: lstDisplay.Items.Add(ladiesShoes)

Jx_Man 987 Nearly a Senior Poster Featured Poster

>> actually i don't know any more about dtpicker. so please details.
its not about dtpicker but query with sql syntax.

>> both are for search data from backed access file. like (1st dtpicker) i select a date 16/08/08 and (2nd dtpicker) 16/09/08. i want to find data last a month or any few days.
you want to search data between 1st dtpicker and 2nd dtpicker. so use an operator i gave to you in sql query syntax.

Jx_Man 987 Nearly a Senior Poster Featured Poster

i didn't understand clearly what you want.
>> they will change with 2 color red and blue when i click each text box. when i click a button they will become white
You mean randomize 2 color if we click textbox (we don't know what color will came up, it can be red or blue). Right?

>> but i need, they will become white when all text box will fill with red and blue
you mean :
if all textbox.backcolor <> vbwhite then
change all textbox.color = vbwhite.
Right ?

If u have done to write code in form, i think its easy to write it into module.
just make it as procedure or function and you can call it as u needed.
So, Post your code.... :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Not clear...you want to add item into list when user checked it?

Jx_Man 987 Nearly a Senior Poster Featured Poster

Use timer to make delay and progress bar.
so, draw a timer and progress bar then add this following code :

Private Sub WelcomeScreen_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Timer1.Enabled = True
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        ProgressBar1.Value += 2

        If ProgressBar1.Value = 98 Then
            Dim obj As New Form2
            obj.ShowDialog() 'open form2
        End If
        If ProgressBar1.Value = 100 Then
            Timer1.Dispose()
            Me.Visible = False
        End If
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

You're Welcome....
Don't Forget to mark this thread as Solved :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Add on click event (you can find combo box filled with sstab event on the top of code window)
This following code will make u can't open other tabs without fill textbox 1 (text1).

Private Sub SSTab1_Click(PreviousTab As Integer)
If Text1.Text = "" Then ' add as u needed
    SSTab1.Tab = 0
End If
End Sub
ITKnight commented: :twister: +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

using between or operator ">" and "<".

dnk commented: Right... +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

You're Welcome..
If this thread was solved then mark it as Solved.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Then post your code, it more help.
and which line of error...

Jx_Man 987 Nearly a Senior Poster Featured Poster
sql = "INSERT INTO Department(Department_ID,Department_name)VALUES('" & deptid & "','" & Text2.Text & "' )"
dnk commented: always help +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

Post your code.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Sorry double post

Jx_Man 987 Nearly a Senior Poster Featured Poster

>> How would I go about setting a date/time to 0?
Setting computer date/time??or just on your program?

Jx_Man 987 Nearly a Senior Poster Featured Poster

For more information, just do googling more hard than me. :)

Jx_Man 987 Nearly a Senior Poster Featured Poster
Vega_Knight commented: wow, helped site :) +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

Well, this morning i copying new font and there are no error when i used in vb.

Naruse commented: what??? +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

>> the connections strings which i used in vs.net2003 isnot working here
Maybe a little mistake. Just post your connection string. Btw visit this site

Neji commented: thanks for the site... +1
Naruse commented: nice site ;D +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

First block all line of code then press the button on bar. See the pic

Jx_Man 987 Nearly a Senior Poster Featured Poster
Dim temp, quantity As Double      
Console.Write("How many liters (only whole liters please ) ? ")
temp = Console.ReadLine()
quantity = Double.Parse(temp)
Jx_Man 987 Nearly a Senior Poster Featured Poster

post your own code? so we can help.
ithelp was give the best answer...