|
Mark Churchill wrote: I'm concerned
Other than the choice of the toolset - why?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
It seems like part of the supervisory routines are going to be somehow embedded in the database. I had the horrible thought of live process data being pumped thru embedded VB which affects more than just setpoints. Usually I find these kind of decisions embedded in a supervisory PLC. Or maybe I'm just paranoid...
|
|
|
|
|
This is a tool for the commisioners to check if the installed software is different from the standard. I don't understand "I'm concerned" ????.
|
|
|
|
|
A simple string comparison would be easy but I assume you want to compare the logic/tokens in the code, in which case you will need to build and interpreter of some sort.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
how i create no. of pictures boxes during runtime. The no. of picture boxes is equal to the no. of images in a folder.
Thanks
|
|
|
|
|
use IO namespace to get the folder and file info
loop through the files in the folder counting/creating a picturebox for each one
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
do following steps :
1. list files in your selected directory using System.IO.Directory.GetFiles(PathToYourImageDirectory);
2. iterate along list of files in step no 1
3. Create a PictureBox ie : PictureBox pb = new PictureBox();
4. Set your picture box property in step no 3, like Top, Left, Widht and Height.
5. Add your picture box to your form or other container control you use, with yourParentControl.Controls.Add(pb)
6. Load your image to picture box using pb.Image = Image.FromFile(TheFileFromList)
7. Repeat step no 3 until all files processed.
hope this helps
dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support
|
|
|
|
|
Thanx A lot.......
|
|
|
|
|
i have had problems refreshing the datagrid when deleting an item or when adding data; when i run my program. However when i step into the code line by line the datagrid works as expected by clearing or adding the data and updating the result on the datagride, why is that?
D.Arnold
dave1816
|
|
|
|
|
How about showing some code? Nobody can divine the solution from your question.
|
|
|
|
|
a
dave1816
modified on Wednesday, April 15, 2009 8:16 AM
|
|
|
|
|
Hi,
i getting started with ado and how been sucessful so far, however im now trying to update the data when editing a record, however i can only find how to do this with one set of data involving one column not mulitple.
e.g.
update Patient set Lastname = '" + textBox2.Text + "' where patientunitno = '" + textBox1.Text + "'";
my question is probley rather simple to solve but i cant find anything on google. I must be trying the wrong type of key words in.
I did find however one article linked below
http://www.xtremedotnettalk.com/showthread.php?t=95074[^]
however im not sure if this is the most practical way? any help to point me in the right direction would be great
Many Thanxs
D.Arnold
dave1816
|
|
|
|
|
Just write your sql command text like this:
"update patient set lastname = '" + textbox2.Text + "', firstname = '" + textbox3.Text + "' where patientunitno = '" + textBox1.Text + "'";
and so on if you want to update more columns.
but this suggestion is not recommended because it vulnerable against sql injections, use parameters instead.
Hope it helps
dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support
|
|
|
|
|
Clearly, I type too slowly
|
|
|
|
|
1. You should have probably gone for the database forum; this is more of an SQL question.
2. You should certainly be able to update multiple columns in one query. I just tried this in SQL Server and it worked:
update tablename set column1 = 'value1', column2 = 'value2' where column3 = 'condition'
3. You should never construct SQL like this. Google for "SQL injection".
|
|
|
|
|
Hi,
is there a possibility to clone a DataGridView?
I have a little formated Grid in a form and want to "copy" it to show and edit it in another form.
Cell- und backgroundcolors have to be retained unchanged. Thats why a DatagridView.DataSource solution is not so good.
Form1.CloneMemberWise() did't work. The source grid disapeared;
Thanx for your help.
Christian
from Germany
www.mindronics.de
|
|
|
|
|
Hi,
I am studying for MCTS and there i have a question fro practise purposes. The question is "Create a custom class that can be converted to common value types"?
I have been trying to solve this since 1 week but can not get the soluution of it.
Can any one help me with this answer...
Thanks in advance
Thanks
|
|
|
|
|
Faisal Khatri wrote: The question is "Create a custom class that can be converted to common value types"?
It sounds like the question is talking about Serialisation.
All types, eventually, boil down to some basic types such as int, string, double, bool etc.
For example, a Customer type may consist of an account number, a surname, forename, address (another custom type), etc. Account number could just be an int, while surname and forename are strings.
Serialisation (and its counterpart deserialisation) is the process of taking complex types and representing them in a common way so that they can be transferred to other systems or persisted to a storage medium.
Probably one of the most common ways to serialise stuff is to use XML, which is at its most basic just a big string.
Of course you can come up with your own scheme for serialising a type.
Now, whether this is what your tutor wants, I don't know. If they are careless with their vocabulary then it probably is. If they are very careful with their word usage then no. In .NET a "value type" has a very specific meaning, and a string (although immutable and therefore often confused with a value type) isn't a value type.
Does this help at all? Or does it just raise more questions?
|
|
|
|
|
Hi Guys,
I'm stumped about this.. I have a custom form that creates an instance of another customer form and displays it modally. There are a couple of buttons and events on the modal dialog window. It basically sets properties of the parent form based on user selections.
While I've got everything working just fine. The complaint I have is that the parent window isn't painted quickly enough. In other words, remnants of the modal window remain for a couple of seconds before it goes away entirely. How do I solve such a problem?
Here is a simple version of what I'm doing. Again, the problem I have is the ModalForm instance isn't "closing" fast enough- ie that it kind of fades then blends into the parent form instance.
public partial class ModalForm : Form
{
Button theButton; ...etc.
public ModalForm
{
theButton.Click+= new EventHandler(ClickHandler)
}
public void ClickHandler(object sender, Eventargs e)
{
objParenForm.myProperty = 1;
Dispose();
}
}
public partial class ParentForm : Form
{
ModalForm mForm
public int myProperty;
public void ParentForm_Load(object sender, Eventargs e)
{
mForm = new ModalForm();
mForm.Show(this);
}
}
|
|
|
|
|
Should you not be using ShowDialog for the modal form? Are you using any animations, I have not seen this problem and I use showdialog ALL the time. I suspect there is a setting somewhere that is controlling your form close style or something.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I'm sorry. Posted that code rather quickly.. you're right, I did use ShowDialog to show the form. No animations, just standard controls.. buttons, listbox.
Any hints as to where I could look to confirm your suspicion?
|
|
|
|
|
hi every one
i add column in datagrid in design time and when set data source with a dataset add new column to datagrid i want to dont add i want to replace to design time
thanks
|
|
|
|
|
i dont understand what you are trying to ask.
do you mean you would like to replace the column of the datagrid on runtime?
Please explain your question.
|
|
|
|
|
|
I want to load small images on the background image and both images is having the same color but my problem is i am not able to make small images as totally transperant i.e. i can see the edges of these small images. so i am loading these images in resources and trying to load but the effect is same. I want to draw these images in a such a way that it should mix up with background image and edges cannot be seen. I used maketransparent API but no desired result. Also I streched the images in order to mix with the background but i can see the edges.
Pls let me know how can we do this.
|
|
|
|