|
numbrel wrote:
But that seems to be about taking DateTime and manipulating it to get the string values desired.
If that were the case, the method would be called .ToString() . DateTime.Parse() takes a string, and optionally, a format provider for some guidance, and returns a .NET DateTime object with the numerical version of the date and time.
If the user is entering date and time seperately, you can combine them and submit the new date/time string to the Parse method:
dtmDate = maskDate.FormattedText
dtmTime = maskTime.FormattedText
Dim myDateTime As DateTime = DateTime.Parse( dtmDate & " " & dtmTime )
The .Parse() method assumes that the full date and time are provided in the current culture, which on default US machines is "mm/dd/yyyy hh:mm:ss". If any information is missing, the default action is to replace the missing information with the current date/time info.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
i downloaded microsoft .net framework 1.0 sp2 installer.i installed it on my windowsxp( sp2 ) on which already .net studio is installed but after installation of compact framework i got
NCFSetup.exe error and it showing error as "RAPI.dll was not found.Reinstalling the application may fix this problem" , but after reinstallation also it showing giving same error.
pl. can u sugguest me how to tackle this problem.
kunal
|
|
|
|
|
Hello,
I have just finished writing a simple program that consists of 1 form, 2 embedded icons, and 1 notify icon. When I go into task manager, it says that it is taking up 21, 288 KB (21 MB) of memory.
How can I decrease the size of the memory "footprint" that my application puts on the computer? Or is it a limitation due to the .Net Framework?
Any suggestions or help will be appreciated,
Programmer2k4
My sig:
"The so-called 'Bugs' do not exist, they are merely features hidden by developers with message boxes that say 'An unhandled exception has occurred'." - Programmer2k4
"And it is a professional faux pas to pay someone else to destroy your computer when you are perfectly capable of destroying it yourself." - Roger Wright
I now use my CodeProject Blog!
|
|
|
|
|
Everyone new to the .NET Framework see's this and freeks out. It's normal! You don't (and CAN'T) do anything about it.
If you minimize the app and restore it, you'll see that your application seemingly dumps alot of this memory. In reality, it's not. What's going on is that you've got the weight of the .NET Framework under your application. When you minimize your app, alot of your code and data (whether it's part of your app or part of the Framework) gets swapped out to disk and no longer resides in physical RAM. When you restore the app, only the code and data that's needed immediately gets swapped back to RAM. As you use your application, more data and code is swapped back and forth to the pagefile as needed.
If the Garbage Collector sees that there is plenty of RAM to run your application, it might not swap this stuff out and free up RAM. Why waste the time, if it's really not necessary? Only when RAM starts to run low will the garbage collector be more aggressive swapping code and data out to disk and cleaning up objects that aren't in use any more.
Don't panic! Just let the Garbage Collector do it's job!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for the quick response. I originally thought it was due to my application.
Thanks,
Programmer2k4
My sig:
"The so-called 'Bugs' do not exist, they are merely features hidden by developers with message boxes that say 'An unhandled exception has occurred'." - Programmer2k4
"And it is a professional faux pas to pay someone else to destroy your computer when you are perfectly capable of destroying it yourself." - Roger Wright
I now use my CodeProject Blog!
|
|
|
|
|
Hi everyone,
I'm trying to find out if there is a way to apply Microsoft's Word formatting features to a textbox in .NET and be able to save and the retrieve the field to SQL server without loosing any of the formatting set. Does anyone know if this is possible? I would appreciate any comments or suggestions. Thanks so much!
Tasha
|
|
|
|
|
No, the TextBox doesn't support any formatting. The RichTextBox does, but on a much smaller scale than Word's formatting capabilities. Since the RTF formatting codes are in-line with the text, all you have to do to save everything is get the RichTextBox.Rtf , which returns a String, and save that to your database.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
in vb.net i have a form which contains 2 buttons and some text fields. the user may enter the data in text fileds in the following format.
ex. "have a #nice# day". some of the words may be prefixed and suffixed with the # symbol. now when user presses the first button i want to store these data(dataset) to the rtf or text file.
when the user presses the 2nd button, i want to open the same text or rtf file and then i want to format the file in such a way that. all the #(hash) delimited words should be italisized and the file has to be save.
so anyone pls. help me.
thanks in advance
thiru.
|
|
|
|
|
Help you with what? So far, you haven't asked a question we can answer. You'll have to be specific about what part of your application you need help with and what the problem is.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I need code for two buttons. to save the tab delimited file in the file. and when i press the 2nd button to italisize the # delimited text in the file.
thank u,
thiru
|
|
|
|
|
Ok. There is nothing "tab delimited" about your initial post.
All your doing is saving the Text to a file. If your using a RichTextBox control, all you need is the .LoadFile and .SaveFile methods to do this for you.
The the second part, you have to scan the text to find the first occurance of a '#' character. Save that position. Continue scanning until you find the next '#". This will give you enough information to set the .SelectStart and .SelectLegth properties of the RichTextBox, then use the .SelectionFont property to change the font to italics. An example of which is found here[^] on MSDN.
Why does this smell like homework?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is there a way, to get at the 'Main Bindable Property' of any given control. I am thinking, probably using system.reflection but i don't know how.
I have a bunch of different controls and i need to programmatically bind them to a dataset. To create a windows.forms.binder i need to know the property i want to bind to - the main bindable property for this particular control.
Help anyone?
Jan Engel Ketmig
|
|
|
|
|
JanEngelKetmig wrote:
'Main Bindable Property'
?????
Are you talking about the "default property"? Like Text for a TextBox?
I think you're looking for DefaultPropertyAttribute[^], which you should be able to find using Reflection. I don't have any example code, because frankly, I've never had to find/use the DefaultProperty for anything.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
WOW that was fast... yes!, that oughtta do it... Thanks man..!
Jan Engel Ketmig
|
|
|
|
|
Hello there
I have one folder on C drive and I want to move it to any other logical drive D or E. I am using this code which gives me error that cannot move between logical drives.
Note: The Source Folder could have N Number of sub folders and files
System.IO.Directory.Move("C:\TestFolder", "D:\TestFolder")
I also tried this which gives me error that file not found....
Rename("C:\TestFolder", "D:\TestFolder")
Any Solution will be appreciated
Best Regards
Rizwan Bashir
|
|
|
|
|
Uhhhh.... The error message should make it obvious. You can't move between two drives/volumes/shares. You can, however, copy the source to the destination, then go back and delete the source. You can only move when the source and destination are on the same drive/volume/share.
This is spelled out in the documentation for Directory.Move , here[^] on MSDN. Look under Exceptions.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i work on database application with vb6
and i depend on data control in my program
from other side, i build my databse file with data manager
on vb6?
how can i protect .mdb file with password?
and how can i open it from vb6 in this case?
|
|
|
|
|
You can protect your Access database with a password all you want. But it can be broken and revealed so easily with off-the-shelf utlities that anyone can download from the web for FREE. Why waste your time?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
what are others stratigies about security?
|
|
|
|
|
In an Access database? There are none. Access is meant as a desktop database, not a secure storage medium. The only other you can do is encrypt the sensitive data before it's sent to the datbase, but you won't be able to search on it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
Hi All
I want to buy a DHTML Edit control, which i can use in my VB.NET Windows Applivation. I dont want to use control provided by .NET itself. Can anybody please suggest me a nice control control for the same purpose.
Thanks
Sumit Domyan
|
|
|
|
|
Hi there! Can anyone help me with this: what dll's do i need in order to export a crystal report to text format during runtime.
When i run my program in visual basic 6, the exporting is done successfully. but when im using it in .exe, errors are generated.
i already used U2FTXT.DLL
what could be the problem?
pls help me.... thanks a lot!
|
|
|
|
|
I have a combo box on a windows form i'm using (in vstudio .NET 2003). It has to be a combo box, and I don't want the combobox to display the same text as what the selected value is. for example, i have four items in it now. when it drops down the user sees:
item 1
item 2
item 3
item 4
when the user clicks on item 1, instead of the box collapsing and displaying "item 1", i want it to display "this is a test". how do i do this? I've already tried comboBox3.Text = "this is a test" and putting it in the selectedIndexChanged, selectedValueChanged, Click, mouseUp, and textChanged events for the combobox, but it doesn't work. it still displays whatever i clicked. what's going wrong?
|
|
|
|
|
Hi,
If it may help you and i really understood what you mean, I think may be you need a Lable near your comboBox. Whenever a user clicks on one of the Items in cmb then your Lable will tell
i hate combo boxes wrote:
this is a test
I hope it helps.
Good Luck
Acheto
|
|
|
|