I need to select 2 file for open them; I want to do that by only one window, so I tryed to build a custom dialog, but I lost drag&drop, rename etc explorer built-in function. Is there a way like show 2 openfiledialog in one window?
Set the MultiSelect property of the OpenFileDialog object to True.
Base on a my search I end up that the solution suggested my jmcilhinney is the best compromise between time/effort.
Related
When adding a FolderBrowserDialog class in VBNET, this is the type of browse window you get:
How can I get THIS type of browse window (so it's easier to just paste in a path instead of having to twirl lots of arrows)?
You have to use OpenFileDialog instead of folderbrowerDialog. Read more about it
https://msdn.microsoft.com/en-us/library/system.windows.forms.openfiledialog(v=vs.110).aspx
Read this Topic for opening directories using openFileDialog
What is the code for this problem?
This is a very vague question, what sort of text box, a windows control, HTML or something else?
Assuming that you're using a windows form, then basically you want to save the color property to some kind of storage when the program closes, and use the same when it loads.
You can use the registry, an INI file or the applications app.config file to do this.
I would use a setting. You can define a new setting with at type of System.Drawing.Color. On form load you can set the controls ForeColor (or BackColor) to the setting. On form unload you can save the properties current value. Here's a reference: https://msdn.microsoft.com/query/dev11.query?appId=Dev11IDEF1&l=EN-US&k=k(ApplicationSettingsOverview);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.5)&rd=true
I have a WinForm in a vb.net application. It has between 4 and 7 multiline textboxes. I want to be able to copy and paste information into or out of those textboxes but it appears to be impossible. There is no right-click cut copy or paste available and the keyboard shortcuts do not work either.
The properties of all textboxes are enabled, visible and have shortcuts enabled
Can anyone help please?
Create first a ContextMenuStrip.
Add new menuitem: 'Paste', set the menuItem's ShortcutKeys property to CTRL+V.
Set the (Rich)Textbox -> ContextMenuStrip property to created menu control.
Handle the 'Paste' menuitem click event.
Try the result.
Its seems to be a strange problem.Make sure that you are using the real textbox control and not some custom user control.
It is also possible that the changes you make in designer and code are not written into the exe.When you debug your project, you might be seeing an old version of your program in which the properties might be set to false. In that case you have to simply delete the exe in the bin\debug folder and rebuild your project.
How do I make it so that a VB.net form that is opened from another form (say a settings form) is the only one that can be selected?
I'm using Visual Studio 2012, and I can't see any obvious tools for this, but I'm not sure what I'm looking for. I have tried various possibilities like TopMost = True, but that is not quite it. Thanks.
Just use ShowDialog instead of Show to open the new form.
This will open the form as a modal dialog, and while it is open, no other form can be selected by the user.
Using VB.Net, how can I save values from a textbox and checkbox when the application is closed? When the user opens the application again, the textbox and checkbox should be filled in with the same values as before.
Do I have to save these values in a database, or what other options are there?
The easiest way to store these settings is to use the My.Settings object.
Here's the documentation:
http://msdn.microsoft.com/en-us/library/saa62613.aspx
and here's an introductory article:
Using My.Settings in Visual Basic 2005
Use text file if you want to store only the value of one textbox's Text and one checkbox's Checked property.
You can do it in many ways e.g. save the options in file, or database, or anything else you find convenient. Here is a article that with guide you.