|
Has anyone ever tried to use the Text Object Model[^] with a RichTextBox? Personally, I like the TOM much more than the manipulations allowed through normal interaction with the RichTextBox but I just can't seem to find any way to get to ITextDocument in .NET.
Has anyone ever attempted this before and lived to tell the tale? I doubt that I'm the only person who ever wanted a DOM for rich text in a .NET app...
|
|
|
|
|
There's an article here on CP that might help. This is the link Clickety[^] to the message that talks about using ITextDocument.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks! Seems just what I need.
|
|
|
|
|
Hello All !!!
Tell me please - how in .NET 2005 set total control for mailslot (function CreateMailSlot) for everyone.
Is it necessary set DACL in null ?
I am trying but there is no results...
If anybody uses securuty in .NET 2005 please help
|
|
|
|
|
Hi there,
I just wanted to know whether it was possible to create postscript file from doc, xls and ppt using .net framework. I am going crazy trying to find answer to this problem so at this point any help would be greatly appreciated.
|
|
|
|
|
Well, no. .NET cannot write a postscript file using built in libraries, nor can it read Office docs without the Office toolkit also installed.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
So if this is not possible using using .net framework's built in library. Is there any other way this can be done.
|
|
|
|
|
Hi Friends,
In my project i set the session expire after 20 min. But it donot take that much time, the session is expiring with in 5 min or 10 min or expiring when am working on it, can anyone tell what i can do for solve this problem?
thanks & rgds
Nithin
|
|
|
|
|
Nithin Krishna wrote: In my project i set the session expire after 20 min. But it donot take that much time, the session is expiring with in 5 min or 10 min or expiring when am working on it, can anyone tell what i can do for solve this problem?
I had a similar problem in one of site.It was caused by too much stress on the domain. This could be one reason your session is expire before 20 min.
Other reason could be configuration setting in the web file.
|
|
|
|
|
this happens only when there is lot of data to be loaded in the page.Simplify the queries and use stored procedures.
cheers
sangeet
|
|
|
|
|
I have my C# project which runs on a PDA device. How to I check on the device which version of OpenNetCF it is using.I mean which file to check for and on which location on the PDA? Or is it only on the local machine on which I compile my code. But I see that a code which I have compiled on my machine, runs well on one PDA, but does not on the other PDA and gives the following exception
"An unhandled exception of the type 'System.MissingMethodException' occurred in System.Windows.Forms.dll"
|
|
|
|
|
Hi All,
Many times I miss to follow good practices for .net development.
I have started collecting a list BEST Practices for .net development or in short a check list on .Net code for optimization to improve my .net development.
For example, Should I use Data List, Data grid and Data Repeater for displaying the data to user where I believe Data List is more efficient way for display data.
Could you please recommend me is any website or any book or a check list which contains Best Practices for .Net.
Thanks & Regards,
Vijay Kulkarni
|
|
|
|
|
|
i want to do real time simulation with WPF.how can i do it?
|
|
|
|
|
That depends entirely on what your simulating and your ability to code it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I concur with Dave.
Obviously a 2 GHz Pentium cannot simulate a 3 GHz Pentium in real-time.
I managed to simulate a 16MHz microcontroller at quarter speed on a 2GHz Pentium tho,
using C# code on .NET 1.1; this means I needed some 500 Pentium cycles to simulate one
target cycle.
The reason for such a factor should be clear: the simulator has to do sequentially
what a microprocessor is capable of doing in parallel (a lot of the chip's hardware
can work in parallel), such as:
- memory translation
- memory protection
- code fetch
- instruction decoding
- operand fetch
- ALU simulation
- flags adjustment
- peripheral processing (e.g. timer countdown, and occasionally interrupt vector
prioritizing and vectoring).
The most costly items in the list seem to be instruction decoding (a switch does not
come cheap) and flag adjustment (setting the zero, negative, carry, ... flags is
not cheap especially without using assembly code).
Since this was one of my first major apps in C# it is conceivable I could revisit
and somewhat improve the performance, but I dont expect that to be very much.
My simulation included ALU, memory and simple peripherals, targetting exact register
and memory behavior, but not exact timing simulation. If you want cycle accurate
simulation be prepared to add some code and get a slower simulation...
Hope this helps.
Luc Pattyn
|
|
|
|
|
i ll control mechanic robot arm.and i ll control it by visual c#.like this:
visual c#---microcontroller------motordrivers---and i ll feedback from motor axesses than i ll send them to visual c# again.
second part of my projects is that i ll do real time simulation.i must model robot arm and it ll get my angle variables from outside and it ll be rotate according to my variables.how can i do like this simulation?what kind of way can be easy for me?
thanks for your kindness
|
|
|
|
|
Hi,
I am not sure this is simulation.
To me simulation is calculating somethings behavior based on a mathematical model, without
having the actual object in existence, or without having it provide information
(such as measured position, angle, velocity, ...)
What you describe sounds more like visualisation: again you create a mathematical model
but now you let it mimic the observed behavior of the real object, by taking
measurements and feeding these in your model.
Anyway I think you can do this in C# (or another hi-level language) like so:
1. create a form with a Panel (for some reason I prefer drawing into a panel);
in the end you will want that to be a double-buffered panel (NET 2.0 knows about
that, under 1.1 you need to derive from Panel and use SetStyles)
2. create some classes that represent parts of the robot arm (upper arm, under arm,
wrist, hand, ...); let them all inherit from a base class "Part".
3. create the model by instantiating the above classes and keep all those instances
in an ArrayList "myModel".
4. give each part class a Paint() method that paints itself in the Panel, so your
entire drawing could consist of foreach(Part p of myModel) p.Paint();
5. introduce a coordinate system (say xyz)
6. assume all angles are known (from measurements)
7. all parts have known lengths and one has a known position; all the others
can be calculated provided you know the direction; some math is involved here.
8. create a periodic timer (I would suggest a Forms.Timer) that iterates over your
model, so it:
- performs all measurements
- recalculates all positions
- redraws the entire model
Real-time aspects:
- the position calculation and drawing seems rather straightforward, they wont
hamper a smooth display
- the most critical part AFAIK would be performing the measurements and getting them
into the PC. You should try to evaluate the time it will take to do all measurements once
before developing all the code, since that may prove it is not possible to get
enough iterations per second, and/or you have to change your micro-to-PC communication
and/or you have to introduce threads (plus the problem that not all measurements
belong to the same point in time).
BTW: you will have noticed I didnt model any motors, the above just knows
positions/angles and visualizes everything.
Hope this sets you on the right track...
Luc Pattyn
|
|
|
|
|
Hi,
I am using checkboxlist in one of my projects.
I want to write a javascript function to validate the numbers of elements selected in this list.
So how do I access this checkboxlist in javascript
Regards,
Uma
|
|
|
|
|
document.getElementById(<checkbox name="">) should work
|
|
|
|
|
Hi all,
I built a client \ server chat.
Both server and client are 2 programs which are on 2 home computers.
1 computer acts as the server (... Sockets.TcpListener ...) the other is the client who try to connect.
i want the server side will be in a remote server and not in home computer.
does web service is the place to put the code?
to start the listen im using a thread:
listenerThread = New Threading.Thread(AddressOf DoListenServer)
listenerThread.Start()
how should i start these lines in the web service?
Once i start listen thread ill not be able to kill thread if it is in a remote server and not home computer.
what is the way to communicate between clients handing by server where it is a remote server?
|
|
|
|
|
A Web Service is not really a good candidate for a chat server. It's possiblt, but you'll have to rewrite large portions of your server and client apps.
If your server is already written properly, you should be able to put it on any machine and run it without modification. All you need to do is supply the client app with the IP of the server running the server app.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi all,
I built client server application which using tcp protocol
example code :
listener = New Sockets.TcpListener(System.Net.IPAddress.Any, PORT_NUM)
If im the server and I behind router, i cannot communicate with a client side only if i open a port in my router.
I wonder how all multiplayer's games work if no one needs to open any port?
Can it be the server side is a not at home computer but a real server that control many clients?
Should i need to run a thread in the server that manage all players (all players are the clients?) ?
if this the way (using a thread that always run in the server and manage all players from home computers which are the clients)
What will happened if the thread stuck or the server shutdown, this will kill all users(players).
Ill appreciate any help building multiplayer's gaming manage by server side (or any other good technology for multiplayer's)
|
|
|
|
|
Hi,
If a machine has multiple versions of .NET Framework installed say 1.1 and 2.0. Further still if there are .NET assemblies that are built on both flavours. And if we have a mix of ASP.NET pages that are written in 1.1 and 2.0. I presume that all pages are hosted as one application.
1)where would you ideally place the version specific assemblies.
2) Which version of the web.config would you deploy on the web root, since i understand they are different between 1.1 and 2.0 ?
3) Is it a fair statement that if there are some ASP.NET 2.0 specific pages then deploy them in a different folder that has 2.0 specific web.config ?
4) Would there be issues if we host this on IIS 6.0 since the same application pool cannot process multiple .NET Versioned components. Refer http://dotnetmystery.blogspot.com
Rajaraman.S
|
|
|
|
|
Rajaraman Soundararajan wrote: And if we have a mix of ASP.NET pages that are written in 1.1 and 2.0. I presume that all pages are hosted as one application.
It was looking good up to here.
Only one version of ASP.NET can be registered with IIS. There is *no* way you can say that different pages within the one site are different versions, and apart from that, you can only run one version on a web server at a time.
What you want, can't be done at all.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|