I've written a program that displays a form inside a panel/window.
When I automatically set the VerticalScroll.Value, the contents moves, but the scrollbar resets to the top. This screws things up the next time it's set.
Is there a way to fix this? (PS: Just updated to VS v17.7.0 so I don't...
See original question, Lines 10-13 of the sample code.
Using ".Add" (and ".AddRange") both resulted in syntax errors (underlined in red.)
I've since changed my code trying to assign a sorted array of images to ImageList2:
For intCnt = 1 To intTotalNumberOfFiles ' Load image...
Your code may work for you as a stand-alone program, but it does not integrate into what I have (using dotnet 4.8.1). I do not know what "conflicts" could be the source of the errors I encounter with your code.
The issue stems from having to rewrite my own code to use your method, and that's no...
My apologies, but I have since made significant changes to the code, so that particular error is gone so I can't reproduce it.
At the time, that particular bit of code was not underlined in red (or else the program never would have run & given me a runtime error.)
After making changes, I'm...
(Sorry for the late reply. Death in the family.)
I always have difficulty implementing "<DllImport(..." statements. They're always redlined when I include the code (added to a module in this case).
I can't add/test the remaining code till I straighten that out.
TIA.
Thx. I'll give this a try this afternoon (busy day.)
The error (as noted in my question) was a simple "assignment error". No more detail given in the runtime error message.
I'm trying to sort images before assigning them to an ImageList object.
Using a "For... Each" loop, I can assign images one at a time as they are read directly from the computer.
The problem is, this method reads the files alphabetically, so it reads "image09.png", "image10.png"...
My apologies. My question was eventually answered on another site and I forgot to close my post over here.
The animation looks nice & more professional, but more than that, if you don't use multiple threads, even just displaying the filenames doesn't work as the form does not update when it is...
I'm not sure what your question is but the problem has been resolved.
I had to create a custom copy dialog b/c the built-in Copy function that includes the animated Windows progress indicator stops & prompts to "overwrite" every duplicate file b/c there is no "overwrite" switch using this...
Thx for the reply. Here is my Copy code:
For Each myFile In Directory.GetFiles(strPath & "Save", "Data*.*")
Try
My.Computer.FileSystem.CopyFile(myFile, strBackupPath & My.Computer.FileSystem.GetName(myFile), True) ' Must trim path from source file otherwise...
I needed to create a Copy Dialog from scratch. It will (I hope) show the file/folder being copied with a Copy Animation (similar to the default UIDialog.)
I created a form and put a PictureBox & Timer on it. I set the Timer default to Enabled and Interval to 150. Code was added (below) to the...
I have a program that checks for a Backup folder when it starts, and if not found, prompts for you to create one.
The copy process can take a long time, so I use the standard Windows copy dialog to show your progress:
My.Computer.FileSystem.CopyDirectory(strSrcPath...
Awesome. I found a working example in the online .Net docs here:
https://docs.microsoft.com/en-us/dotnet/desktop/winforms/advanced/how-to-create-mdi-child-forms?view=netframeworkdesktop-4.8
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.