|
rzvme wrote: could the problem be the fact that i have 8 picturebox controls...very close to each other(there is no space between them))?
I don't think this is a problem. Even if the picture boxes overlap each other there should be no problem. Maybe you have to explicitely tell the picture box to redraw (Invalidate, Refresh, Update). Or there is some setting that prevents the image from getting zoomed (MaximumSize or something like this). Debug your app and check how the properties of your picture box change when your event handler is executed.
"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
|
|
|
|
|
10x for the tip. Now it works, but when the event is fired the picture is zoomed, and the picturebox size is modified , but the only part of the picture visible to me is the top left corner of the picture. What's wrong?
rzvme
|
|
|
|
|
how to pass variables through forms. I wish to make a a window form with a textbox.text from other form in my aplication
|
|
|
|
|
Passing values between forms[^]
"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
|
|
|
|
|
Hello
I was wondering : when I use System.Threading and use files, do I have a process switch or will another thread in the program get the remaining time share.
Clint
|
|
|
|
|
I'm not sure if I fully understood the question, but if you're using threads from System.Threading the time the threads are running are automatically scheduled and switched by the windows for you.
|
|
|
|
|
Also, if you're going to be writing a multi threaded app, be sure to make your data thread safe using syncronization objects, or one thread could overwrite your data while you're working with it in another thread.
|
|
|
|
|
Please can anyone help me to know where can i get a SFTP clint and server dll which can be integrated with my windows form C# application
Thanks and Regards
Pavan Joshi
|
|
|
|
|
how can i create a mobile application in C# using Mobile API?
|
|
|
|
|
hi,
i m having problem in reading values from database. something silly i m doing but can't figure it right now. Any help is welcome
public void getColumnNames(string col)<br />
{<br />
string constr = System.Configuration.ConfigurationManager.AppSettings["conskypak"];<br />
String cmdstr = "SELECT columnname FROM TableDescription where RecordCode=' " + col + " ' ";<br />
SqlConnection cn = new SqlConnection(constr);<br />
SqlCommand cmd = new SqlCommand(cmdstr,cn);<br />
SqlDataReader dr;<br />
cn.Open();<br />
dr = cmd.ExecuteReader();<br />
while (!dr.Read())<br />
{<br />
string name = "";<br />
name =(string)dr[0];<br />
}<br />
cn.Close();<br />
<br />
<br />
}
|
|
|
|
|
change this:
String cmdstr = "SELECT columnname FROM TableDescription where RecordCode=' " + col + " ' ";
to this :
String cmdstr = "SELECT columnname FROM TableDescription where RecordCode=' " + col.Trim() + " ' ";
it might be because of space which is with string.
|
|
|
|
|
thanx for all. it did not solved my problem. But u just directed me to think in the right direction. I just deleted all the spaces between after the recordcode and my problem was solved
|
|
|
|
|
try with this
while (dr.Read())
Where there is a will,there is a way.
|
|
|
|
|
It's not directly related to your problem, but you should make use of parameterized queries instead of building your queries by string concatenation. This way your code is protected against so called injection attacks and in my opinion they also make the code much more readable especially in cases where many parameters are used in one query.
Take a look at the following article here at CP: SQL Injection Attacks and Some Tips on How to Prevent Them[^]
"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
|
|
|
|
|
i have to return a string array from a function. I hv to retrieve the name to employees from emp table having certain code and return it to the calling function to be used for other purpose.
thanx in advance
|
|
|
|
|
public string[] getname()
{
DataSet ds = yourquery
string[] abc = new string[ds.Tables[0].Rows.Count];
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
abc[i] = ds.Tables[0].Rows[i]["name"].ToString();
}
return abc;
}
|
|
|
|
|
Hi,
I have a really weird problem when deploying a couple of my C# libraries (using VS 2005). One of my libraries exposes events that are consumed by a VB6 application. Everything works great on my development computer.
When I deploy the C# assemplies on another computer (the assembles are registered properly with regasm /codebase) the VB6 application works fine EXCEPT that C# events are not triggered in the VB6 application.
So since the code works perfectly on the development computer, there must be something different about the way the DLL is registered. So do any of you know of a switch (or something) for regasm that needs to be specified in order for the events to be triggered?
Thanks.
|
|
|
|
|
I have written an application that limits how much time my teenage children are on the internet each day. It prompts them for a password. When the password box is up, they can go to the task manager (applications tab) and just kill my process. How can I protect may app from being killed that way?
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
I think you should create a a new user for ur children and give minimum rights to it. It would be better to make it a guest account. You can also apply policy using Microsoft Management Console and prevent them from opening Task Manager.
But it has proved that today's children are more clever than parents.
There is a saying in URDU which translates as "The children of today are so much clever as they are trying to evaluate the Night-Fly in the day."
Mujtaba
|
|
|
|
|
I don't know about any easy way how to achieve that.
Personally I would prefer to find a non-software solution, but if you insist I would:
1. limit the account the kids are running under (if not done already). If they are admins, you can do nothing they are not able to overcome.
2. Write a service that is optionally attached to the WTSRegisterSessionNotification (WinXP+). This helps you to use their windows logon to measure the time they spend on the computer in total. Also can help to detect who is trying to overcome the security mechanism.
3. Set the service as autorestarted for any case (service settings).
4. Disable the network connectivity on the service startup (e.g. disable the ethernet card).
5. Write the communication application that is on one side communicating with the service, on other side asks for the specific username/password allowing to start the internet session.
6. The application will pass the credentials to the service.
7. Service will enable the ethernet card for use for valid credentials.
8. Logoff from the windows or from the communication application will cause the eth card to be disabled.
9. In cause the service is killed somehow, windows will restart it. Because of 4. the internet connection is disabled.
This all will pops-up some questions:
1. what is a Internet spending time - I can download a bunch of pages at all in a few seconds, then read it for a week (offline browsing)? On the other side I can download e.g. a large iso image of my school project from slow school server physically not being at the computer - meanwhile helping at home with some other tasks .
2. How to manage the software solution that someone will not simply bring in a notebook, disconnect the original computer and browse from that notebook?
3. above solution is quite difficult to manage with user-switching (although not impossible, but can be overcomed by another software running on background in suspended account waiting for the connection to be enabled from another account)
Another possibilities (solves 2):
- custom proxy - measure the time on other computer used as an authenticated proxy server. Set your network that the internet is not accessible in any other way without using this proxy. Lock proxy in secure place.
|
|
|
|
|
Hi
how can i stick an image to mouse pointer (win app)?
thanks
|
|
|
|
|
I found it myself , it was easy .
|
|
|
|
|
Anyone knows where I can start about starting to write an application that would help in diagramming?
Got a coding problem? Hand it to the CodeDevil! Its the idiot who stops learning and the wise that keep asking you questions!!!!
|
|
|
|
|
Hello,
I'm still a beginner, and i need some help.
I wish someone can tell me,
1- How can I Copy a file in the Hard-Disk from a place to another, using a C# Code?
2- How can I encrypt my Source code in deployment?
Thanks in advance
Bagie
|
|
|
|
|
Bagie wrote: 1- How can I Copy a file in the Hard-Disk from a place to another, using a C# Code?
Using File.Copy() method.
Bagie wrote: 2- How can I encrypt my Source code in deployment?
If you mean to prevent -to some extent- decompiling your exe, use Dotfuscator[^].
Regards
|
|
|
|