LizR 171 Posting Virtuoso

You could make a primary key that is the concatination of both fields together, this would be the normal way to do it

LizR 171 Posting Virtuoso

Surely the datasource should be already set? it would seem the more important question is why is it getting unset?

LizR 171 Posting Virtuoso

then you need to change how you're testing it.

key down events would happen in say the order W then D, but at the D event the only key you're told went down is D..

LizR 171 Posting Virtuoso

Sure your thread update has occured by the time your messagebox shows?
Try adding a sleep in before the messagebox to be sure.

LizR 171 Posting Virtuoso

Then you have semi working code to post, and a more precise problem than getting people who may not have read your other thread to do all the work again for you.

If its in the wrong position most likely its because you didnt allow for the fact that the top of the thing you're restricting it a) can move, b) the clip is on the scren not on the form... so.. you need to know where it all is in relation to the screen

LizR 171 Posting Virtuoso

Nope it looks like a normal event to me.

LizR 171 Posting Virtuoso

Depends how you setup the initial connection.

A lot of the time its just a short tweak, however, if the username/password is needed to be within a table within the database on the server you need a little more complex work, but, if you just mean to use username/password authentification to connect to the sql server it shouldnt be hard.

LizR 171 Posting Virtuoso

Theres a mix of decision making and displaying going in in that procedure, Id suggest you split the code so that all the variables needed to draw are private to the class, and you have an update procedure that sets them, and then the draw procedure just draws them, then when you need to "pause" the displaying of the simulation, you just dont run the update and the last values are used.

LizR 171 Posting Virtuoso

If theres already an onselect all you need to do then is work out what tags are already in effect. Which is usually the harder part depending on what is returned by the control

LizR 171 Posting Virtuoso

You could be adding a huge time overhead if you do, especially if you dont have sufficient indexes

LizR 171 Posting Virtuoso

It has a different audience than VS 2008, in that it targets java apps not .net apps

LizR 171 Posting Virtuoso

Whatever your "graphic simulation" does, it obviously should call an "update" function and a "draw" function.. When you want it to "freeze" just stop the updates and continue drawing it at its current state

LizR 171 Posting Virtuoso

Did you try following the MS example I linked? Which had a working list of a "class" that updated? (worry about the image part separately but basiclaly its just another part of the class)

LizR 171 Posting Virtuoso

Wow, long post :)
OK

This is the code creating the strings to populate your next form.

string FileId=(GridView1.DataKeys[GridView1.SelectedIndex][“FileId”].ToString());
string FileName= (GridView1.DataKeys[GridView1.SelectedIndex][“ FileName”].ToString());
string Subject=(GridView1.DataKeys[GridView1.SelectedIndex][“Subject”].ToString());
string DistrictName =(GridView1.DataKeys[GridView1.SelectedIndex][“DistrictName”].ToString());

I believe the problem arises because you want the selectedValue not the selectedIndex because the index will give the text name of the district, not the value of the id which maybe say "A10"

LizR 171 Posting Virtuoso

Then you would need to run a query to see if the details existed ..

LizR 171 Posting Virtuoso

Yes

LizR 171 Posting Virtuoso

In your "My Documents\Visual Studio xxxx\Projects" directory you'll find a directory which was the name you made when you saved it at school. Copy that directory onto your floppy/usb stick/cd etc and then place it in a similar location on your pc at home (eg if you had visual studio 2005 at school but downloaded 2008 at home - a) it will update and taking it back to school will be harder, b) the name will change from 2005 to 2008 .. then file open and find the project directory will be there, you can then go into it, and open the whatever .sln file you had made.

LizR 171 Posting Virtuoso

What was wrong with all the info in your "mousemove" thread? that had the answers to this? Which isnt included at all in your above code

LizR 171 Posting Virtuoso

1. Array
2. You dont "convert"
3. yes
4. it updates the list, not the file, you still need to write that at the end

Thats why the image is in the class you were supposed to be making from the last post I did.. It will then populate the grid.

LizR 171 Posting Virtuoso

Normally you would create a class which included the picture, and then have a list of the class, but a picture wouldnt ever save in a csv file without potential issue so, if its just a icon to cover a given predetermind set of options (such as read, write, execute or such) then you could use enums and so on.

