|
OK. First of all, I will not GIVE you any code. I will however try to help you on your way.
The textbox is the wrong control for this. You should use a richtextbox.
Look here[^]
Especially have a look at the properties SelectionColor, SelectionStart, SelectionLength, ...
Hope this helps.
V.
|
|
|
|
|
What's your favourite feature of C# 5.0 so far that has been announced?
- Nevin Janzen (thundercloudstudios.weebly.com)
modified 22-Nov-11 23:45pm.
|
|
|
|
|
the 5.0
All the best,
Dan
|
|
|
|
|
- Nevin Janzen (thundercloudstudios.weebly.com)
|
|
|
|
|
Asynchronous programming of course
|
|
|
|
|
I have a C#.net 2010 new application that I am writing where I use linq to sql so I can work with the datacontext object. On the first menu tab page, I update the 'main'table with default values and values the user enters. The user clicks the next button the user is allowed to change some values based upon when customers submitted work. Basically some of the dates that are loaded on the first page come off of a schedule due date table. If the customer submits various parts of the paperwork late, the user changes the dates in the database.
So the question is if a date was loaded into a sql server 2008 r2 datqabase, and the user finds that they need to change the value to NULL is that allowed? Basically on some of the paperwork that is supplied by the customer if they do not supply a date, the data needs to be set to NULL. Thus in the application how do I pass the null value to the database via the datacontext object? Do I pass the value as '' or 'NULL', or some other value?
Thus can you tell me how to pass this Null value to the appropriate column in the database?
|
|
|
|
|
Some suggestions here[^].
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hi ,
How i Can open my c# form only automatically to user when user open windows.
|
|
|
|
|
You will probably need to add it to the registry in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run. But you may find that your users have their own ideas as to whether they want this to happen or not.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
|
Even simpler is adding a link in the startup folder (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup).
|
|
|
|
|
no your screwed, close your computer, take out the hard drive
open your hard-drive and throw away the cover( this is what makes computers lag!!)
then take out the RAM and place a hot dog in there. Pour water into the cooling fans, turn it on and BAM!!!
faster computer along with the use of the program in all users
YOUR WELCOME!!!!
|
|
|
|
|
How i can do this by coding automatically when program setup
|
|
|
|
|
Add a link in the startup folder, you'll find that in the category "file system" in the setup project.
|
|
|
|
|
I agree with others with either using the Registry and StartUp folder. However, there is also one more alternative if not more to consider. Why not try creating a Service?
Here is an article to get you started. MSDN: Walkthrough: Creating a Windows Service Application
Once that is done you can go to the Component Services and set the application to start once the computer has turned on. There is also very cool recovery options. (dcomcnfg)
Hope this helps!
|
|
|
|
|
Services shouldn't be interacting with the desktop, so not a great idea for a "form" app
Mark Salsbery
|
|
|
|
|
Depends Mark upon what the developer is trying to achieve. Hence, the reason why I chose the suggestion icon. Just another option to consider that's all I was trying to get at. I don't know the specifics of what the developer is hoping to accomplish with the "form" app.
Thanks for the feedback.
|
|
|
|
|
Under Windows 7, a service cannot display a Form for security reasons. Well, it could, but at best, it'll show up on a seperate Desktop and the user would be informed that a service is showing something that might need the users attention. If OK'd, it would switch Desktops. This is not something I would use in a production app at all.
|
|
|
|
|
The answers here have assumed that you want your application to open automatically when Windows is started.
I am wondering if what you are really asking is: how do you open your application when a file with the unique extension you are using for files you save is double-clicked ?
Please clarify your question.
thanks, Bill
"... Sturgeon's revelation. It came to him that Science Fiction is indeed ninety-percent crud, but that also—Eureka!—ninety-percent of everything is crud. All things—cars, books, cheeses, hairstyles, people and pins are, to the expert and discerning eye, crud, except for the acceptable tithe which we each happen to like." early 1950's quote from Venture Sci-Fi Magazine on the origin of Sturgeon's Law, by author Theodore Sturgeon: source Oxford English Dictionary on-line "Word-of-the-Day."
|
|
|
|
|
Venerable coders,
How do I connect a key press in a console window to event code?
All I've found on a search, thus far, is to put the Console.Read() statement in a loop to catch a key press --non-acceptable.
Please share.
Koodos, AZdon
|
|
|
|
|
|
The console does not have the concept of a message queue, so it doesn't really handle events - the only event it publishes is CancelKeyPress[^]
However, there is a way to do more. See this article: Console Event Handling[^]
Be warned though - it's not for beginners!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Thanks for that respectable and most helpful link, Sir Griff.
|
|
|
|
|
|
hi all. I'm new to serialization and i cant understand something.
i read this article:
Introducing Serialization in .NET[^]
when do i need to use theSerializationAttribute , meaning when do i need to write [Serializable] above a class ?
i found an example for XmlSerializer and no [Serializable] tag was needed to serialize and DE-serialize all the classes there.
another thing i cant understand or find any doucimentation is HOW serilization really works. how is the magic of object to strean and vice versa works.
can any one give an hand to a fellow programmer ?
thx
|
|
|
|