First of all: The unit tests in this case are functional tests using Selenium Webdriver. The reason for this is that I like the VS unit test framework, and find it easy to organize the solution with separate projects for the actual automation and the tests.
This is a framework which is...
It's located in the main thread of the class Program.cs, which is created automatically by Visual Studio. I'm not sure if changing any of that is a good idea?
static void Main() {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false)...
Hm. If I remove the try-catch in the example code, I get a new exception in the Program.cs file: System.Reflection.TargetInvocationException.
This is the code where that happens:
static void Main() {
Application.EnableVisualStyles()...
In my small, simple Forms application I'm experiencing a lot of Exeptions which I'm trying to handle. Some are apparently related to .NET and hence out of my control. But some are related to my code. Here's an example:
for (int i = 0; i < userPanel.RowCount * userPanel.RowCount - 1; i++) {...
Windows 10 64-bit, VS 2015 Enterprise.
I've got a simple Windows Forms application which lets you insert an URL and user credentials in some TextBoxes. Then you can click a button which opens Selenium ChromeDriver
and accesses the URL with the entered credentials. Then there's a button to kill...
Thanks. Good advice and clarification :tennis:
Anchor seems to work as well. And I agree with what you're saying about one control containing the cells.
I've got a TableLayoutPanel in which I create rows of the following "on the fly":
Label TextBox TextBox
Label TextBox TextBox
Label TextBox TextBox
I create the controls like this:
for (int i = 0; i < Properties.Settings.Default.rowcount; i++) {
userPanel.Controls.Add(new Label() { Text...
I did. I created a new solution and replicated the original solution manually. In this solution, the error occurs in both the Release and Debug configurations.
So, this is the new state:
Original Solution:
- Debug configuration: Suddenly started throwing NullReferenceException exceptions...
In my long series of strange problems, I've encountered a new one today:
Normally, when I create a Windows Forms application and build the solution, I can go to the Solution -> Project -> bin -> Release/Debug folder and run the executable file directly from Explorer.
However, I'm suddenly...
Visual Studio Enterprise 2015.
Simple Windows Forms C# application, which a few TextBoxes. The information in the text boxes are stored in an application.settings file, so that the entries are saved and reloaded on quit/startup.
Up until now, I've been building and running the app in VS in the...
Thanks. The looping is not a problem - I'm not THAT much of a noob :D
I'm not able to get .Item[] to work: "TableLayoutControlCollection does not contain a definition for 'Item'..."
However, after much messing and looking around, I found this:
userPanel.GetControlFromPosition(1, 0).Text
Hm. I can't see how? There's .Control.IndexOf(), but that requires a named reference to the control, as far as I can see? I don't see a way to get the contents of a for instance "control number 1" in the table?
I'm creating 3 rows with 3 controls on each row. What I want is a way to say "Give...
I've got a TableLayoutPanel (called userPanel) where I create 3 rows containing one label and two text boxes. At the application startup, I create them like this:
public MainForm() {
InitializeComponent();
for (int i = 0; i < userPanel.RowCount; i++) {
userPanel.Controls.Add(new...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.