4 Replies - 7586 Views - Last Post: 25 June 2012 - 08:39 PM Rate Topic: -----

#1 Vishal1419   User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 142
  • Joined: 19-May 12

problem changing fontsize of textbox control array

Posted 19 May 2012 - 01:05 PM

Hello Friends!
I have tried the following for changing backcolor and forecolor of each textbox in the form cant cant do the same for changing the font size
Here is my code
Private Sub txtDirectory_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtDirectory.GotFocus,_ txtName.GotFocus, txtAddress.GotFocus, txtCity.GotFocus, txtState.GotFocus, txtDistrict.GotFocus, txtPhoneNo.GotFocus,_ txtEMail.GotFocus, txtPassword.GotFocus, txtConfirmPassword.GotFocus
        
        Dim x As TextBox = CType(sender, TextBox)
        
        x.BackColor = Color.Black
        x.ForeColor = Color.White
        
    End Sub




For changing fontsize
        Dim x As TextBox = CType(sender, TextBox)

        x.font = new font("Microsoft Sans Serif",12)




I have tried to search on google but all in vain
Thanks in advance

Is This A Good Question/Topic? 0
  • +

Replies To: problem changing fontsize of textbox control array

#2 CharlieMay   User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1730
  • View blog
  • Posts: 5,709
  • Joined: 25-September 09

Re: problem changing fontsize of textbox control array

Posted 19 May 2012 - 02:21 PM

That should work for what you're describing. Are you sure the textbox in question is included as one of the handles in your sub?
Was This Post Helpful? 0
  • +
  • -

#3 Vishal1419   User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 142
  • Joined: 19-May 12

Re: problem changing fontsize of textbox control array

Posted 20 May 2012 - 06:51 AM

I get an error message saying Error creating window handle. Win32Exeption was unhandled
Was This Post Helpful? 0
  • +
  • -

#4 Vishal1419   User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 142
  • Joined: 19-May 12

Re: problem changing fontsize of textbox control array

Posted 22 May 2012 - 11:44 AM

Please Someone Help me
Its Urgent
Was This Post Helpful? 0
  • +
  • -

#5 Vishal1419   User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 142
  • Joined: 19-May 12

Re: problem changing fontsize of textbox control array

Posted 25 June 2012 - 08:39 PM

Is anyone there
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1