Hi everybody, I'm having some problems with this function. The case is the following:
I have a picture box control and I put a shape control inside the picturebox, when a I click inside the shape it fills with the color I choosed. Everything is ok until now. The problem is that when I minimize then form and then I maximize it again, the shape is not filled.
Somebody has an idea to solve this problem? What am I doing wrong?
Your not putting all of your painting code in the Paint event of the form or picturebox. Really, you don't even need the picturebox control. Personally, I think MS should remove it from the toolbox.
There are a variety of ways of doing this, but I'll just describe one. If you're not painting an image using the entire client area of a form, I'd drop a Panel control on the form and then put all of my code in the Panel controls Paint event. You'll get a Graphics object you use from the event args in the Paint event. Use that to execute all of your painting methods. You don't even need the Win32 API to do this.
I had a small program that i was HOPING would work!!!
This program worked fine on a memory stick as it was writting data backward and forwards, in.txt files. I wanted to give a copy or it to my mate so i put it onto CD-RW however that then went tits up, it couldn't find the .txt files when they were clearly on the disc.
One of my mates said that it might be more secure to use a web server, this program asks the user for a licence key and if its correct then they are allowed on the program, the CD-RW was supposed to take the computer seria number (just like the memory stick did)
So i guess i have got to consider the option of a web sever.
Now where do i start?
I have no idea how to link a web server to vb.net. I know that one of my cousins has go a home server (will that work) it might save me some money
Or can someone magically solve the vb.net problem and make it so the CD-RW works
I can't see it ever working from a CD-RW myself. If you create an installer to install it onto your friends PC it would work.
The core problem is that you cannot open a file on a CD for writing. I guess you are opening the files for read/write.
When writing to a CD you always have to burn the files back to disk, even when it is a rewritable disk.
You don't need a web server to deploy a simple .Net application. In fact you will only need on if you are developing a web application.
If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) www.JacksonSoft.co.uk
I can't really say a lot without knowing more about the program. If you can run it from a memory stick, then you should be able to run it from a CD-RW. It sounds like you have hardcoded paths to the files, and when you put the program on the CD, that is a different address.
To answer better we need to know more about the code. For example, show the code where you are opening and working with the .txt files.
If you are making changes and writing back to the files, then you can't do that on a CD without a bit of work i would imagine.
Com Port is usually a 9 pin D port at the back of your pc, as so known as a Serial Port, using the RS232C standard. I is usually used to comunticate with other hardware devices such as weighing scales, clocks and back in the day, mice and modems. They are largely being superceded with USB devices.
VB.NET includes a SerialPort component.
------------------------- Real programmers don't comment their code. If it was hard to write, it should be hard to read.