|
player is a Bitmap[^] object, and as you can see from the members[^] it has, Left is not one of them.
lee.hallows wrote: I have tested a similar functionality using a picturebox1 which I just stuck on my form and was able to move this using the code above
That is because a picturebox is a control and has a location on the form. A bitmap is just an image representation.
Perhaps if you assigned the bitmap to the picturebox and moved the picturebox you would get the functionality you desire.
[ADDITIONAL]
Also, if you are programming a game you may find it more advantageous to use XNA Game Studio Express which is designed for the purpose. It is a free download from Microsoft and it will provide better functionality for writing games than plain Visual Studio.
[/ADDITIONAL]
|
|
|
|
|
Hi,
I have Created One Windows Application , it have one Post Operation ,When any data is posted It will inserted to Database.I have Installed My application to many systems.When any Data is Posted I want To give Alert To All Systems?How can I give the Alert To All the Systems?I s this is possible or not?Please Any one help me.......(I have Only one Server and Many clients)
**Is any Data is posted ,How can I give the Alert To All Systems.....?
|
|
|
|
|
Hi,
You can send some sort of message to the clients. By 'message', I mean, some custom class object or a simple string denoting that the event has occured on the server. Then the client can display the object recieved from the server in any form ( as you might want it to be displayed ). By the way how are you connected to the server ? Using sockets ?. If yes then just send string of data to all clients when the event occurs on the server and the client should be able to interpret the string.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Thanks for ur reply.
Is there any article u have please send me the link....I have used normal database connection..(SQL connection).When any data is added in the database ,I want to give alert message to all login users.Please help me
|
|
|
|
|
hi all,
I am developing a windows application where i have included code for online update of my application.When i am trying to download the files from the server, I am able to download all the files except exe file.
Could anybody tell me how to download a exe file from the server?
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
Maybe your virusscanner or firewall is blockig exe files. Essentially thee is no difference between different types of datafiles.
|
|
|
|
|
Hi.
What is the easiest way to synchronize two(or more) threads in the classic producer-consumer problem?
What classes and mechanisms must be used? Does .NET Thread object have features similar to Java threads? (wait, notify, notifyAll methods)
Some code snippets would certainly help.
Thanks.
|
|
|
|
|
Google is your friend.
[^]
|
|
|
|
|
hi,
i want a combo with the ok and browse button ..
browse i should browse the files and i can say ok
pls help me
with regards
prasad
|
|
|
|
|
during the form load event, say
ComboBox1.Items.Add("Ok");
ComboBox1.Items.Add("Browse");
Then use the following code
if(ComboBox1.Text=="Browse")<br />
{<br />
<br />
OpenFileDialog ofn = new OpenFileDialog();<br />
ofn.Filter = "XML Files (*.xml)|*.xml";
ofn.Title = "Type File";<br />
if (ofn.ShowDialog() == DialogResult.Cancel)<br />
goto Quit;<br />
}
i hope this helps/
Keshav Kamat
India
|
|
|
|
|
hi,keshav
u r adding a text wright and it is not working..
i think my question was not clear
i am having a datagrid and one of the column is made as a
column type=DataGridViewComboBoxColumn
and i am adding a rows like
Scenario_Designer_gridview.Rows.Add(filename);
where filename contains the list of files in a specifeid folder i am getting from folder browser.
now i want add the list of files to a that column...
i am getting error......
help me pls.
|
|
|
|
|
u mean to say that when the user clicks on the browse button, it should open a file dialog for only a fixed path, and automatically select all the files from that path, and load the names of the files in the data grid rows! right?
I will try to figure it out. It requires a little addition of code.
I will try it and let u know.
Keshav Kamat
India
|
|
|
|
|
or do u mean that every row in that datagrid will have a column that comprises of a combo box that allows u to choose a particular file?
Keshav Kamat
India
|
|
|
|
|
Hey, I wanna try to make a 3rd party prog that can control CS servs from outside (Like HLSW).
I know this is not the main forum for this, but I think that maybe someone here knows what I'm talking about and MAYBE help me (please).
Well, I could find several sites to deal with RCON cmds, and I even found a code (with a help of a friend) to connect to the server and exec RCON cmds, but however, I can't get the log.
This is a link that showed me a little about the log: http://www.hlstats.org/logs/[^]
but however, I could not understand HOW to get it.
If someone can help, PLEASE PLEASE HELP ME.
And if you have a prog\snippet for this this would help even more!
Thanks ALOT in advance.
NaNg.
|
|
|
|
|
my application work with ms access file (*.mdb) and i want share my application folder (content exe and mdb file) for clients (user in my workgroup) that clients run my application from their pc and work with database.
below is my connection that work correctly in local, but return error when run from shared folder !
private string constr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\\\servername\\sharedfolder\\MainDb.mdb; ";<br />
whats wrong?
|
|
|
|
|
Hello All,
I am using a datagrid, and I populate the datagrid, using a sqldata reader. The code is as follows.
SqlConnection conn = new SqlConnection("Data Source=" + Environment.MachineName + "\\WINCC;Integrated Security=SSPI;Initial Catalog=Logger; Packet Size = 32766;");<br />
SqlCommand cmd=null;<br />
SqlDataReader rdr = null;<br />
conn.Open(); <br />
cmd = new SqlCommand("SELECT * FROM RDPLogViewer", conn);<br />
rdr = cmd.ExecuteReader();<br />
while (rdr.Read())<br />
{<br />
LoggerDatagrid.Rows.Add(rdr["TypeLevel"].ToString(), rdr["TimeStamp"].ToString(), rdr["SubSystem"].ToString(), rdr["ClassName"].ToString(), rdr["FunctionUsed"].ToString(), rdr["Memory"].ToString(), rdr["Statement"].ToString());<br />
}<br />
rdr.Close();<br />
conn.Close();<br />
It is working perfectly fine. Does there exist an alternative or an additional way to populate the datagrid, more fast? I just want to optimize it.
Keshav Kamat
India
|
|
|
|
|
Hi,
Why dont you try to use SqlDataAdapter to fill a data set and then attach that data set to the DataSource property of the DataGrid. I think this will save you some coding effort.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
I think the way what you used to bind the grid is difficult. As coolestcoder told you can use sqldatadapter to fill one dataset. Then set the dataset as datasource to grid. One more problem what i find with your binding is,it's tough to implement paging on your example since sqldatareader is forward only. So better to go for dataset
|
|
|
|
|
HI,
Is it possible to do IPC with DOS apps using C#?
I have a 32-bit DOS App which takes in CMD line parameters. I need to get the results from this app onto a Windows Form.
The results are quite large, 25-30 MB....which is the 1. Easiest and 2. Fastest way to do it?
I'm right now looking for an easy way to do it, but a Fast way with minimum overhead would be great.
Examples and pointers would really help.
Thx
Ashish Sharma
|
|
|
|
|
is it possible to lock a file so that only a certain application has privelege to write to it? how? i want to create an application that makes use of a log file such that the log file cannot be modified outside the application. Also, this means that only those users that have access to run my application will be able to modify the log file (through the application).
thanks in advance.
I am a SysAdmin, I battle my own daemons.
|
|
|
|
|
Have the application open the file and set the sharing appropriately:
See:
* File.Open[^]
* FileShare[^]
|
|
|
|
|
Hi Colin Angus Mackay,
I think DenClancy wants that a file ( even if a simple text file ) must not be opened without a particular application. Is this possible ? What if an Admin user tries to open this file ?
Actually I wanted to restrict access to some files, even if the files are simple text files (even to admin users). I heard about something called Access Control List. Is it applicable here ? I dont know the details of ACL. If possible, please reply in details.
Thanks.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
coolestCoder wrote: Is this possible ?
As I pointed out, the application can deny others the ability to do anything but read the file. Or it can take exclusive control over the file too. See the previous links to FileShare.
coolestCoder wrote: What if an Admin user tries to open this file ?
Yes, even an administrator - Try it with a SQL Server database file. You won't be able modify it regardless of who you are logged in as because the SQL Server process has control over it. Not even someone logged on as the same user as SQL Server can access the file.
coolestCoder wrote: ctually I wanted to restrict access to some files, even if the files are simple text files (even to admin users).
You can change the permissions on a file as you need it. I'm not sure if you can lock an admin out though. If it is possible then it would only be a temporary situation as the admin would have the ability to grant themselves access again.
|
|
|
|
|
Hi!
I think the real question is how to permanently lock a file without an application that has to keep the file handle open all the time.
Sure you can set FileShare to None, but the moment your application ends anyone can access the file again.
The original poster wanted a way to deny access to a file for everybody even after the application has finished.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I think you could achieve something similar if you can create a separate user with a random password only your application knows and have your application set the access rights for the file so that only this particular user has access rights.
But an administrator could take ownership of the file and thus modify the access rights anyway...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|