|
rbjanaki wrote: My problem is the ball is moving vertically Its not moving up and down
Your code has a lot of problems: you should not unnecessarily use CreateGraphics, you should not draw stuff outside the GUI thread, you should not use Thread.Sleep() inside a painting method, and you should use a timer (preferably a System.Windows.Forms.Timer), to name a few.
Here are some articles you should read:
- crossthreads1[^]
- animation1[^]
PS: as your code doesn't change yValue, the ball will never move vertically.
|
|
|
|
|
Hi, I have a question on what the proper way to remove a installed program from a computer is. If i go to the control panel and use the add/remove programs, it will remove the program, however, if i create shortcuts to that program, those remain on the computer. Is there a special uninstall program function that comes with visual studio maybe? or is there a way to remove all files associated with the program? I would like the user to be able to simply push a button and everything that was installed with the program, shortcuts, files. If anyone can help me with this, it would be greatly appreciated.
Thanks,
|
|
|
|
|
If your installation creates the shortcuts and so on then un-installing from add/remove programs will remove the shortcuts.
If the end user manually creates shortcuts later on then there nothing you can do as part of the un-install process to find them and remove them. They could be anywhere, and named anything, and are totally out of your control.
However, if your installer is creating the shortcuts programmatically then your uninstall code should be written to remove them programatically. Sloppy [rogramming to leave them behind.
|
|
|
|
|
Well there is a function in the program that when you push a button, it creates a shortcut in the start up folder. If I remove the program while the shortcut is in the startup folder, it doesnt disappear. I guess I am wondering, how do you make an uninstall program for an application?
Thanks
|
|
|
|
|
That depends on where the icon is put. If it's in the All User Startup folder, you can remove it. If it's in the Users Startup folder you have to leave it there. Why? Enumerating every users Startup folder is time consuming and, depending on who's doing the uninstall, the uninstall will not have permissions to see everyone's Startup folder.
|
|
|
|
|
Well all the uninstall program would need to do is see the current users startup folder. I dont know how to go about creating an uninstall program to uninstall the program. How would i do that?
|
|
|
|
|
You don't have to write another program to uninstall the app. You just add the .LNK file to the RemoveFile table in the .MSI using Orca or some other .MSI editing tool.
|
|
|
|
|
Okay so now i downloaded orca so i can edit the .MSI but now i need to know how to get the .MSI file. Does visual studio automatically create one? If so, how can i find it, if not how can i create one?
Thanks for your help, I really appreciate it.
|
|
|
|
|
Uhhh...you already said you have an installer. What is it?? VS does NOT create an .MSI automatically. It's a project you have to add to your solution that gets compiled using the outputs of your main project. Express Editions of VS do not have this option.
Or you use some third party packaging software, like InnoSetup or Wise Package Studio, to create the .MSI.
|
|
|
|
|
I am new in Programming Friends, Needs help in coding a Simple API.
My Target Window is :
Msn chat Window
Project is:
I want, if the user i am chatting with, sends me Hi, From me the API Should send "hi aswell" in return But it should be automatically.
Codes Needed :
What API Function code can get the hWnd of Msn chat window which is running?
After i got hWnd of targeted window, Then what API Function code can retrieve text from that Msn chat window Using the hWnd of it i recently got?
After i got the retrieved text, "Hi" What API Function will be used to Send auto command "Hi aswell".
Hope you friends understood. Please help.
Thanks in advance.
|
|
|
|
|
n0dy wrote: Project is:
I want, if the user i am chatting with, sends me Hi, From me the API Should send "hi aswell" in return But it should be automatically.
There's an easier way to achieve this, by creating a plugin[^]. You might also be interested in the Bible[^] that CP hosts here.
I are Troll
|
|
|
|
|
n0dy wrote: Friends
I chose my friends myself.
This 'project' sounds very much like one of those viruses circulating on msn.
Nobody is going to help you write anything that could potentially hurt pc users.
So unless you can provide a very good reason why you would want to do this, your not going to get any help.
|
|
|
|
|
n0dy wrote: Need code
This is NOT a good way to ask for help. If you want code written for you, go to RentACoder.com and have your credit card handy. By the way, you get what you pay for...
This is a very advanced topic for someone who is new to programming. What have you done so far? If nothing, see my first point.
|
|
|
|
|
n0dy wrote: Needs help in coding a Simple API
So go and write it and come back with specific problems - if you ever get that far, otherwise try rentacoder and pay for it.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
|
Hello every body:
I want to change the buttons backcolor, when I press it
|
|
|
|
|
|
That's nice. Let us know how you get on when you use the Click event and the BackColor property.
|
|
|
|
|
|
I'd love to help you on this, but you forgot to mention to what colour you want to chance. Therefore I see no chance to be of any help.
|
|
|
|
|
i use VB 6.0 with MS Access as a database. With the insertion in table1 i use to update a counter (N+1, ....) in table2. but some time table2 does not update its value and repeat the previous value. e.g if previous value is 2854 then it should be updated to 2855
Help please
|
|
|
|
|
It would be difficult to answer your question without looking into your code.
|
|
|
|
|
Code is very simple and i know how to code for insertion into database.
str="Update table2 set field1=val1, field2=val2 Where condition"
set rs=cn.execute(str)
but some time it misses to update a record.
|
|
|
|
|
Change your number-field to an auto-numbering field[^].
That way the number will increase itself, every time that you insert a table - without the need to track the highest number in a separate table.
I are Troll
|
|
|
|
|
You should be using autonumbering fields for your primary keys. Also, when you insert a record into Table1, you need to retrieve the ID that record got in the table, then use that ID in your query to update Table2.
|
|
|
|