Search results for query: *

  • Users: qadeer37
  • Content: Threads
  • Order by date
  1. 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...
  2. 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...
  3. 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...
  4. 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?
  5. 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...
  6. 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...
  7. 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?
  8. Q

    Which control to use for time?

    When user enter the time starts and stops when user logs out.
  9. 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.
  10. 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
  11. Q

    How to make InputBox text UseSystemPassword?

    Dim Password As String = InputBox("Confirm Password") If txtGetPW.Text = Password Then objCustomerADO.AddCustomer(CType(txtGetCID.Text, Integer), txtGetFN.Text, txtGetLN.Text, txtGetEM.Text, CType(txtGetBL.Text, Decimal), txtGetPW.Text) Else...
  12. Q

    Changing state of label depending upon two checkboxs?

    I have added two checkbox controls chkBox1 and chkBox2. What I want to do is that when both the chkbox are same meaning checked or unchecked the label should be On and if both are not same label should be Off. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As...
  13. Q

    Can't make connection to MS SQL database.

    System.Data.SqlClient.SqlException was unhandled
  14. Q

    How to make password entered in textbox safe?

    I have two textbox Controls txtbox1 with useSystemPasswordChar property on txtbox2 Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click txtBox2.Text = txtBox1.Text End Sub after this subroutine the text entered in...
  15. Q

    How to save image to hard drive?

    Option Strict Off Public Class Form1 Private Sub CapTureScreenShot(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick SendKeys.Send("{%}({PRTSC})") Me.Show() 'code for saving this file to hard drive. PictureBox1.Image =...
  16. Q

    Method for getting ASCII of a char?

    and what would be the method for If 'char pressed = "a" then do something end if :)
  17. Q

    Option strict disallows late binding?

    Public Class Form1 Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click, btn2.Click, btn3.Click txtResult.Text = txtResult.Text + CType(sender.text, String) End Sub End Class Error due to sender. I don't want to turn off option...
  18. Q

    Make property or directly execute query?

    Public Class Customer Private m_CID As Integer Private m_FirstName As String Private m_LastName As String Private m_EmailAddress As String Private m_Balance As Decimal Private m_Password As String 'want to add Order ID to create relation with orders. Private m_OID As...
  19. Q

    multidimensional array and object array.

    Whats the difference between multidimensional array and creating object and adding it to a 1 dimensional array or creating a structure and adding them to an array. please tell the pros and cons of doing this.
  20. Q

    Array indexing?

    Dim TwoDArray(1, 3) As Integer For i As Integer = 0 To ThreeDArray.Length - 1 TwoDArray(i, i) = i + 1 ListBox1.Items.Add(ThreeDArray(i, i)) Next This adds 1 and 2 to list. My question is why does the first element in the 2d array...
Back
Top