xsharp.eu • Winforms doubleclick on buttons does not open method
Page 1 of 1

Winforms doubleclick on buttons does not open method

Posted: Wed May 31, 2023 9:24 pm
by ic2
With X# 2.16: I open the designer showing a Winforms form. The methods behind the buttons are in a program with the same name as the [Design].

1 In one program, when I double click on whatever button with an existing method, the code program is selected and the cursor is always at the top of the program. If the cursor was already anywhere else in that program, it remains there.

2 When I add a new button (say 'test') and double click, it creates the method and also selects this method when double clicked later:

Code: Select all

Private Method test_Click(sender As System.Object, e As System.EventArgs) As Void Strict
			Return
		End Method
(Also note that the bad formatting of the inserted method with way to many tabs is still unchanged)

3 In other programs it may work. That means that sometimes, the correct method is selected (the cursor goes to the first line after the method name), but not always; it then behaves as written in 1.

4 There is no difference between these programs in terms of naming convention or design, or between the way the buttons & methods behind it are defined in the programs where some double clicks work and some aren't.

I would say it works or doesn't work a bit at random. Would be great if this can be solved.

Dick

Winforms doubleclick on buttons does not open method

Posted: Thu Jun 01, 2023 12:46 pm
by ic2
Some additional info:

Today I got a message which was new for me:

{"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."}

after sending a mail from our program (via Chilkat). I thought this was a X# 2.16 issue and reinstalled 2.14.

Conclusion:

1 The above error occurs when we send a picture only, but both in 2.14 & 2.16. Probably Chilkat gets some faulty content then.
2 The incorrect opening of methods on double clicking on a button occurs on 2.14 as well.

I have seen this issue before and thought that it only went wrong when the method was not present in the .prg with the same name as the Design prg.
Apparently not, or it worked earlier, could go wrong in 2.14 (and remained unnoticed) and it (still) can go wrong in 2.16.

If there's anything I can do to help you fix it, just let me know.

Dick

Winforms doubleclick on buttons does not open method

Posted: Thu Jun 01, 2023 1:06 pm
by robert
Dick,
ic2 post=26536 userid=455 wrote:Some additional info:

If there's anything I can do to help you fix it, just let me know.

Dick
An example would be great

Robert