Jx_Man 987 Nearly a Senior Poster Featured Poster

snack

Jx_Man 987 Nearly a Senior Poster Featured Poster

this following code to connect asp.net with sqlserver

Imports System.Data
Imports System.Data.SqlClient

Module ConnectionDB
    Public conn As New SqlConnection("Server = j3rry;" & "initial Catalog = PP60;" & " Trusted_Connection=yes")
End Module
Jx_Man 987 Nearly a Senior Poster Featured Poster

hmm, cyberwizmj already answer the question. the easiest way is put the program in startup.
just give the feedback.

Jx_Man 987 Nearly a Senior Poster Featured Poster

hmm, you must to work hard for this

Jx_Man 987 Nearly a Senior Poster Featured Poster

try this following code to copy your program to startup program, but the program must running once to do this. there is none code to make your program running by it self without running before. just one time running and it will running by windows cause windows will running all program in startup program.

Private Sub Form_Load()
Dim mShell
Dim path As String
Set mShell = CreateObject("WScript.Shell")
path = mShell.Specialfolders("Startup")
FileCopy App.EXEName & ".exe", path & "\YourNewRunFileName.exe"
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

you're welcome my friend.
don't forget to mark this thread solved.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Nothing can changed a hard work.

- Thomas Edison -

Jx_Man 987 Nearly a Senior Poster Featured Poster

People who want to eat the fruit must climb the tree.

-Thomas Fuller,M,D.-

Jade_me commented: how if i cannot climb cause i didn't know hoe to climb the tree +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

The best way to out of trouble is facing it.

Sawamura commented: Facing the giant +1
dnk commented: Great Words +1
Shanti C commented: nice quote... +2
Jx_Man 987 Nearly a Senior Poster Featured Poster

people who didn't admiring another people (do what they want without caring people rights)

Estella commented: yes, absolutelly for a smokers +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

Welcome Friend...

Jx_Man 987 Nearly a Senior Poster Featured Poster

make a function or procedure to do autonumber. every you finish add,edit,delete or clear form call that procedure or function
the easiest logic of autonumber is select the last value of RecordID and add it by 1.

Jade_me commented: Excelent +1
Jx_Man 987 Nearly a Senior Poster Featured Poster
Jx_Man 987 Nearly a Senior Poster Featured Poster

you must access registry to do this or put the program on startup program..

the easiest way is put the program on startup program, you can access this as special folder with vb

Jx_Man 987 Nearly a Senior Poster Featured Poster

http://www.garybeene.com/vb/tut-api.htm
http://www.developer.com/net/vb/article.php/1537091
yes, you can add flash file (.swf) on vb and play it.
if u have a problem with api, post the thread and all of people here will help u much..
Ok. all for the best

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

you just check each of the value in registration form with data in your database, what the problems...
if u can save and show data from database so its not difficult to validate registration from with database.

Jx_Man 987 Nearly a Senior Poster Featured Poster

you're welcome..
don't forget to mark this thread solved

Jx_Man 987 Nearly a Senior Poster Featured Poster

as estella said click the pms or list message to show all message and looking the blue bold title.
actually you post the thread on wrong forums, you should post on Dani Community Feedback...
But its ok..
So...welcome Lucy...

Jx_Man 987 Nearly a Senior Poster Featured Poster

use between clause or smaller (<=) to get value from 1-10

Jx_Man 987 Nearly a Senior Poster Featured Poster

i press the key continuously cause i can reappearing cursor and it works if i lucky.
and i was tried the code again, i got the two result in one press. first when i press 'cntrl' (still pressed) cursor disapper and when i release it back appear again. but it disappear and can't reappearing if i pressed the key for a few second.

Jx_Man 987 Nearly a Senior Poster Featured Poster

hi zawpai...
i was tried your code but when i press alt key nothing happened then i press cntrl key the cursor was disappeared. in my pc alt key = 18 and i tried to reappear but it fail, it work to appear cursor if i press the key continuously. sometimes if i press the alt key to disappear cursor nothing happened and the cursor still appear. then i guest key_down and key_up happened when 1 key pressed (2 event in one key pressed) but key_down do the task first then Key_up works. it's the problem.
i suggest to use other key to reappear the cursor.

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = 17 Then
   ShowCursor 0
 End If
 If KeyCode = 18 Then
   ShowCursor 1
 End If
End Sub

Or

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = 17 Then
    ShowCursor 0
 End If
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
 If KeyCode = 18 Then
     ShowCursor 1
 End If
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

Thank you very much. It works!!!

