|
oh... How can i implement this functionality into my own RTB control, i dropped into the form?
Im fairly new to C#, I've never done anything like this before and haven't seen any tutorial on this, so i haven't got any clue how to do this.. im stuck
|
|
|
|
|
You go over the code that's in that project and see what you need to do to convert it. Don't ask me, or anyone else here, to do it for you. The amount of space required to explain everything you need to do would take up a small book.
Why do yo uhave to add this to a stock RTB control? Why not just use the control in the project, altered to your formatting requirements? It'd be much simpler, but still too much to put into a forum post.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Yes, you need to REPLACE your control with the control provided in the article. All of your existing functionality should be preserved since the control in the article inherits from RichTextBox.
Take note of the comments in the article, several of them have performance improvements that are very, very necessary. I've incorporated the control in that article into one of my projects and it's basically worthless without the improvements.
------------
Cheers,
Patrick
|
|
|
|
|
Hi, im not speaking of opening a file in the program and reading it, im talking about opening the file in windows, running the standard application to open it.
So question is where do I get the Name of the Program associated with a file-Extension? When i have that, i could use Process.Start().
Is there a way to do what i want in C#?
Thanks for any help
|
|
|
|
|
Send it to Process.Start and it shall do it.
|
|
|
|
|
All you have to do is start the data file. You don't need to know the name of the application associcated with it. If you use ShellExecute, it'll launch just like you double-clicked the file itself.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Thanks for the answers.
What is ShellExecute()? Where do I find it?
If I use Process.Start(), i get an Exception when there is no program associated with the file.
Is there a possibility to get all programs associated with an extension?
|
|
|
|
|
Ehh, Windows is telling you that no program is associated with the file, hence your list of all programs associated with an extension is... well... empty
|
|
|
|
|
I would like to have a list of all programs associated with an extension, so that i can display a quick list in a contextmenu (like in windows-explorer).
|
|
|
|
|
You're looking for the Process[^] class. UseShellExecute is a property of the ProcessStartInfo class that is used in the Start method of Process.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
But what is the difference when UseShellExecute is true?
And IS there a possibility for me to get a list of each program associated with an extension?
|
|
|
|
|
c.bartsch wrote: But what is the difference when UseShellExecute is true?
If you don't turn ShellExecute on you have no choice but to launch an actual executable file, not a document file.
c.bartsch wrote: And IS there a possibility for me to get a list of each program associated with an extension?
Sure, you have to parse all of the the registry keys under HKEY_CLASSES_ROOT to get the various pieces of information you need. The problem with this is that there isn't one method, or one location under every key that gives you this information. Various things have to be parsed and other values chased down and followed to find all the information. This is NOT a good idea.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi
I have developed one windows application ( it is testing application) which is used to test real hardwares.. it has lot thread running in the background that will constantly monitor the hardware communication. Also my application is an touch screen application, so i have used lot of images for buttons. I am facing sometimes the Application is hanging after i ackwnoledging message box during application execution.
During that time... CPU is 100% utilized.. i think if the memory is full..... button click events will not be handled.. (but at that time i could able to open/close other applications )
So how to make my application is very effect in order to avoid these situations. I have tired GC. Objects.Dispose().. but still the problem is there
I am going to try ngen.exe!
any ideas or thoughts are welcomed!
Thanks
srini
|
|
|
|
|
Most likely you have a loop somewhere that is taking some time to execute. Of if it isn't a loop it is just a long running process. Usually when I hear cpu 100% I think of a loop going out of control. Anyway, I would look for something like that. Next you if you do have a long running looping process you can every ten loops or every 100 loops do an Application.DoEvents() This will allow the processing of click events and refresh the form.
Hope that helps.
Ben
|
|
|
|
|
hi all
i made double buffering in a form with
this.DoubleBuffering = true;
but this is not working in the tab so i wanna to know how to make double buffering by using Bitmap to enhance performance by drawing in memory as bitmap and then draw my background in the bitmap and draw bitmap again to the screen
can any one tell me how to begin search how to use this technique
thanx
Generator
|
|
|
|
|
I think SetStyles is the method you call, turn on double buffering and all drawing in WMPAINT.
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 )
|
|
|
|
|
hi,
i tried this but the tabPage doesnot contain method setStyle
iam making a method now to use BufferedGraphics,
BufferedContext,BufferedManager
to draw to buffer then draw to TabPage
but iam still trying this and also if there is any method easier
thanx
Generator
|
|
|
|
|
public void tab_Paint(object sender, PaintEventArgs e)
{
TabPage tab = (TabPage)sender;
BufferedGraphicsContext context;
BufferedGraphics buffer;
// context = BufferedGraphicsManager.Current;
/// Dedicated context
/// used when highly animated graphics
context = new BufferedGraphicsContext();
Graphics grfx = tab.CreateGraphics();
buffer =
context.Allocate(grfx, tab.ClientRectangle);
drawSurfaceToBuffer(buffer.Graphics);
buffer.Render(grfx);
buffer.Dispose();
grfx.Dispose();
}
public void drawSurfaceToBuffer(Graphics bufferGrfx)
{
/// some processing that used the buffer grfxs
}
this code i understand it from MSDN and write it to reduce Graphics Flicker but it does not make any thing at all also it make my background of tabpage black and the original is white
is there any suggestions please
Generator
|
|
|
|
|
Hi friends.
I want to make something like a blog which people can see the posts and send a comment...
others can also see comments ...each post of the blog should have a different commenting page.
I know how to write the code for posting ... but I dont have any idea about commenting.
I want to write the code for posting with datagrid ...
but how to write the code for comment ? please tell me and give me idea.
each post is shown in a row of a daragrid,one aftar each other.
but where should I put the commenting link ? in the datagrid ??
I want to have the commenting link under each post and by clicking the link,people
redirect to another page for sending the comment to that post.
how should I do it?
thank you so much
|
|
|
|
|
There are many pieces of open source blog software. Why not look at the way they work?
|
|
|
|
|
tell me one of the open sources please...
I want to try it my self but if you know any open source which I can understand it,plz tell me
thanks alot.
|
|
|
|
|
sanaziuse wrote: tell me one of the open sources please...
Subtext is the name of one open souce blog software.
|
|
|
|
|
yes thank you but ay other ideas to write it myself?
please read my first questio and help me ...
bye friends
|
|
|
|
|
sanaziuse wrote: but ay other ideas to write it myself?
That would take too long in a forum post. That is why I suggested that you read the source code in an open source project.
sanaziuse wrote: please read my first questio and help me ...
I did as best as can be done in a forum post. The quantity of information that would need to be imparted to you is too much for a forum. Please download the code for blog software and read it.
|
|
|
|
|
You're asking far too much here. If you really have no idea how to start, then give up ( for now ) and learn through a simpler project. Buy a book and work through it.
You're essentially asking us to write it. Get to a point of being able to try, and ask specific questions, and we'll be glad to help.
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 )
|
|
|
|