|
You've asked this question before, gotten a bunch of answers, and chose to ignore them.
You're already been told - in order to run an application at Windows startup, you'd have to write it as a Windows Service.
|
|
|
|
|
You have to write a Windows service.
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
When creating a shortcutkey, an error occurs with single keys like ‘f’ or ‘w’ , etc. I don’t have a problem with not using these but I can’t find any rules. Is there a list on valid shortcut keys?
Thanks
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
Because you must select a combo (e.g. Ctrl+F or Ctrl+Alt+W), not a single key. Single keys will interfere with standard functions within your application, like typing.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Im using something called syntax high lighting textbox library in one of my project. To be able to easily highlight syntax, i wrote this lil code:
<br />
TextReader syntax_blue = new StreamReader("synHighLib_DB/blue.txt");<br />
while (syntax_blue.ReadLine() != null)<br />
{<br />
shtb.HighlightDescriptors.Add(new HighlightDescriptor(syntax_blue.ReadLine(), Color.Blue, null, DescriptorType.Word, DescriptorRecognition.WholeWord, true));<br />
}<br />
syntax_blue.Close();
It compiles properly, but when i start typing into the text box, i get the unhandled exception error. Im 100% sure this is the code that causing the error, because, when i remove it, it works fine...
|
|
|
|
|
Posting the exception you're receiving would be very helpful, but it looks like you're calling ReadLine twice without any assurance that you have two (or a multiple of two) lines to read. Readline is going to advance the cursor each time it's called.
Additionally, if the code above is inside an error handler, I would point out that it might not be the best choice to open and parse a text file every time a key is pressed.
Finally, a TextReader is a disposable type, so I would recommend either inserting a Try...Finally block or, better, a using (TextReader syntax_blue = ...) block instead.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
I need to obtain all of the bookmarks within a Word document using late binding. I have easily done this using early binding. However, I am having some trouble with the former. I know how to open and write to a file. I have the framework developed. Any help on returning the collection of bookmarks using this method would be much appreciated.
Thanks
P
|
|
|
|
|
I'm trying to use the FolderNameEditor in a property grid. Like this:
[Editor(typeof(System.Windows.Forms.Design.FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
But it seems that FolderNameEditor is not in that namespace. Although all the documentation that I've seen says that it is. I'm using VS2005 and the 2.0 framework.
Can someone tell me where this editor is?
|
|
|
|
|
hi
add a reference to:
System.Design.dll and System.Drawing.Design.dll
regards
|
|
|
|
|
Hi,
Thanks, that's it.
I had System.Design and System.Drawing (which should have been System.Drawing.Design).
RS
|
|
|
|
|
For the project I am working on, if I cannot find an image, I am going to write the image name to the picturebox instead. However, there doesn't seem to be a straightforward property (like "Text") that I can use. Is there an easy way to do this?
|
|
|
|
|
Andrew Stampor wrote: Is there an easy way to do this?
Define easy
One way would be to replace, at run time, the picture box with another control, like label, that has a text property.
To keep the picture box you would need to create an image and write the text on to it, then assign it to the picture box. There numerous examples of how to do this.
only two letters away from being an asset
|
|
|
|
|
You can place a label over a picturebox and change its visibility according to existence of picture
|
|
|
|
|
picturebox.visible = false;
label.visible = true;
This essentially replaces the picturebox with the label control.
only two letters away from being an asset
|
|
|
|
|
I only have access to the picturebox itself. Using a label would be a good way, but I cannot rely on it.
I think I will try to override the OnPaint, but it seems like more trouble than it should be.
|
|
|
|
|
Andrew Stampor wrote: I only have access to the picturebox itself.
You can override the OnPaint event but you can't place a label control on the form?
only two letters away from being an asset
|
|
|
|
|
The picturebox is inherited from and extended. I do not know which form(s) it will necessarily be on. I was able to take care of it with OnPaint. Thanks for your help, guys.
|
|
|
|
|
you can use a label as a pictureBox so catch two birds in one hand
|
|
|
|
|
Yes, create a bitmap, draw the string onto it, and put it in the picturebox.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Bitmap bm = new Bitmap(@"C:\YourPicture.bmp");
Graphics gr = Graphics.FromImage(bm);
gr.DrawString(""test", new Font("Verdana", (float)10, FontStyle.Bold, GraphicsUnit.Pixel), new SolidBrush(Color.Red),(float)20, (float)20);
gr.Dispose();
pictureBox1.Image = bm;
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hello All,
I have good knowledge of Visual Basic, but coming project is in C#. If anybody can give some urls for tutorials or samples it will be helpful.
Thanks in advance.
Thanks & Regards,
Kumar
|
|
|
|
|
|
If you already have a background in VB then try just reading the spec at:
CSharpSpecStart
As far as book, I liked Apress' Pro C# 2005 and the .NET 2.0 Platform. I think it is a great book for those who already know programming but don't know the C# lanagauge.
|
|
|
|
|
Hope this[^] link will be more Useful when you wnat to learn C#.
Regards,
Satips.
|
|
|
|
|
Hello All,
Thank you very much for providing some useful urls.
Thanks & Regards,
Kumar
|
|
|
|