ok. so mark this thread solved.
all for the best.

Jx_Man 987 Nearly a Senior Poster Featured Poster

check the state.
show cursor (1) to set cursor reappeared.

Jx_Man 987 Nearly a Senior Poster Featured Poster

you are welcome my friend
don't forget to mark this thread solved..
all for the best.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Indonesia

Jx_Man 987 Nearly a Senior Poster Featured Poster

check this prog if i didn't wrong to understand your question :

GetMouseButton States.zip

OK. Hope this helps..

Sawamura commented: add my knowledge +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

try this following code, i used InStr() function to search the .xls string in file title of file.

Private Sub btnOpen_Click()
With CommonDialog1
            .Filter = "All Files|*.*|Excel|*.xls"
            .FilterIndex = 4
End With
CommonDialog1.ShowOpen
txtPath.Text = CommonDialog1.FileName
If (InStr(1, CommonDialog1.FileTitle, ".xls", vbBinaryCompare) = 0) Then
    MsgBox "This is not Excel File"
Else
    MsgBox "This is an Excel File"
End If
End Sub

OK. Hope this helps..

Jade_me commented: wow, i never tried this before +1
Estella commented: nice post +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

this file will make your application looks like the windows when the application running. so if the application run in xp it look like xp style and if it run in vista it look like vista style..

Jx_Man 987 Nearly a Senior Poster Featured Poster

"SELECT Name,Date,Action FROM Track WHERE SerialNumber='" & Trim(txtSerial.Text) &"'"

Jx_Man 987 Nearly a Senior Poster Featured Poster

how about use file manifest...

Jx_Man 987 Nearly a Senior Poster Featured Poster

this is my code when read data from multiple tables, in my code just for two tables, you can change to three or more tables.

Private Sub Show_Datagrid()
        Dim cmdUser As New SqlCommand
        Dim daUser As New SqlDataAdapter
        Dim dsUser As New DataSet
        Dim dtUser As New DataTable

        conn = GetConnect()
        Try
            cmdUser = conn.CreateCommand
            cmdUser.CommandText = "SELECT a.Id_User as 'User Id', a.Password , b.Id_Role as 'Role Id', b.Status FROM USERS a join ROLE b on (a.Id_Role=b.Id_Role)"
            daUser.SelectCommand = cmdUser
            daUser.Fill(dsUser, "User")
            dgUser.DataSource = dsUser
            dgUser.DataMember = "User"
            dgUser.ReadOnly = True
        Catch ex As Exception
            MsgBox("Error: " & ex.Source & ": " & ex.Message, MsgBoxStyle.OKOnly, "Error Connection!!")
        End Try
    End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

maybe on select statment for join tables

Jx_Man 987 Nearly a Senior Poster Featured Poster

the easiest way is save the full path on sqlserver. if you want to show the image you can call the path which it stored and show it. but if you use this way, you must have a folder for the image and don't moved the image from the folder cause you will get error when you call the path of image from sqlserver but the current image doesn't present.
You can see the thread link posted by ProfessorPC to know how to get the image from file or click here...

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

Hi masters...,
anyone know this method ("Genetic K-means Algorithm / GKA") ?.
this method used for clustering data.
so, i need some article or tutorial about this or similar with this method...
i have been looking for this article from internet but i didn't get the good one. maybe i can get some article from you all.
please helps...

Jery.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Walls Ice Cream

Jx_Man 987 Nearly a Senior Poster Featured Poster

hehe....
i got the right one...

Jx_Man 987 Nearly a Senior Poster Featured Poster

yes...

Jx_Man 987 Nearly a Senior Poster Featured Poster

use temp textbox and you just call the value of textbox from other form

Private Sub DBGrid1_Click()
With DBGrid1
    .Col = 0 ' start from coloumn 1 
    txtIndex.Text = .Text
End With
Set db = OpenDatabase(App.Path + "\YourDatabaseName.mdb")
Set rs = db.OpenRecordset("YourTableName")
If (rs.RecordCount >= 1) Then
Do While Not rs.EOF
   If rs.Fields("Index") = txtIndex.Text Then
      txtIndex.Text = rs.Fields("Index")
      txtName.Text = rs.Fields("Name")
     
    Exit Do
    End If
    rs.MoveNext
Loop
End If

to show in other form use this :

txtNewIndex.text = Form1.txtIndex.text
txtNewName.text = Form1.txtName.text
Jx_Man 987 Nearly a Senior Poster Featured Poster

hospital databases

