|
Now I read it too . But there are many places where they say SP are faster and I tend
to belive them. I'm no SQL guru but this is how I think of the process:
1) NO SP: => the SQL engine recieves a string/guery that needs to be compiled. So it compiles the
string query and then it performs the actual query
2) SP: => it directly executes the query
|
|
|
|
|
Hi All,
Its been quite a long time since I am stuck with this problem. I am writing an application in which user selects a portion of picture box and rest part (apart from selection) is filled with white color.
Now Problem is that FillRectange fill area more that what is selected. For example here is code to fill from 0,0 of image to first node of rectangular selection:
private void picItem_MouseDown(object sender, MouseEventArgs e)<br />
{<br />
if (e.Button == MouseButtons.Left)<br />
{<br />
_selecting = true;<br />
_selection = new Rectangle(new Point(e.X, e.Y), new Size());<br />
}<br />
}<br />
<br />
private void picItem_MouseUp(object sender, MouseEventArgs e)<br />
{<br />
if (e.Button == MouseButtons.Left && _selecting)<br />
{<br />
Rectangle cropRect = _selection; <br />
<br />
using (Graphics g = Graphics.FromImage(picItem.Image))<br />
{<br />
g.FillRectangle(Brushes.White, new Rectangle(0, 0, _selection.X, _selection.Y));<br />
}<br />
<br />
picItem.Refresh();<br />
_selecting = false;<br />
}<br />
}<br />
<br />
private void picItem_MouseMove(object sender, MouseEventArgs e)<br />
{<br />
if (_selecting)<br />
{<br />
_selection.Width = e.X - _selection.X;<br />
_selection.Height = e.Y - _selection.Y;<br />
<br />
picItem.Refresh();<br />
<br />
lblLocation.Text = "Height = " + _selection.Height.ToString() + ", Width = " <br />
+ _selection.Width.ToString();<br />
}<br />
}
Can anyone tell me why this is happening please?
|
|
|
|
|
Without actually running it it is difficult to tell, but:
1) When you show code fragments, enclose them in <pre></pre> blocks (use the "code block" widget) when you paste them - this preserves the formatting, and makes it easier to read.
2) Try bracketing your if clause - it would make it more readable, and may cure the problem.
if (e.Button == MouseButtons.Left && _selecting)
becomes
if ((e.Button == MouseButtons.Left) && _selecting)
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
Ok, thanks.
Once again here is scenario:
1) A form with a picture box and image is loaded in picture with StretchImage mode.
2) For time being to solve this issue I want to fill picture box from 0,0 to point where use clicks.
But area filled is little greater then where it is clicked.
|
|
|
|
|
Oh, I see! Do you mean area filled is little greater one pixcel bigger than where it is clicked?
If so, then it is obvious: DrawRectangle paints from Point(X, Y) to Point( X', Y') inclusive
Change
using (Graphics g = Graphics.FromImage(picItem.Image))
{
g.FillRectangle(Brushes.White, new Rectangle(0, 0, _selection.X, _selection.Y));
} To
using (Graphics g = Graphics.FromImage(picItem.Image))
{
int X = _selection.X - 1;
int Y = _selection.Y - 1;
if ((X > 0) && (Y > 0))
{
g.FillRectangle(Brushes.White, new Rectangle(0, 0, X, Y));
}
}
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
Hi.
I'm gonna insert a large mount of data in a ListView in VitualMode.
I have set the VrtualMode property to true :
listView1.VirtualMode = true;
Now,whenever I'm gonna add an item to the listview ( listView1.Items.Add(newItem); ) ,
I receive this exception :
When the ListView is in virtual mode, you cannot add items to the ListView items collection. Use the VirtualListSize property instead to change the size of the ListView items collection.
Would you please guide me, how I can resolve it ?
Thanks.
|
|
|
|
|
I think the exception is saying that you need to specify the virtual list size.
listView1.VirtualListSize = 1000;
Once this property is set then I think you should be able to add new items.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
|
Hi All,
Do we have DirectX support in C#.Net?
If not ,do i need to install latest Directx SDK?
Please advice.
Regards,
Ashwath
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:55am.
|
|
|
|
|
Thanks....
I went to the references,from there i found the following references,
Microsoft.DirectX.Direct3D
Microsoft.DirectX.Direct3DX
etc...
Does the availability of above references mean that when we install .Net framework in the computer,that time itself the references are added and i do not need to install the directx SDK.
Please clarify,
thanks,
ashwath
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:54am.
|
|
|
|
|
Does DirectX libraries get installed when we install Microsoft Visual Studio 2008?
|
|
|
|
|
No. It's a separate SDK that you have to download and install manually.
.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
|
|
|
|
|
Hi,
We have developed C# windows base application , we would like to make the UI
more posh with some graphis for all controlls at the same time we dont want
to use any third party controls to bring this. Does .Net Framework - 2005 or 2008 and C# supports this, if so how can i bring up galssy look for my UI.
we are using C# 2008 Express edition for development.
Thanks
|
|
|
|
|
sjs4u wrote: Does .Net Framework - 2005 or 2008 and C# supports this,
Yes. But you need to create custom controls and draw yourself on the screen. This is not a trivial task. If you can use WPF, you will get shiny UIs.
Best wishes,
Navaneeth
|
|
|
|
|
WPF can provide some good UI effects.
If you are still in the initial stages of your project, you can consider WPF as an option for your UI.
There are only 10 types of people in this world — those who understand binary, and those who don't. |
|
|
|
|
|
Hi my friends .... I have been hacked my email address 2wice .... at first i just used some questions ... like what was your Pets name & like ... & i got it .... but this time even this one doesnt work ... i.e the hacker changed my question too ........... and i heard that there are softwares that retrieve my email account password ......... but they are too expensive for me ....... So any know how to retrieve my password by just writing C# code .... plz help me ... or if there is any software point me ....
Thank you.
|
|
|
|
|
No, there isn't.
It sounds like you're not in control of the server, so you're going to have to do what everyone else does, and call tech support.
|
|
|
|
|
Thanks for your help.. But what i lost is on my yahoo account .... and i heard that there are so many softwares that are being sold online.... didnt u heard about them? .... so what am saying is instead of buying that i can write my own software using C#.. bcoz it is costy for me to buy them
Thank you.
|
|
|
|
|
Noone here is going to help you hack your own Yahoo account. End of story.
Why? How do we know it's YOUR Yahoo account and not someone elses??
Have I heard of such tools - no, and do not care to, for obvious reasons.
Call up Yahoo and get it reset, legitimately, and it doesn't cost you anything.
|
|
|
|
|
hey ppls ... do u think am dumb!!!!!!!!!! ....... do u think i post a question to hack ppls account ........ @ least tell me other ways to get my account back .... as i told u ppls even my secret questions doesnt work .......... that is the reason i come here and ask u guys .... pllz help me .... I cant contact ma families and friends .......... and How can I call yahoo and reset my account with out no cost???? ... if it is possible too ... still help me
Thank you
|
|
|
|
|
Who's fault is it that you create remember your own security question answers??
If you can't call them, ever hear of "email"? Create another account, since they're free!, and email Yahoo's support and ask them.
Again, there is no tool to do what you want. If you believe there is, try sending them money for it and watch what happens!
|
|
|
|
|
Your argument is invalid, Yahoo has a process to recover password by simply answering the security question provided.
So we're only left with you asking for help hacking accounts. GO AWAY! You'll find no help here.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Request to remove this poor child from this honorable forum.
|
|
|
|