Odd to see such an old thread dug up, but I'll respond. In so, I'll also finally answer the OP's concerns regarding the use of a VGA-to-HDMI cable.
Toamritendu,
To my knowledge, VGA has no maximum resolution. However, it's often said that the max is 2048x1536 due to the bandwidth limitations of the VGA adapter's DAC (Digital-to Analog-Converter, or RAMDAC) along with the bandwidth limitation of VGA cables. Whether or not this seemingly accepted maximum coincides with the max resolution of CRT monitor screens, or if their max came about due to VGA's own limits is the real question. Unfortunately, it would seem the only way to find out would be for a CRT screen capable of even higher resolutions to be developed. It would seem to be a bit of a "which came first - the chicken or the egg" situation.
I'm afraid I don't understand the 2nd part of your question... Which parameter of the computer the resolution of the VGA-out depends? What do you mean by parameter? The only thing I can say to that without fully understanding is this. Output (or display) resolution is typically determined by one thing - resolution(s) supported by the monitor, TV, or display device. The video card can also affect your resolution, as some GPUs are capable of more resolutions than others. But that has become more of a generational gap, as modern GPUs are all capable of very high resolutions. (Up to 2560x1600, usually.)
Since the thread was dug up and I never addressed it before, onto VGA-to-HDMI conversion issues.
First and foremost, understand that VGA is an analog signal while HDMI is a digital one. Video cards create a digital signal originally, and as I mentioned earlier, the DAC of a VGA output changes that digital signal to an analog signal. An HDMI display requires no such change or conversion - it's digital from start to finish. So, when attempting to connect an analog VGA output to a digital input (in this case HDMI), that signal must be actively reconverted into a digital signal again. A cable cannot achieve this, as their is no active device within them to actually "convert" the signal. Converter boxes, which contain active converter devices can achieve this, but output resolutions can vary.
The best scenario when connecting to a digital input is to begin with a digital source.