Below is the code that is actually closing the whole application when clicked on Yes.
But,I want to close the current form and open the new form when the user clicks on X with red mark i.e. close on the form.The code I wrote is :
<prelang="vb">Private Sub form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim response As MsgBoxResult
response = MsgBox("Do you want to close?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "confirm")
If response = MsgBoxResult.Yes Then
If response = MsgBoxResult.No Then
e.Cancel = True
I have made a procedure named abc in database which is returning only one row from login table..So i am just checking that on click of that button my procedure should run but while debugging when i come to cmd.ExecuteQuery() it throws following error..
ERROR  [MySQL][ODBC 5.1 Driver][mysqld-5.0.77-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'abc()' at line 1.
If all the PC's are the same type, why not use Norton (Symantec) Ghost?
All you need to do is install software on one PC, then create a Ghost Image of that computer. Then use that image to re-image all the other computers in the class room.
It doesn't matter what the students do to their PC whilst in a class session, once it is finished run the multicast to re-image all the PC's and they are back to where you began before your students started "playing around" with the individual configurations.
Where I teach:
1. Rarely happens although viruses are rampant.
2. Installing IDE's and other tools are part of the learning
3. Students are expected to backup to USB. They do have a docs folder on the network but this causes issues with most development IDE's
Having said that all the standard tools are installed by Admin as per department requirements. All machines are re-imaged every semester.
I developed a windows form application using c#.and i created a .exe(setup) file.it is running in my system.i want to install on another system which does not contain sql server.i want to install sql server along with the .exe file.how to include sql server during setup creation.how to add my data base to the set up...please help.......
You're probably not going to get an answer to this for a few reason:
1) You haven't specified anything about what you're backing up.
2) You haven't specified anything about what you're backing up to.
3) You're using VB6. There is absolutely no valid reason at all to start new development work in VB6. It's dead and has been for years. VB.NET Express Edition is free and easily obtainable from here[^].
I would suggest using any type of loop (Do While, For Next etc), what ever you like to get the data from the DataGridView column.
Just get the number of rows you wish to copy then loop through the rows, either storing the data returned into the ListBox or populating an Array, which can then be used to fill the ListBox. Note in the example below data is returned from the first column.
Dim pInt As Integer
Dim pIntItems As Integer
Dim pStrValue as String (or what ever the value type of the column is)
pIntItems = DataGridView.RowCount
For pInt = 0 To pIntItems - 1
pStrValue = DataGridView.Rows(pInt).Cells(0).Value
"Now either store this value to an array or make a function call to start populating the ListBox with the value."
1.Get all the data from gridview into some (public static)variables.
2.In the form where u want those values just write the form name of gridview values followed by the value property of list box.
Last Visit: 31-Dec-99 19:00 Last Update: 27-Jan-22 23:17