Search results

  1. mevets

    DirectCast name of control

    I am trying to set the backcolor to a control. The user provides the name of the control in a TextBox. How is this done? Unsuccessful with: Dim nameofctrl As Object = Textbox1.text DirectCast(nameofctrl, Control).BackColor = Color.Green
  2. mevets

    Ctype function

    I have a large case select that I want to simplify. Inside the select I'm creating controls base of which ToolStripButton is checked. Select Case strCtrl Case "Text" If btnCTRLSText.CheckState = CheckState.Checked Then newCtrl.Name =...
  3. mevets

    Var on diff Form

    How do I write to a var on Form1 from Form2?
  4. mevets

    Wrong color

    When I Dim c as Color = btn.color btn.color = btn.color = c The color seems to be wrong. Is there a solution?
  5. mevets


    I am trying to figure out how to decifer the .name, .tag, etc of a control that sent the user to a subroutine. I know its something to the extent of Ctype(, string) That ofcourse does not work, but an example I had and lost I think described the solution that way. Any suggestions?
  6. mevets

    Dim statement question

    I have a a series of buttons that are handled by one subroutine. Once one of the buttons is pressed I want to create a new control on the form of whatever button was pressed. I've managed to put the type of control into a string: strCtrlType = sender.ToString() From here I want to know if and...
  7. mevets

    RichTextbox colors w/o using a Selection

    I've written this: rtxtCmdSpy.SelectionStart = rtxtCmdSpy.Find("v") Dim bfont As New Font(rtxtCmdSpy.Font, FontStyle.Bold) rtxtCmdSpy.SelectionFont = bfont rtxtCmdSpy.SelectionColor = Color.Green rtxtCmdSpy.HideSelection = True The problem is that the...
  8. mevets

    .Substring out of range

    I don't understand how this example is out of range: Dim strText As String = "Gui, Add, Text, vhi ghi, Hello" Dim intTextLen As Integer = strText.Length Dim posDlmtr As integer Dim i As Integer = 1 Dim canLoop As Boolean = True Do While canLoop =...
Top Bottom