|
Hi,
I have a textbox which get a number(Amount of money) from user.
i want to show the enterd number like this : 0,000,000(1,123,145)(automatically add (,) after 3digits enterd)
when i use masking it doesn't work the way i want it ,
can any one help me on this?
|
|
|
|
|
Winform or webform?
In winform, you can use MaskedEdit standard control.. In web form, you have to find the custom control (e.g. http://www.codeproject.com/useritems/MaskingText_for_ASPNET.asp)
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
in winform
I used defult masks but they didn't work porperly
what I've tried to do is to automatically add a (,) after 3digits is enterd
thanks
|
|
|
|
|
If your text is static, you can use #,###,###(#,###,###) in Standard masked edit. if you want to enter the text as much as you want then you should consider using thoundsand seperator function in keypress event of textbox..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
hi all,
I have a panel which contains a picturebox and two textboxes. in one of the textbox, some large content is to be displayed. this content is dynamic and i want the textbox to wrap the text accordingly.
i set the textbox multiline property to true and also set wordwrap=true. inaddition i set the acceptsreturn=true.
but still the text is not wrapped.
how can i achieve this?
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
anu81 wrote: how can i achieve this?
Try to enter the real paragraph.. sometimes, people used to entry "aaaaaaaaaaaaaaaaa" or something with space . this is wrong. So, try to enter the real paragraph (maybe, copy from news or somewhere) and see whether it works or not..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
hi,
i am actually trying with a real paragraph which is obtained dynamically. when i put a dummy paragraph and tested its working fine.
but when i put the dynamic content which contains more paragraphs, the text is not wrapped properly.
Any ideas?
and thanks for the response.
Regards
Anuradha
|
|
|
|
|
What about trying the dynamic content as a static content? For example: You store the text in database, right? so, copy this text and pasted in HTML. check whether it is wrapped properly or not.
or you can show us the content that you stored in database. then, we can test in our side and will let you know the result..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
hi,
Thanks so much for your help. i got it working now. i had added the picturebox and two textboxes during design time. now i added them at runtime and set the all properties again.
now its working fine although i have a vertical scrollbar for the textbox. but without that the panel becomes so big so its better i have the vertical scrollbar.
thanks once again for your help.
Regards
Anuradha
|
|
|
|
|
Several Projects used a Class in developing.
When these projects finish, they will be incorporated.
How to use the class in these projects.
|
|
|
|
|
Just add those dlls as a reference in your project. then, you can use it.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
HI, I have a requirement to send SMS to users. By implementing the Third party SMS Gateway it is possible just by sending parameters to that webservice.
But, i want to know the code in that webservice. How they will connect to Mobile providers. How can we do this using c#?
Any one help regarding this. if u have any links just send to me, i will study.
G. Satish
|
|
|
|
|
Satish - Developer wrote: How can we do this using c#?
Have you found any success in this?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hello,
i am working on C# 2.0 winforms.
I have a ListView, in this there are 5 columns, in second column an icon need to be displayed.
my code as follows...
<br />
listView1.Columns.Add("");<br />
listView1.Columns.Add("");<br />
listView1.Columns.Add("one");<br />
listView1.Columns.Add("two");<br />
listView1.Columns.Add("three");<br />
<br />
listView1.FullRowSelect = true;<br />
listView1.GridLines = true;<br />
listView1.View = View.Details;<br />
listView1.SmallImageList = imageList1;
<br />
for (int I = 0; I <= 10; I++)<br />
{<br />
ListViewItem item = new ListViewItem("");<br />
item.SubItems.Add("");<br />
item.SubItems.Add("aaa"); <br />
item.SubItems.Add("bbb");<br />
item.SubItems.Add("cccc"); <br />
item.ImageIndex = 0;
listView1.Items.Add(item);<br />
}<br />
my problem is... item.ImageIndex = 0; is showing icon in only first column. i have to show icon in second column.
how to to do?
any sounds will be greatly appriciated.
Ramana
|
|
|
|
|
Are you still having trouble with this?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi all,
I've working on facebook application on .NET 2.0. now I'd like to embed web parts into this application. Who know the way to implement it? please help me.
Thuan
|
|
|
|
|
WebBrowser control, maybe?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Have a tiny bit of experience programming...where is the best place to start for C#...HERE? I have Visual Studio....
|
|
|
|
|
Hi,
the best way to learn a new technology is by working your way through a book on it.
Which book, you'll ask, and I don't know, it depends on your background.
Microsoft has published a lot of good books, that work together with their tools.
I tend to go to the book shop, look at say ten books on the subject and then buy the 1 or 2 that I like most (often one tutorial, one reference manual).
Furthermore CodeProject has a lot of nice articles and useful forums, where you can ask
specific questions when you are stuck.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
tperk_7 wrote: where is the best place to start for C#...HERE?
Yes, this is one of the much better places to learn.
"I've seen more information on a frickin' sticky note!" - Dave Kreskowiak
|
|
|
|
|
Hello. I am having an issue. I have been learning C# enthusiastically, and recently I learned how I can have controls and forms be moved during runtime(forms being when there is no border to move it with).
This is thrilling for me because I want to make irregularly shaped programs. I ran into a problem though. Everything is going fine with TransparencyKey and it showing up as transparent, except that when I click on a transparent area, the focus does not go to the windows beneath the application, and instead maintains focus on the application even though I'm clicking in the transparent area. This worked good when I wasn't using a background image for my transparent GUI, but now that I am it's not working.
Is there a way around this?
Also, when moving around my form it looks fine, draws nicely with no flickering. I showed the test program to a friend and he says it looks terrible and is redrawing really slowly. What could I do to alleviate this problem? I can't tell that it looks bad on other computers since it works just fine on both of mine.
Thanks in advance!
|
|
|
|
|
I am in a sticky situation at work...quite a bit of explanation to get to the root of this problem....I have to make changes to a system that I have never touched and this system is the epitome of bad bad BAD BAD BAD....if I COULD, I would publish this thing so that an anti-pattern could be developed from it. ...To give you just some taste of what I have to deal with, the Layered Architectural Pattern was improperly applied by the architect. Rather than having a UI Project with references to a separate Data Services library and a Business Logic Library, there is a FOLDER....(Yes..that's what I really said)...a FOLDER inside a single project named "DAL" and a FOLDER named "BL" and a FOLDER named "UI" and developers(frikkin contractors) that have worked on this system in the past have cross-switched the heck out of this thing because they didn't know any better and the architecture allowed it ...To give you some further insight into what I have to deal with, the standard method of exception handling in this system is not by a try/throw/catch mechanism, but by passing a reference to an Exception Handle through the method signature and assigning it in the catch block. ...Yeah, it's THAT crappy. (And if you're scratching your head about the ref to the Exception Handle, that's because....surprise, surprise.....this system is written...err...scripted in VB.NET)*see note at end of post to see why I posted in the C# forum*
...Anyway, I'm trying my best to work my changes(System Access Maintenance screen....simple crud aspx page) into their existing architecture because I want to get in, get done, and get the hell out of Dodge. ...Don't even ask to see this object model...you don't want to see it....but basically, there's de-normalized data maintained on an Employee table for status(Arbitrary values of "A" for active and "I" for inactive) with no reference table to fetch from. ...There's also a "Role" and "Position" attached to each user(puzzlingly, there ARE reference tables for those values)...Role and Position are maintained as a hash of code/value pairs (i.e. "ADM"/"Administrator") ...and the form I am to create is to display "Administrator" while maintaining "ADM" as the actual value to be assigned to a new system user when performing an Upsert...simple, common problem,right? ...ok, so my solution was to do this:
"I need build Skynet. Plz send code"
|
|
|
|
|
I created a structure that has 2 string properties, Code & Text.
I created the stored procedure that queried the database for the set of Role Code/Description combos(passed in a parameterized sys_refcursor) ...execute the reader, storing each of the column values in an appropriate variable of my Structs type, add it to the ArrayList and loop.
Ok.....so here's where I get to the point of "working with their existing system." ...I don't pass up through any business logic layer to get to the UI here, because this path doesn't need to be maintained back to the data. I bound the DropDownList on my form directly to the result set of my "GetRoles" method. ...During the code review with Support, they don't understand why I created the struct. ...They think that I should have (and are trying to force me into) simply bound the OracleDataReader directly to the UI!!! I tried explaining to them that you're not supposed to expose data access objects(as in DataSet, DataTable, DataAdapters) directly to the client like that and that what I had done was essentially the same thing, but I cannot think of any point of defense for my technique besides "I said so" and "because the way you want it to be done is Spaghetti Code" ....their solution is TECHNICALLY correct, but it is really coming down to their personal preference and getting into a "Well, I would have done it this way" .....I don't have the time(calendar) or time(budget hours) to make this change, but they have to sign off on this before it's out of my hands. ...Does anyone have any suggestions that I might be able to use for my defense? I was going to hang my hat on the fact that I am creating a structure, and therefore it doesn't need to invoke the GC, but I go ahead and put them in a darn ArrayList. ...I'm probably just going to create a static array of my structure so that I can lean on that point, but I want to do my best to make sure that they can't convince my manager to have me change this just "because they said so"
"I need build Skynet. Plz send code"
|
|
|
|
|
...I posted in here because I don't trust VB scripters. I'm sure they would look at it and say "what are you talking about...you're SUPPOSED to just bind the DataSet to the UI control"
"I need build Skynet. Plz send code"
|
|
|
|
|
...not to say that knowing VB is a bad thing(heck, I know VB ) ...but still, if you're familiar with the history of Basic, then you know why I don't trust VB programmers....the language is a travesty and should be stricken from any and all annals of recorded human history....but that's just my opinion lol
"I need build Skynet. Plz send code"
|
|
|
|