|
Hi,
this may or may not help you out:
- get the screen coordinates "RECT" of the Form
- perform Graphics.CopyFromScreen for that RECT to get bitmap1
- hide your Form
- perform Graphics.CopyFromScreen for that RECT to get bitmap2
- show your Form
- now calculate difference of bitmap1 and bitmap2 by comparing all pixels; if you find major regions that didn't change, those were/are covered by something else.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
Is it possible to add, edit, view and delete records using a file only (instead of a database) and .Net 2005 (VB.Net/C#)?
The concept is that a file that'll work more-or-less like a database. One can add, edit, view, delete and query data to and from the file. The file, either cannot be opened directly or data inside the file should be in some encrypted form so that even if the file is opened no one can comprehend it. Data inside the file can only be manipulated by a front end application i.e. .Net 2005.
If there's some methodology like this then please refer me some links to tutorials and whitepapers.
Thanks in advance.
|
|
|
|
|
Yes it is possible, but the question is why would you want to? A database is specifically designed and optimized for such interactions. A file is not. You have to deal with read/write synchronization and locks, IO performance, multi-threading, etc.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I know the database stuff but there are certain small scale projects for which setting a database is a headache and more than it's required. I've seen certain projects where they have used such methodology instead of the database and it's working well, fulfilling most of the database features. Moreover in certain scenarios using a database is more costly. If all my requirements can be fulfilled with file handling method avoiding the database, in that way the system cost can be cut a lot. So I would request you to kindly refer me certain tutorials as I'm badly in need of it. Thanks.
|
|
|
|
|
priyamtheone wrote: If all my requirements can be fulfilled with file handling method avoiding the database, in that way the system cost can be cut a lot.
Not likely. You will spend more time and money designing a file based system that is not maintainable or extensible. You will then spend more time and money to upgrade those applications when the file based system fails to meet future growth or performance goals for the application. Yeah, yeah, but this is a simple app and it won't be extended. Heard that before.
priyamtheone wrote: there are certain small scale projects for which setting a database is a headache and more than it's required.
SQL Express is free and easily configured. Creating a simple database table is far less time consuming than creating a file based system. There are also a plethora of frameworks and tools to make database access extremely simple with no code necessary in some cases.
On the other hand, you have to design and create a file base system to handle all of the concurrency issues, IO concerns and a multitude of other issues that would be necessary for a robust application. How is this less hassle?
priyamtheone wrote: I've seen certain projects where they have used such methodology instead of the database and it's working well, fulfilling most of the database features.
Then refer to them
priyamtheone wrote: refer me certain tutorials as I'm badly in need of it.
You're more in need of education on software design and implementation.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I have seen a file based database. And that is .MDB. That is Accsess database. A long time ago I used JET 4.0 to accsess it. This kind of database is perfect for Application database, where there is only one user that is accsessing it. But Accsess database in a large scale application is usaly useless
|
|
|
|
|
I agree with Mark's comments, but if you really want to do it this way then in memory XML documents will do the job. Decrypt/Encrypt the XML string (the file contents) when reading/writing the file. Working with the XML is then trivial.
This will only be suitable for small amounts of data as it going to have to reside in memory so will be limited to the the amount of RAM that you think will acceptable for your application to use.
|
|
|
|
|
plz tell me code in C# to convert urdu language in english language through uni code..
|
|
|
|
|
roheen wrote: plz tell me code in C# to convert urdu language in english language through uni code..
string english = ConvertFromUrduToEnglish(urdu);
The detail I leave up to you!
Seriously, you can't just a few lines of code to convert from any language to any other (except possibly DalekDavian to DrunkenRamblings at any time after 10pm). It is not just a case of converting Urdu (Arabic) characters to English characters - you would get total rubbish, rather than readable English.
All those who believe in psycho kinesis, raise my hand.
My 's gonna unleash hell on your ass. tastic!
|
|
|
|
|
OriginalGriff wrote: DalekDavian to DrunkenRamblings at any time after 10pm
Fived!
|
|
|
|
|
OriginalGriff wrote: DalekDavian to DrunkenRamblings at any time after 10pm
that does not need a conversion, it is a mere cast.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
Do you realize the time and effort needed to create that library? No one is going to do that for free. Either make use of the commercial products and services available or pay someone to do this.
"No matter how many fish in the sea; it will be so empty without me." - From song "Without me" by Eminem
|
|
|
|
|
Dear all,
I want to select the second word only in a richtextbox control on a form.
I mean if i have text like "word word word" in richtextbox i want to select the second word only.
Any suggestions??
Thanks and best regards
|
|
|
|
|
If all three words are "word", how do you know you selected the desired word?
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
each one has id. i.e if i said id=1 then select the first word only, if i said id=2 then select the second word only and so on.
|
|
|
|
|
He's going to spell the one in the middle wrong.
All those who believe in psycho kinesis, raise my hand.
My 's gonna unleash hell on your ass. tastic!
|
|
|
|
|
Split the string by " " (space) and select the second value
Dollartegn 8D
|
|
|
|
|
The issue is how i will select the second "word" ONLY, when i say id=2, OR select the third "word" ONLY, when i say id=3, if i have in my richtextbox string like this "word word word word word word word word word word word"
|
|
|
|
|
DudeJuan already answered your question
something like:
string[] words = richTextBox1.Text.Split(" ");
string secondWord = words[1];
It works for your example.
But there are more separators than just space.
There's also ".",";","," and many other words separators.
|
|
|
|
|
I understood this but what i want exactly is the selection operation in the richtextbox.
How i will find and select the second "word" only without select the first occurence of it
|
|
|
|
|
well you need to find the location of the second " " in the text as well as the loacation of the
third " " and then use the
richTextBox1.Select(StartPosition, Endposition);
Here are the steps:
-find the start position of the nth word
-find end postion of the nth word
and select it.
How you do that it's up to you. If it's just spaces that separates your words, then it's quite simple.
id=3 => third word
for(int i=0;i<(id-1);i++)
{
startPos+=words[i].Length;
}
if(id>2) startPos+=(id-2);
for the endPosition:
endPos = startPos+(words[id-1].Length);
Hope it helps
|
|
|
|
|
YES IT HELPED
THANK YOUUUU VERY VERY MUCH
MOS DAN
|
|
|
|
|
|
salamonty86 wrote: YES IT HELPED
So give a vote on the answer!
Then we can all see at a glance that there is a response that was useful
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Ok Sorry for being late
|
|
|
|