-
Notifications
You must be signed in to change notification settings - Fork 4.9k
"Bug" net core(visual basic netcore) regarding drag and drop #8148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@WWWEdobrimCOM can you please provide more details (reproduction steps, minimal repro app / code) for point 1? I really struggle to understand point 2. It's seems unrelated to point 1. though, therefore it should be triaged and discussed separately. Can you please open a separate issue, and make sure to provide more details about what are you trying to achieve? I don't know what do you mean by "build file", "builder", "arrays" etc. In the new issue, please explain step by step what are you trying to achieve in technical means and what is not working. A simple repro application would be very helpful there too. |
Thank you for your answer. Okay I will explain point 2 in another place. For point 1 I explain better. I have created a simple application to protect a file with a password. Thank you |
/CC @RussKie: are there any Framework vs .NET Core functional differences that may explain the behavior in #8148 (comment)? |
@JeremyKuhne might have a thought here. @WWWEdobrimCOM has this ever worked in .NET Core (.NET 5+)? It's not functionality that I'm immediately familiar with (Issue #1) |
We would in any case need a small repro VB App, so we can debug the behavior. Thanks! |
Thank you. |
Sorry for the late reply but I was working. But if I use the EXACT SAME code in my application it doesn't work. Lol. O_o I'll show you the screens and the working program. As you can see they are the SAME. One program works and the other doesn't, weird. The program that doesn't work can be found at https://edobrim.com/Download.html Click on Menu, protect with jpg, you will see that drag and drop doesn't work (with the same code as the working program) Strange Maybe it's my software that it's a shi* |
Few questions:
|
Option explicit is ON No, if I set at break point nothing happens, nothing changes By events for the textbox, do you also mean type "TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged"? If you mean that too yes, they get hit |
But in the stand-alone-demo, the event gets hit, I assume. So, the bug is even before that: The question is: Why does the event not get hit to begin with? Can you post the |
You mean this? I don't know if what I'm pasting you is right My app(Not working): Partial Class Form---
Private components As System.ComponentModel.IContainer <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Friend WithEvents TextBox1 As TextBox End Class New app(working): Partial Class Form1
End Class |
You mean this? I don't know if what I'm pasting you is right My app(Not working): Partial Class Form--- <System.Diagnostics.DebuggerNonUserCode()> _ Private components As System.ComponentModel.IContainer <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Friend WithEvents TextBox1 As TextBox End ClassNew app(working): Partial Class Form1 'Form overrides dispose to clean up the component list. 'Required by the Windows Form Designer 'NOTE: The following procedure is required by the Windows Form Designer End Sub Friend WithEvents TextBox1 As TextBox End Class |
This issue is stale because there has been no response to a request for more information for 7 days. |
It's difficult to give any additional advice. We would need a working repro project, which isolates the issue, so we can act on it. |
This issue is stale because there has been no response to a request for more information for 7 days. |
This issue is stale because there has been no response to a request for more information for 7 days. |
This issue was closed because there was no response to a request for more information for 10 days. |
I have seen the same bug/feature?? with Winforms. If you have a simple Windows form with a textbox that has AllowDrop=true and the required DragEnter/DragDrop event handlers it is possible to drag/drop to the text box from Windows Explorer, but drag/drop does NOT work from OpenFileDialog. |
@Olina-Zhang can you repro what @Codezile describes? If so I'll reopen this issue and adjust the title somewhat. Seems like something we'd want to fix 😄 |
@merriemcgaw According to @Codezile description, the issue can be reproduced.
|
At step 5 you also need to add the event handlers for DragEnter and
DragDrop to the main form. They can be the same handlers as already exist
for the TextBox.
…On Thu, Apr 6, 2023 at 7:32 PM v-huli7 ***@***.***> wrote:
@merriemcgaw <https://github.com/merriemcgaw> According to @Codezile
<https://github.com/Codezile> description, the issue can be reproduced.
Repro steps:
1. Extract "testApp.zip
<https://github.com/dotnet/core/files/11168582/testApp.zip>" open it
in VS.
2. Build and run the application.
3. Drag and drop a test file into TextBox. -- *It works well.*
4. Drag and drop the test file from OpenFileDialog. --*It doesn't work
and there is a ban icon.*
5. Stop debugging and go back to TestApp's Form designer, set the
Form's AllowDrop property to true.
6. Build and run the application.
7. Drag and drop the test file from OpenFileDialog. --*It works.*
[image: 8148_repro]
<https://user-images.githubusercontent.com/56664234/230336149-52d8c3df-f2c9-4360-9bf9-dc12f48199ee.gif>
—
Reply to this email directly, view it on GitHub
<#8148 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/A65TAJOSFDJNLMYSLNJDD5DW72EUXANCNFSM6AAAAAAUKKLADU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@Codezile Thanks for your reply, step 5 in the gif doesn't show the step to add DragEnter/DragDrop events to the Form, but what you say was added to the application in advance, you can see it after step 7. |
Hi all, I've been coding in visual basic .net for years and I managed to convert an entire software to net core. Of course it was easy, just one button and build your application in netcore 6.0 or 7.0 etc.
In my application everything works but I can't figure out why Drag and drop doesn't work. In visual studio, which I've been using for years, I've always created visual basic .net applications but I wanted to take advantage of the netcore (with the dll) to have something more "modern" and for a better performance. The strange thing, I repeat, everything works but drag and drop doesn't work, the dragging the file onto a text box. Instead of pressing the button, to bring up the "show dialog", I dragged the file, with its path, appeared in the text box. Of course I don't understand if it's a bug or simply the visual basic language has been thrown in the toilet and therefore some things in visual basic net core don't work.
I repeat, I did NOT create a new application, I just took my application in visual basic net and converted it to netcore 5. Then from 5, with time and with updates, I brought it to 7.0 netcore. So actually I think it's because everyone is focused with c# or aspnet while visual basic seems uncared for and forgotten.
It seems to me like there was no cure.
Another thing that doesn't work besides drag and drop, I was trying to create a remote administration tool (not a rat, something legal, like team viewer but with the build file for the connection, where the question comes out: "Do you want to receive remote connection? etc.). We don't know for what strange ancestral reason, in Visual basic net I was able to create the builder, thanks to the arrays, I created the exe file (for the connection), the customer clicked, the question came out (I had made some changes): "A computer is trying to connect to yours. Do you allow the remote computer to control your pc? Attention and blah blah blah", ok, this is.
I did this to create something that is not a rat but is legal, in fact there is a window that is always open (the controlled computer can always close the connection by closing the window).
This in visual basic .net worked, now in VISUAL BASIC netcore it does NOT work(fails to create exe file for connection).
The exact same application, SAME.
I'm thinking that visual basic is really lame as a language, nothing works.
Configuration
Netcore 7.0
Windows 10
x64
Visual studio latest version
Regression?
Visual basic .net 4.8 >>> Visual basic netcore 5.0 >>> Visual Basic netcore 6.0 >>> Visual basic netcore 7.0 (latest) Windows forms
Other information
No error, no message. drag and drop works in Visual basic .net but doesn't work in Visual basic netcore
No error, no message. creation of a exe file with a builder(made with array ecc) in Visual basic .net works but doesn't work in Visual basic netcore.
The text was updated successfully, but these errors were encountered: