|
can u suggest me a logic regarding the list 1 , 11 , 2 ,aa , 1a to align
in the ascending order ?
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Are these hex numbers ? I guess write a sort routine to turn them into numbers and sort from there.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Good Morning,
After searching for 3 seconds I gave up hope and started praying that someone else will be able to help me.
Can anyone tell me how to see if the IDE is open through code?
I want to skip some code if the program is running in Debug mode through the IDE, but run the code if the program runs on a customer workstation.
At the moment I'm using #Define, but this generally end up being forgotten when going into a Live environment.
Regards,
|
|
|
|
|
You can use #if DEBUG to check whether the program is running on debug mode. When you release the application in release mode, all the code written inside this will be skipped.
#if DEBUG
Console.WriteLine("running on debug");
#endif
|
|
|
|
|
I've found myself in a bind with the report viewer control...
Here is what I'm trying to build:
http://img135.imageshack.us/img135/2971/reporthelpzb2.gif[^]
Decode Key:
Blue = report
Red = horizontal table of objects
Yellow = values list in red object (of variable length, normally <=3 && >=1)
Here is how I setup my data business object classes as follows:
MainDataClass
|_TableObject
|_DateField
|_ValuesList
|_Value
|_UnitValue
I setup the data to point toward the TableObject and then bound the DataBoundObject to the MainDataClass.GetAllData() method.
My problem is I can't come up with a good solution to display the dynamic number values in the ValueList (horizontally preferred)
I was thinking I could use a matrix but doesn't that require two data grouops? Also a table only shows values vertically!
|
|
|
|
|
Hi
I don't know what happens but i just can't set a KeyPressEventHandler...
I tried every possible way but it just doesnt work, mouse\timer event work but just not any of the press key event work.
Could anyone help me?
My program is really simple, consist of a button that when you press it it plays a sound.
I want that when you press a key it plays the sound too.
So here is my code ( part of it)
I just put a messagebox on the even to test if it works but no...
<br />
public MainWindow() {<br />
InitializeComponent();<br />
this.KeyPress += new KeyPressEventHandler(MainWindow_KeyPress);<br />
}<br />
<br />
void MainWindow_KeyPress(object sender, KeyPressEventArgs e) {<br />
MessageBox.Show(" Event is working ");<br />
}<br />
<br />
private void button1_Click(object sender, EventArgs e) {<br />
WAVSounds ws = new WAVSounds();<br />
<br />
ws.Play("C:\\...\\Snare.wav", ws.SND_FILENAME | ws.SND_ASYNC);<br />
}<br />
I looked on alot of examples but i don't see anything that is missing.
Thanks alot.
|
|
|
|
|
Because you have controls on your form one of the controls will have the default focus, so the keypress event will go there (first of all). In order to handle the keypress, you need to set
this.KeyPreview = true;
|
|
|
|
|
omg i've been searching for hours! it was just one line that was missing!!!
Thanks
|
|
|
|
|
No problem. Glad to help.
|
|
|
|
|
Hello hello
I still have difficulties to understand the autocomplete feature of combobox and what they are used for
I've read and reread MSDN about that but I did'nt find the BASIC concept ?
Thanks a lot for who can tell me in a few words the basic purpose of those feattures
|
|
|
|
|
Essentially it provides a way to allow the end-user of the application a way to type less key strokes to pick a value for the combobox.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
Thank you Scott
But I do not understand how !
I'm using a combobox with a DataTable datasource
I've already tryed to set the autocompleteMode to the different mode
But I don't realy see any different behaviour
But I'm not a combobox user specialist
|
|
|
|
|
Hi All,
I'm just testing some file recursion code at a good way into scanning all my hard drives for FileInfo[] I'm getting a DateTime exception of:
System.ArgumentOutOfRangeException was unhandled
Message="Not a valid Win32 FileTime.\r\nParameter name: fileTime"
Could this be a corrupt file issue?
At the moment I'm just grabbing a DateTime on each file should I really be passing it some CultureInfo in order to make sure that the DateTime format its using is of the host machines same cultire or should I implement some Culture.Invariant on it? Can C# even do that?
Thanks for any advice.
Regards,
Jammer
Going where everyone here has gone before!
|
|
|
|
|
Did you think of debugging your code and seeing what file is causing the exception? Or, now this may be an advanced technique, but valid parameter and handle the exception.
only two letters away from being an asset
|
|
|
|
|
The problem with debugging this is that its part of a recursive file scanning routine and it happens about 175,000 files in ...
i've wrapped the line in a try{}catch{} now and handling the error but I would like to find out what file is causing this.
I'm just rerunning the code with a break point on the catch to try to find out the filename ...
Cheers,
Jammer
Going where everyone here has gone before!
|
|
|
|
|
Well, I've nailed it ...
there are a gaggle of unruly files on one of my hard drives with modified dates like:
13 July 27911, 07:18:01
very, very weird ... anyone seen dates like this before?
Jammer
Going where everyone here has gone before!
|
|
|
|
|
It means you've been visiting warez sites again.
Cheers,
Vikram.
Zeppelin's law: In any Soapbox discussion involving Stan Shannon, the probability of the term "leftist" or "Marxist" appearing approaches 1 monotonically.
Harris' addendum: I think you meant "monotonously".
Martin's second addendum: Jeffersonian... I think that should at least get a mention.
|
|
|
|
|
Jammer wrote: i've wrapped the line in a try{}catch{} now and handling the error but I would like to find out what file is causing this.
Then put a damn breakpoint in the catch block!!!!
only two letters away from being an asset
|
|
|
|
|
ok ok ! I did ... !!! see my other post!
Jammer
Going where everyone here has gone before!
|
|
|
|
|
Hello,
I have an application that sets a cookie (for authentication purposes) after a user logs in. When I run the application locally it sets the cookie and runs as it should. However when running on the webserver it appears to not set the cookie and cause me to go back to the login screen (to basically do it over). I tested my app in Firefox and it sets the cookie fine (both locally and on the webserver). Can anyone give any insight on this? Thanks in advance.
|
|
|
|
|
Hi there,
can windows service run even before the windows log on (i.e) just once the computer boot? (windows service that is built using C# 2005)
if so, can the service check a data base, update it, and gives pop ups to the user?
also, can it have an icon on the desk top so it is just like a normal application?
I really need to know a lot about windows service building and what things are possible and what are not ,
please help, even with sites ,
Thanks ,
There is always something to learn
|
|
|
|
|
Knowledgestudent wrote: can windows service run even before the windows log on (i.e) just once the computer boot?
Yes, set the startup type to Automatic.
Knowledgestudent wrote: if so, can the service check a data base, update it, and gives pop ups to the user?
For a service to have any UI, set the Interact with desktop option. Natually, it has to run under a specific account for that. I'm not sure if that is compatible with setting the startup type to Automatic.
Knowledgestudent wrote: also, can it have an icon on the desk top so it is just like a normal application?
I thought you wanted it to start up automatically. What do you want the icon to do?
Knowledgestudent wrote: I really need to know a lot about windows service building
Buy a book, or use Google.
Cheers,
Vikram.
Zeppelin's law: In any Soapbox discussion involving Stan Shannon, the probability of the term "leftist" or "Marxist" appearing approaches 1 monotonically.
Harris' addendum: I think you meant "monotonously".
Martin's second addendum: Jeffersonian... I think that should at least get a mention.
|
|
|
|
|
Vikram A Punathambekar wrote: I thought you wanted it to start up automatically. What do you want the icon to do?
actually the service must perform functions according to the user that is why I need an icon for it, in other words : the user must be able to choose what the services must do in the next time.
OR, It is possible to let the service open an application (have it run), isn't it?
I am willing to buy a book , can u give me names that are helpful(worthy)
Thank you
There is always something to learn
|
|
|
|
|
Hi,
I'm trying to write to a file which shud be .csv. I'm using streamwriter for that as
StreamWriter sw = new StreamWriter (Server.MapPath"~/ImportData/Files/"+_FileName),true,Encoding.Unicode);
Now the problem is, when i try to open the file in excel does not see the commas in the file and puts all data for that row in the first column. I can resolve this issue by replacing Unicode with Default, but this solve the problem only for culture english.
I should definatley go with Unicode, as i have to use this for different cultures.
Please, let me know if any ideas, as I'm stuck on this.
Thanks
robust
|
|
|
|
|
wrote: let me know if any ideas
Don't cross post. You asked this same thing yesterday in the General Discussion forum.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|