Search results for query: *

  1. Q

    Help importing Excel spreadsheet data

    Take a datagridview and set its datasource to the table at 0 index of the returned dataset. this code is for excell 2003 won't work with 2007 Public Function ReadExcel(filePath As [String], sheetName As [String]) As DataSet Try sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data...
  2. Q

    Help importing Excel spreadsheet data

    Exactly because its quite simple to import excel sheet into ms sql server.If you want code for that I can provide you.
  3. Q

    How to write comments?

    just starting to get into the habit of writing comments. What do think about my comment writing? any suggestions! Private Sub btnAddUser_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddUser.Click Dim objUser As User 'Gets user index from...
  4. Q

    2 different methods using same object methods?

    Thanks it was helpful. but why don't we call constructor(new) for the process class.
  5. Q

    2 different methods using same object methods?

    :rolleyes: Sorry I wasn't sure what to write in question. Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim someproc As Process someproc = Process.Start("d:\vypress.msi") End Sub Private...
  6. Q

    Throwing exception?

    Thanks it was a mistake but still after changing it if I enter age above 100 it doesn't shows messagebox but there is no exception shown as well to inform the user that obj.age has not been changed.
  7. Q

    Throwing exception?

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim obj As New Minimal Dim userAge As Integer userAge = CType(InputBox("Please enter your age"), Integer) MessageBox.Show(obj.Age.ToString) End Sub Public...
  8. Q

    Could instance also be called as state of a class?

    So this means it is a referential equality because both reference to the same object. right?
  9. Q

    Could instance also be called as state of a class?

    when we create an instance of a class we also provide its state so are these both same and if not same what's the difference? And also what's the difference when we use equals method for instance or for state?
  10. Q

    Verifying User Name and Password?

    Thanks it made it quite simple.
  11. Q

    Verifying User Name and Password?

    I have listBox control of user objects where each object has userName and Password. What I want to do is when a user enters userName and Password a method goes through the listBox checks for whether userName exists or not and if userName exists then matches the password. What I have in my...
  12. Q

    alt+ctrl+delete.. how can I suppress?

    Thanks eljefe but I think I have to disable task manager using administrative rights.
  13. Q

    How to add time to timespan?

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ts As TimeSpan ts = New TimeSpan(9, 0, 0) MessageBox.Show(ts.Hours.ToString) End Sub Suppose I want to add 2 hours to this timespan what would be the...
  14. Q

    alt+ctrl+delete.. how can I suppress?

    thanks it's working but what to do about if user presses alt+ctrl+delete.. how can I suppress these buttons?
  15. Q

    Which control to use for time?

    When user enter the time starts and stops when user logs out.
  16. Q

    How to make form cover whole screen?

    I want to make a software for game zone when running user should only see the form and also how to remove closebox.
  17. Q

    Converting value of integer to system.Drawing.Color?

    I want have random colors. Dim randomClass As New Random RandomNumber = randomClass.Next(1, 10) lblMsg.BackColor = RandomNumber
  18. Q

    Changing state of label depending upon two checkboxs?

    Well this was proposed by Solitaire in post # 5.
  19. Q

    Changing state of label depending upon two checkboxs?

    I think this code is working fine. If (CheckBox1.Checked = CheckBox2.Checked) Then Label1.Text = "On" Else Label1.Text = "Off" End If correct me if I am wrong.
Back
Top