LizR 171 Posting Virtuoso

You should be able to make an image part of the row.. without any major issues.. Then it would update properly

LizR 171 Posting Virtuoso

Yep you can hide or remove them in VS but not disable them - kinda annoying really..

Delphi of course works a treat..
btw you guys doing the Embarcadero webinars this week and next?

LizR 171 Posting Virtuoso

Can you convert the updatecommand to string? And display it? it should give hints as to why its not working if you can

LizR 171 Posting Virtuoso

If you connected the data source correctly it should be automatically updated

LizR 171 Posting Virtuoso

You didnt read the link I posted then, as thats exactly what that does. You can use lists as data sources.

LizR 171 Posting Virtuoso

Then you need to change the keypress value to that of the return key, as well as montior for the length of input to be 4

LizR 171 Posting Virtuoso

How are you telling it to print?

LizR 171 Posting Virtuoso

There isnt an enable/disable function for tab pages. Only practical way is to use the onchange event and put back the focus where it came from

LizR 171 Posting Virtuoso

You dont, or rather you shouldnt need to it should all be done for you..

See http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged.aspx

LizR 171 Posting Virtuoso

I think it only came with MS-SQL 2000, I dont believe 2005 or 2008 have it as they dont have anything like the same front end.

LizR 171 Posting Virtuoso

Case sensitive?

LizR 171 Posting Virtuoso

I had this working fairly quickly when I tried it, I dont have the machine to hand I did it on, but I took a csv file and chucked it into a list of array of string and then added it.

As for your other post - which one?

LizR 171 Posting Virtuoso

If you split your data into a list of array of string, you can do a bit of googling and find how to use a list as a data source, then when they finish, just tab join the data back and write it out.

LizR 171 Posting Virtuoso

Put backslashes in front of any character and it will be treated as a litteral, so

\" will be a ", but it wont do anything odd with it.

LizR 171 Posting Virtuoso

Be aware in your code if you did apply the clip you wouldnt be able to press the button.

The clip code can be found at http://msdn.microsoft.com/en-us/library/system.windows.forms.cursor.clip.aspx

Its position can be set with http://msdn.microsoft.com/en-us/library/system.windows.forms.cursor.position.aspx

most of the MS online help for commands has examples

LizR 171 Posting Virtuoso

Well they give your X and Y co-ords, do what you want to do with them..

LizR 171 Posting Virtuoso

I dont understand the way you've said "navigate for another form" do you mean show a new form? or do you mean make changes to a form?

LizR 171 Posting Virtuoso

Sorry if the following seems a little offensive, but thats verging on very lazy.

LizR 171 Posting Virtuoso

The mousemove event has 2 parameters (object sender, MouseEventArgs e)

e.X and e.Y return the mouses location over the item for which that event fired, eg, if you do it over a picture box it tells you where within the picturebox you are.. This should help

LizR 171 Posting Virtuoso

Then something else is wrong with the settings on it, as it shouldnt do that by default.

LizR 171 Posting Virtuoso

you either code it in by hand, or, select the event in the properties window and double click on the area where it would list the event and it makes it and links it for you

LizR 171 Posting Virtuoso

have you considered using the openfile dialog?

LizR 171 Posting Virtuoso

call picturebox1.invalidate()

LizR 171 Posting Virtuoso

As I asked, what Icon do you get as you drag over the destination? If you dont get one its not firing because it doesnt know its supposed to

LizR 171 Posting Virtuoso

Print screen is usually taken by windows, and a picture put in the clipboard, you could test the clipboard for a picture and save it?

LizR 171 Posting Virtuoso

I dont see that you would need to add the events for each time you select an item, however, what icon do you get as you drag over the destination?

LizR 171 Posting Virtuoso

no, I mean how are you trying to insert it into word? ole? cut and paste? sending keys?

LizR 171 Posting Virtuoso

How are you trying to insert it?

LizR 171 Posting Virtuoso

Please show the code you have for the drag/drop routines

LizR 171 Posting Virtuoso

When you showed it before with a path in, your code hadnt told the stirng to be literal so c:\setstation.cmd would have turned to c:setstation.cmd, just as c:\test\setstation.cmd would turn to c:testsetstation.cmd