|
I create FolderBrowseDialog and show it, but the treeview control [with directories] isn't visible
[code]
private System.Windows.Forms.FolderBrowserDialog oAddDir;
this.oAddDir = new System.Windows.Forms.FolderBrowserDialog();
public void OpenDir()
{
oAddDir.ShowDialog();
}
dialog is visible but without one control: - treeview
|
|
|
|
|
Did you set the COM threading model for your application to multithreaded apartment (MTA)?
[System.MTAThread]
static void Main()
{
I've learned the hard way that in this case the described error occurs in FolderBrowserDialog and you have to use the single-threaded apartment (System.STAThread).
www.troschuetz.de
|
|
|
|
|
I tried. but it is not working. The form which is use the folderBrowseDialog is a singleton form.
In other applications it works fine.
|
|
|
|
|
plz paste the code of serial port programming in c# here
thnx
|
|
|
|
|
Please, please, please try at least to search CP first...
however:
http://www.codeproject.com/csharp/csppleds.asp
http://www.codeproject.com/csharp/cspplcds.asp
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi.
[ENG] Tozzi is right: Gaia is getting rid of us.
|
|
|
|
|
|
What site are you on? CodeProject maybe???
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
oook i didn't know the nick of code project
well i had tried to find this topic on CP urgently but due to lack of time i made it a seperatet topic
thnx for the help u all
|
|
|
|
|
it is... CodeProject.com !!!
I'd like to make you understand that in CodeProject there are so many articles that it is very rare that you don't find something concerning what you're looking for.
cheers
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi.
[ENG] Tozzi is right: Gaia is getting rid of us.
|
|
|
|
|
try to search on CP, and googling
<< >>
|
|
|
|
|
|
Hi all,
I have placed no of Richtext boxes on the form
and i want to show all of them in the Print Preview
as different pages.
Any help will be appreciated
Regards,
Pramod
|
|
|
|
|
Hi,
i am working on MSHTML and AxWebBrowser in c#.net(Desktop Application). i have
to scan lot of HTML pages.After Navigate the page "WebBrowser Document is
converted into IHTMLDocument2".so that i can scan pages through MSHTML. i am
using the following code.
1. this.axWebBrowser1.Navigate(URL,ref zero,ref nullStr,ref nullStr,ref nullStr);
2. Process.Start(NavigateFile);
3. mshtml.IHTMLDocument2 doc=(mshtml.IHTMLDocument2)this.axWebBrowser1.Document;// Problem
is here
4. mshtml.IHTMLElementCollection AllElements=doc.all;
Problem here is on 3 step. this step is excuting before the page is rendered. it gives me the error
that "Object reference is not set". what i want is this 3 step will not excute unless and until the page is
rendered or download properly. Please tell me what condition I will use before 3 step so that it can not
excute until
the page rendered.
i would like to know in details about MSHTML and AxWebBrowser. Please tell me from where can i
get the articals and sample code for this topics.
Thanks & Regards
Amit Grover
Amit Grover
CDAC R&D
Gist Group
pune
|
|
|
|
|
Hi. You will need to postpone steps 3 and 4 until after you receive the NavigateComplete2 notification. This[^] Google search will help you find the information you need.
John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
|
|
|
|
|
for example, run the app, type in a message or something, click send or whatever, person somewhere else recieves message.
What do i use to do something like that?
(This is for learning purposes only)
|
|
|
|
|
You need be alot more specific here ... there are probably at least 100 ways to do this
|
|
|
|
|
I need to place an ICON(very small) in a cell in a datagrid.
The icon may taken from the HDD or even a binary array taken from a databse.
Please provide me a way 4 it.
Original Idea : Depending on a boolean value i want to display an icon in the cell.
eg:
TRUE - Green Color right sign
FALSE - Red color cross sign
varunajeewa.LK
|
|
|
|
|
Why don't you try to change the background of these cells into green or red?
I Don't know it it's possible, but it would be easier if it is...
|
|
|
|
|
Hi there,
is there a way to know if the device has the data 100% available for reading?
What i do is the following:
a) send a write to the device [a request to 'gather' stuff for me to read later]
b) read the 'prepared' data
I use System.IO.Ports.SerialPort from the .Net 2.0 framework.
It seems that the write/read [a & b] part is too fast for the device. It does not have all data prepared.
Sometimes the data need to read is 10 bytes, an other time it is 20000 bytes. No 'logic' there.
Is there a way to tell if the device has the data complete for me to read back to the pc?
Thanx,
Jan
[ps. this is like a post i did earlier, however this is addressing the actual problem better]
|
|
|
|
|
Only if the device tells you through the serial port. Other than that, no there isn't.
The only method you have is to just read the Serial port until you have all the data you EXPECT to recieve, discarding everything else, or the device tells you it's sent you the complete data package.
Most of the code you're going to write for this depends on the device and what it sends you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Dave,
thanks for the info.
Indeed it seems like a loop until nothing else is available. The thing is that the device has very little documentation when it comes to communication.
Will have to learn by testing it over and over and over and over and over and over and ...
|
|
|
|
|
Doing research like this is 75% of a developers job...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yes, but if it is an undocumented issue, it's trial and error for a long time to come
|
|
|
|
|
Yep!
Nothing like groping around in the dark, is there?
If you little to nothing of the language the device speaks, how could you possibly carry on an intelligent conversion with it?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
In principle i have a small list of commands which i can send so it can gather the info i need, like a list of all available files on it and the possibility to retrieve a file.
It can also send data 'realtime' but if have not been able to collect that.
Something to do is to know if it 'preparing-data' or 'in-rest-mode'.
Could use threads,...let one wait if data is available,...not failsafe, some threads could never be triggered.
The problem is that stuff like 'end-of-transfer' is not available.
I was using something like:
<br />
if port.BytesToRead > 0 then add it to a string and later parse that string<br />
The problem with that logic is that it's not the way for this device. It works only when:
<br />
try<br />
{<br />
for i = 0 to 999999<br />
read byte and add it to cumulative string<br />
}<br />
catch<br />
{<br />
}<br />
...otherwise BytesToRead will be 0 at one time eventhough there should [and 1ms later] be more data available.
There is a commercial tool which can do the same as i do, however the tool is very user-unfriendly.
-- modified at 21:27 Saturday 10th September, 2005
|
|
|
|