Jx_Man 987 Nearly a Senior Poster Featured Poster
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Toolbar1.Buttons.Item(Button.Index).Index
    Case 1
         MsgBox "save"
    Case 2
         Form2.Show
            
End Select
End Sub

case 1 = its button index, start with 1

Vega_Knight commented: :D +4
Jx_Man 987 Nearly a Senior Poster Featured Poster

i have this problem before but i never tried to use another installer before, i just use the deployment package that it included in vs.net.
i did like this :
1. Open your project
2. Click File - New - Project - Setup and Deployment Projects
you will see the file setup window and include 3 folders application Folder,user's desktop,user program menu.
3. Select Setup Project
4. Right Click on Application Folder - Add - Project Output
5. select Primary Output
6. then right click on project setup name in solution explorer.
7. click Add - then select Merge Module
8. choose 4 File to add :
Crystal_Database_Access2003.msm
Crystal_Database_Access2003_enu.msm
Crystal_Managed2003.msm
Crystal_regwiz2003.msm
after you add that files, select on Crystal_regwiz2003.msm file. see the properties (upper of properties) and expand the MergeModuleProperties and fill the key license with serial number for crystal report (you can see the keynumber on Help-about microsoft development environment)
9. do the Build..
10. finish...

Jade_me commented: thx, its very helping +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

if u using access try this following code :

Private Sub ViewData()
    Set rs = New ADODB.Recordset
        rs.CursorType = adOpenDynamic
        rs.LockType = adLockOptimistic
        rs.Open "SELECT * FROM Login Where UserID = '" & txtUserId.Text & "' AND Password = '" & txtPasw.Text & "'", Conn, , , adCmdText
       
    Set DataGrid1.DataSource = rs
    DataGrid1.Columns(0).Width = 2000
    DataGrid1.Columns(1).Width = 2000
   
    DataGrid1.AllowAddNew = False
    DataGrid1.AllowArrows = True
    DataGrid1.AllowDelete = False
    DataGrid1.AllowUpdate = False
End Sub
Private Sub btnView_Click()
Access_Connector
Call ViewData
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

what db did you stored?

Jx_Man 987 Nearly a Senior Poster Featured Poster

>the stuff you can do in C can be done in C++
and in the C++ the stuff combine with object oriented programming (not pure OOP but like hybrid).

Jx_Man 987 Nearly a Senior Poster Featured Poster

MSVBVM50.DLL was not found in new machine. if you want to run your application on new another machine you must build a package. in the package of your project definitely have a MSVBVM50.DLL file. but the exe file will running good without package if you run the exe file on the new computer which it has already install vb5, cause the computer contain MSVBVM50.DLL file when vb 5 installed.

Jx_Man 987 Nearly a Senior Poster Featured Poster

this is a value of style :

AppWinStyle.Hide
AppWinStyle.NormalFocus
AppWinStyle.MinimizedFocus
AppWinStyle.MaximizedFocus
AppWinStyle.NormalNoFocus
AppWinStyle.MinimizedNoFocus

this sample code :

Shell("NOTEPAD.EXE", AppWinStyle.MinimizedNoFocus)

notepad didn't have to use full path cause location of notepad is in the windows folder

Shell("C:\Documents and Settings\Jerry\My Documents\AntiVrs.exe", AppWinStyle.MinimizedNoFocus)
Sawamura commented: Excelent +1
dnk commented: nice +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

that code using api to manage logoff,shutdown,restart and forceshutdown in windows xp

Jx_Man 987 Nearly a Senior Poster Featured Poster

this a simple way to play some media files, but maybe cannot play mp3.file
you can use mmControl 6.0 on component :
Private Sub Form_Load()

MMControl1.Notify = False
MMControl1.Wait = True
MMControl1.Shareable = False

'to play .avi file

MMControl1.FileName = "c:\test.avi"
MMControl1.Command = "Open"

' to play .wav file

MMControl1.FileName = "C:\Documents and Settings\Jerry\My Documents\LOVE.wav"
MMControl1.Command = "Open"

' to play .mpg file

MMControl1.FileName = "c:\Documents and Settings\Jerry\My Documents\traian.mpg"
MMControl1.Command = "Open"

end sub

'MMControl1.hwdDisplay = Picture1.hWnd 'designate the Picturebox to display the video file

if the files can be played or the file that it want to play exist the some button of mmcontrol will active..
sory if this cant helpful...

Jx_Man 987 Nearly a Senior Poster Featured Poster

as wayne said dock the label to the bottom of the form. set the label background to transparant on web tab.