|
Hi cshivaprasad!
If you're inherting from a form, add these lines of code to your constructor.
SetStyle(ControlStyles.ResizeRedraw, true);
this will automatically repaint your form when it's resize.
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
this will prevent the flickering of your form.
hope these help!
microsoc
|
|
|
|
|
i build something like a search function.
but he doesn't fill my parameter
the parameter does get a value.. but when he should put it into my select command he give the error:
No value given for one or more required parameters.
so..
this is a little peace of my select command
<br />
WHERE (T075_BORGTOCHTNUMMER_1 LIKE VAL)<br />
en this is my code that should fill the parameter "VAL"
<br />
<br />
string val;<br />
<br />
if (textBox1.Text != string.Empty)<br />
{<br />
val = textBox1.Text;<br />
}<br />
else<br />
{<br />
val = "%";<br />
}<br />
<br />
this.dBANBM_T075_BORGTOCHTTableAdapter.Fill(this.testdb1DataSet.DBANBM_T075_BORGTOCHT);<br />
hope some one can help or give some advise
|
|
|
|
|
It depends on what database you use, but normally you can create commands like this:
SELECT * FROM DBANBM_T075_BORGTOCHT WHERE Id = @Id
And insert parameters into the command like this:
SqlCommand cmd = new SqlCommand(query,connection);<br />
<br />
cmd.AddParameterWithValue("@Id",1);
Be adviced: I do this without the help of a little intellisense
So the syntax of the AddParameterWithValue may vary.
WM.
What about weapons of mass-construction?
-- modified at 3:33 Wednesday 10th May, 2006
For an access database the parameters have a questionmark as placeholder and are position dependend.
|
|
|
|
|
i use a access database and soon i will use a oracle database.
but what do you mean with "are position dependend"?
|
|
|
|
|
If you have
INSERT INTO Tbl (Id,Value) (?,?)
The first parameter to add has to be the parameter that is first mentioned in the command. You cant first add the parameter for the Value and the parameter for Id after that.
WM.
What about weapons of mass-construction?
|
|
|
|
|
oh i see
thanks
error:
Syntax error (missing operator) in query expression '(T075_BORGTOCHTNUMMER_1 = ?VAL)'.
what operator does he need?
i've tried '' and [] and stuf like that.
the other code i didn't change.
|
|
|
|
|
Use this expression: '(T075_BORGTOCHTNUMMER_1 = ?)'.
In Access you can't name the parameters. Thats the reason you have to add their values in the right order.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
www.troschuetz.de
|
|
|
|
|
No value given for one or more required parameters.
how do i set the value of my textbox to this parameter?
|
|
|
|
|
Can anybody give me layman explanation of Abstract Factory Design Pattern with example in c#
santosh
|
|
|
|
|
|
I got that link, but its not that clear to me, is there any other better explanation on net?
|
|
|
|
|
No, seriously if you dont understand the description on dofactory, then my only suggestion is buy a book on Design Patterns and study it page by page (C# Design Patterns by James W. Cooper ISBN -201-84453-2 is a good choice)
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
how to send email automatically? Thanks
darling
|
|
|
|
|
How to get list of computer in a net workplace?Please help me
Thanks
darling
|
|
|
|
|
Can anybody tell me how can we read the contacts in our global address book of outlook .Actually i am trying to read the contacts and display in a list box. Atleast can anybody tell how to export the contacts from global address book?
thanks in advance
Akhil
|
|
|
|
|
hello everyone
we are using WMEncoder to record video from movie camera and previewing it on the windows form, application is working is working well but when we tried to Convert the applicaiton to single instance by using
Process [] processes = Process.GetProcessByName("App");
if(procceses.length == 0)
Application.Run(new Form1());
else
return;
But now WMEncoder is not working and application stucks at WMEncoder.Reset() method
Wierd problem as as soon as we comment processes command, it works fine, any one can help??
Shajeel
|
|
|
|
|
Hello!
To my knowledge, .NET call the same code for print and preview. Is there a way to distinguish between 'printing' and 'previewing' ? Thank you.
Sovann
|
|
|
|
|
Normally not. But if you have access to the Document which is printed you could check its PrintController property. This one should have different types depending on the output destination.
|
|
|
|
|
I need Help!
How would I go about adding values and subtracting values from each other? Example: I have 100 stock, I assign 50 to store A and 10 to store B now the amounts should be added and displayed in store A and B and then they must be subtracted from Stock.
Any help would be welcome. I am using C# Express.
Illegal Operation
Making Computer Software Talk
|
|
|
|
|
If you start using variable to do your computation even, dare I say, temporary variable, it all start to make sense.
for example:
in basket A you have na apples.
in basket B you have nb apples.
you take p apple from basket B and put them into A.
what happen?
we write it like that:
na = na + p;
nb = nb - p;
does it shed some light?
|
|
|
|
|
Yes it does!
One more question, How would I specify this in a class and should it be best to specify this in a class of it's own for usability?
Illegal Operation
Making Computer Software Talk
|
|
|
|
|
hu?
you mean something like that?
class MyStore
{
int appleCount;
int berryCount;
public void EatSomeBerry(int n)
{
if(n > berryCount)
throw new ArgumentOutOfRangeException();
berryCount -= n;
}
///
/// abracadabra
///
public void TransformSomeBerryIntoApple()
{
Rand r = new Random();
int n = r.Next(100);
EatSomeBerry(n);
appleCount += n;
}
}
tss... it's not good to miss your lesson
|
|
|
|
|
Hi folks ,
now i have work with live video capturing and audio capturing in the windows forms, this application have more number of images and designs so it takes more time and also it take much more time to respond , i need to reduce the time
did you know plz share with me........
Best Regards..
ranandbe
-- modified at 1:31 Wednesday 10th May, 2006
|
|
|
|
|
Use a seperate thread for the video and audio capture (if you aren't already). This will free up the GUI thread, and should improve response time.
|
|
|
|
|
Hi,
Thank you, already i done with different thread's,my problem was application loading(form loading) time is high,i think the problem was in large size pictures and some code is in form load event but no way to change that picture as well as code is there any way to improve the form loading as quick.
best regards
ranandbe
-- modified at 4:53 Wednesday 10th May, 2006
|
|
|
|