I tried changing the HostForm to Form1. It still didn't work. The problem arises when I tried to make a new instance of Form1. However I tried something that works but I don't think it is very productive. I made a global varible in the ButtonArray Class and a Property Method to access the varible.
Dim xKey As String
Public Property AddKeys()
Get
Return xKey
End...
User Profile
Collapse
-
-
How do I call a method from the base class
REF: http://msdn.microsoft. com/en-us/library/aa289500(v=vs.7 1).aspx (I added a RichTextBox to Form1)
The above reference is where I got the code below.
This code adds buttons to Form1. When a button is clicked a messagebox appears stating what button was clicked. I want to have the ClickHandler fill a RichTextBox on Form1 (I added a RTB to Form1). My problem is I can't do a Dim xForm As New Form1 to fill the RTB from the ButtonArray... -
Thank you David. I was thinking I needed to create a seperate class. I forgot about (Dim myButton As New Button) You answered all my Questons, Thanks again.Leave a comment:
-
How do I make a class for a button? I need multiple buttons based on items retrieved.
I am working on a program where I need to read files. I won't know how many buttons I need until run time. I can't figure out how to create a button class I can call at run time. Each button will represent a file. I want each button when clicked to open the correct file and place the data into a rich text box on the form.
Also, I need buttons to appear tightly in a row or multiple rows. -
Thank you
Thanks GaryTexmo,
the Validated worked just fine. I'm learning there are a bunch of differences between how things function in vb.net and C#....Leave a comment:
-
SelectedIndexChanged event
Above is my SelectedIndexCh anged event.Code:private void cboBowler_SelectedIndexChanged(object sender, System.EventArgs e) { string temp = cboBowler.Text; //calling methods creates a subdirectory di.CreateBwlerFolder(temp); }
I can't get it to do anything. I've placed a MessageBox.Show within my code with no results.
My comboBox in...Last edited by tlhintoq; Jul 21 '09, 12:56 AM. Reason: [CODE] ... your code here ... [/CODE] tags added -
Loading a comboBox from a text file in C#
I have a comboBox in which a store individual's names. Upon loading the program, I want the comboBox loaded from a text file. Note: the first line of the txt file is: <Enter New Name>.
I want to know first: How do I load the text file into the comboBox? Second, how do I maintain the first line if user enters a new name?
VB.net was so easy, C# I can't get it to work.
No activity results to display
Show More
Leave a comment: