|
Thanks for yr continuos replay..
I don't know about separate thread than the main (GUI) thread..
|
|
|
|
|
Where are you calling this code?
Is it in the load of a form, in the click event of a button, in a separate class, in a background worker class,...?
Try adding the STAThreadattribute to the main function (the new constructor of you startupform) like the error states.
I'v never encountered this error before so you might have to google it a bit.
If you are just calling this dialog after the click of the event try adding a folderbrowserdialog onto the form by dragging it out off the toolbox (like you would do with any other control) and using that one.
|
|
|
|
|
I m calling this code in button click event..
I not found control on toolbox like folderbroswedialog.
|
|
|
|
|
What version of VS are you using because it's a standard control, it should be in your toolbox.
Check the 'All Windows Forms' group.
Or check if you can add it with the 'choose items' dialog (right click on an empty space in the toolbox).
Also check if you have the system.windows.forms reference (you should have that but check it anyway)
If you can't find it in any off those I'm afraid there is probably something wrong with your VS installation, and that's most likely why you are getting that error then.
(I just copy-pasted your code in a clean project with one form and one button and it works perfectly, so check if there is nothing wrong with the references, with your installation,...)
|
|
|
|
|
I m using VS 2005 and .Net framework 2.0. I found folderdialog in choose items.It is already checked.
But in toolbox it will not dispalyed. That's why i cn't drag from toolbox.
|
|
|
|
|
Try unchecking it, closing the choose items dialog, reopen the choose items, rechecking it.
(maybe even add it to a custom group in the toolbox so you can easily find it after (create the group then first and right click in the empty area off that group)
If this doesn't work there is something wrong with your installation of VS.
|
|
|
|
|
Thanks a lot for yr help.. I will try this . But if u find any other code than this then plz send me.
|
|
|
|
|
Is this for a web application...?
|
|
|
|
|
I might be mistaken but:
programfolder is not part of the desktopfolder
so it can't
change your rootfolder or selectedpath
|
|
|
|
|
That doesn't brake the code.
It simply means that the rootfolder property is ignored. And upon opening the dialog the program folder will be the one selected.
|
|
|
|
|
How to create a program of Scheduling Algorithm... Shortest Job First using VB6.. Thank you...
modified on Monday, February 23, 2009 9:13 AM
|
|
|
|
|
You are a moron...bugger off.
I don't speak Idiot - please talk slowly and clearly
I don't know what all the fuss is about with America getting it's first black president. Zimbabwe's had one for years and he's sh*t. - Percy Drake , Shrewsbury
|
|
|
|
|
Nope. You need to read forum posting guidelines [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
First, you come up with a set of requirements that you app must implement, both explicit and implied. Then you sketch out a design for you application that would satisfy all those requirements. You then proceed to write code following your design, then debug it and test it to make sure it meets the requirements laid out in the requirements.
|
|
|
|
|
I have a module in a VB.NET 2005 project that is part of a dll. This dll also holds many of my common objects across multiple solutions. This particular module has a routine that all my transactions to the server run through.
Since other dll's and the main project of my solution each have a reference to this module, is it shared? Or does each dll have a separate instance?
The reason I need to know is because I want to set a flag in the module that says each subsequent transaction should not be treated as a "sync point" by the server (sometimes these same transactions may be a sync point elsewhere in the program). After the user has confirmed the actions they've taken, I would reset this flag and subsequent transactions would again be sync points. This allows me to easily "rollback" to the state prior to when the user performed the several transactions if they decide not the confirm.
So if I call the module from the main program, but transactions get called from the other various dlls that have their own reference to the module, will the setting of the flag be set by every transaction?
I realize a module is like a shared class but I'm unsure if .NET makes separate single copies for each dll and program that has a reference, or just one per solution? Any clarification would be sincerely appreciated.
|
|
|
|
|
A running program has no concept of Visual Studio solutions. Instead you should think in terms of processes and AppDomains. Each AppDomain (every process gets a separate one by default and may create more) gets its own "instance" of a static class[^].
So as long as your main programs and dlls are all running in the same AppDomain in the same process, you will have a single instance used by all of them.
|
|
|
|
|
how to clear session values when we close the browser in vb.net.
please give me immediate response.
modified on Monday, February 23, 2009 1:16 AM
|
|
|
|
|
I don't think you will get a prompt response (if at all) to your question given your demand!
How about looking up the documentation relating to sessions.......
|
|
|
|
|
You are an idiot, you are rude, and you are in the wrong forum.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
You really need to read up on ASP.NET and Sessions. There is no way for you ASP.NET code (which runs ENTIRELY on the server) to know if the user closes the browser.
|
|
|
|
|
how to unload and load a form?
|
|
|
|
|
Hello,
I'm not sure what you want is something like this:
Dim Newform1 as new Form1
Newform1.show() ' To Load a form
Newform1.Close() 'To Unload
'Or
Newform1.Hide() 'To Unload
I just hope it helps you.
modified on Monday, February 23, 2009 1:17 AM
|
|
|
|
|
yes..dats rite!!..but the form will restart,rite?..i dont want the form to restart..
plss...help me..txx
|
|
|
|
|
Form.Close() will close the form, it will not restart.
|
|
|
|
|
ya2..but actually i want to reset the form by unload n load back the form..can u help me?
|
|
|
|