|
Mehdi,
If you add the code I gave, or the following modified version of it, at the end of the TransferItem method in your previous posting it should work:
CurrencyManager cm = BindingContext[ListBoxA.DataSource] as CurrencyManager;<br />
if (cm != null) cm.Refresh();<br />
cm = BindingContext[ListBoxB.DataSource] as CurrencyManager;<br />
if (cm != null) cm.Refresh();
Chris Jobson
|
|
|
|
|
Hi there,
Is it possible to add a ProgressBar control to a status bar or do you simply have to make the status bar panel owner drawn?
Thanks in advance
- monrobot13
|
|
|
|
|
Hi, I may be mistaken but I think that you cannot place controls into a StatusBar control in the designer. However, you can add any number of Controls to the StatusBar programatically through it's Controls property.
Hope this helps
Hey don't worry, I can handle it. I took something. I can see things no one else can see. Why are you dressed like that?
- Jack Burton
|
|
|
|
|
Thanks Chris! I'll give it a try.
// Edit
Gave it a try. It works...the problem is that is always inserts the progressbar as the very first item on the statusbar. I tried using the SetChildIndex method of the Controls collection but it had no effect. Any ideas?
- monrobot13
|
|
|
|
|
Try writing a StatusBarPanel derived class as described in http://www.dotnet247.com/247reference/msgs/20/102483.aspx[^]
Regards
Thomas
Disclaimer: Because of heavy processing requirements, we are currently using some of your unused brain capacity for backup processing. Please ignore any hallucinations, voices or unusual dreams you may experience. Please avoid concentration-intensive tasks until further notice. Thank you.
|
|
|
|
|
Here's another link: http://www.dotnet247.com/247reference/msgs/12/62892.aspx[^]
Regards
Thomas
Disclaimer: Because of heavy processing requirements, we are currently using some of your unused brain capacity for backup processing. Please ignore any hallucinations, voices or unusual dreams you may experience. Please avoid concentration-intensive tasks until further notice. Thank you.
|
|
|
|
|
What's the equivalent of the Win32 API GetLocaleInfo for .NET?
Thanks,
Alvaro
When birds fly in the right formation, they need only exert half the effort. Even in nature, teamwork results in collective laziness. -- despair.com
|
|
|
|
|
I think the CultureInfo class (from System.Globalization) might be what you're looking for.
Chris Jobson
|
|
|
|
|
Yes, thanks, that's the one.
Do you know if there's a mapping of Win32 APIs to their equivalent namespace.class.methods in .NET. Something like that would help a lot of people like me who are porting apps from Win32/MFC to .NET.
For example, I just ran into another one. What's the equivalent for VK_DELETE? Well, I had to search for a few minutes before I discovered the System.Forms.Keys enumeration.
Thanks again,
Alvaro
When birds fly in the right formation, they need only exert half the effort. Even in nature, teamwork results in collective laziness. -- despair.com
|
|
|
|
|
Hi,
I need to insert a checkbox control into the column header of a DataGrid.
So, I display the checkbox on the left side of the HeaderText.
How can I do?
Thank's
|
|
|
|
|
I need to determine the amount of records in a database table without looping through the tables records one by one, that seem to be very slow over a 33kbps connections if you got 20,000 records???
Leon v Wyk
|
|
|
|
|
In order to find out the number of records in a database table "table", use the SQL Command:
Select count(*) from table
In general, try to get familiar with SQL and what it can do for you. It can do a LOT more than procedural code.
|
|
|
|
|
I thought you guys might be able to help.
I am still undecided about J#. Can anyone explain why the code snippet below would work in J++ but not in J#. The code compiles okay but it cant find the text file to read from. Instad, the exception I catch is J# filenotfoundexception. The text file is in the right directory. Anyways, appreciate any help.
public static String[] getIndonesianwordList(String file){
String IndonesianwordList[] = new String[9];
try{
BufferedReader in = new BufferedReader(new FileReader(file));
String s;
int i = 0;
while((s=in.readLine())!=null){
StringTokenizer tok = new StringTokenizer(
s,DELIMITERS);
while(tok.hasMoreTokens()) {
String nextWord = tok.nextToken();
System.out.println(nextWord);
IndonesianwordList[i] = nextWord;//wordList.add(nextWord);
i++;
}
}
}
catch(IOException e){
System.out.println(e);
System.out.println("error loading array");
}
return IndonesianwordList;
}
|
|
|
|
|
Just a guess, but maybe J# requires a fully qualified path name for FileReader (e.g., "C:\temp\foo.txt" rather than "foo.txt").
|
|
|
|
|
I am creating a small application that will goto a specific directory, display its contents, etc - basically the window where the dir contents is displayed should have the same functionality as a normal explorer window :
i.e.
Drag/Drop
Listing/Sorting functions
Double Click to open
I assumed that this would be fairly simple, but after some surfing around it seems that is not the case at all.
Does anybody have any experience of this?
|
|
|
|
|
Well after a few hours of looking around I have come up with a grand total of nothing.
So I have started to write my own, so far so good, but I have encountered a stumbling block - I cant find any code to open a file given its path.
For example, I am trying to open the following file :
C:\skunkworks\directoryviewer\test.txt
Does anybody have any info on achieving this?
I have been looking through this article :
http://www.codeproject.com/csharp/csdoesshell2.asp[^]
But it all seems to much to simply open a file in whatever the associated application.
|
|
|
|
|
I have found a solution to the file opening problem I mentioned above, just incase somebody is searching these forums for a similar answer this is the code I used :
<br />
FileInfo launchfi = new FileInfo(strDocumentPath);<br />
Process proDocument = new Process();<br />
proDocument.StartInfo.FileName = launchfi.FullName;<br />
proDocument.StartInfo.WorkingDirectory = launchfi.Directory.FullName;<br />
proDocument.StartInfo.UseShellExecute = true;<br />
try<br />
{<br />
proDocument.Start();<br />
}<br />
catch<br />
{<br />
MessageBox.Show("Unable to open selected document. If this problem persists please contact your Administrator.", "Document Open Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);<br />
}
|
|
|
|
|
Hi there
Basically whats the avantage of .NET over Visual studio 6.0.Many Ppl say that Common language Specification is the Advantage.
Do they mean that a code writtern in VB .NET can be used in C#?
If so we can very well write a dll in VB, that can be used in VC++.
Plz make me clear on this stuff .
Thanks in adv.
Srini
|
|
|
|
|
the difference is mainly
1) common class library across languages.
2) class/object reuse across languages.
you can't do this is vb/vc++ - you can provide a dll interface, but thats at a function level, not an object level.
of course you can get the same results with vb/vc++ and some clever programming, but the whole point is the M$ have done it for you.
its all about productivity.
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Hello all
If anyone knows a good .NET spell checker component, please let me know.
Thanks
Smitha
It is better to be hated for what you are than to be loved for what you are not.
-- Andre Gide
|
|
|
|
|
Hi I have just finished writing one. The core is in native unmanaged C, but I made a .NET class for it as well. The DLL is meant to be used in Mirc, but can be accessed from .NET as well. Reply so I can email it to you.
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
Hi
i wrote a program using sockets. Program works well under w2k server, but under wXP, it does not. This is a server-client program. Under XP, client could established a connection, but after establishing, the connection lost. I tried many times, and many different ports, but the result was same. (I disabled wXP's firewall). Can anyone help me?
|
|
|
|
|
Yoe'll have to send a snippet of your code.
|
|
|
|
|
Thank you, i solved the problem. I found an error in my code.
|
|
|
|
|
Hi!!!
i have created a custom text Box inherited from TextBox Class. When I drag 'n' drop it from toolbox to Form. It shoes wait cursor and nothing happens . But creating at runtime works fine....any hints???
sorry for my bad English.
|
|
|
|