Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hello!
I wrote a simple application, nothing great.
I want the user not to be able to change the size of the login form.
Using VB6, can anyone tell me how to do that?
any suggestion is ok.

Look at the properties of the form - one of them is 'BorderStyle'. Change the value to '1 - Fixed Single"

Martyn999,
You are amazing!
Thank you very much!
I was trying to write code to do it, I couldn't.
Do you, or anyone by any chance knows how to write the code to do it without setting the property.Martyn999, I really appreciate your help; however, I still want to see what the code to do such simple thing looks like.

If you set the "Borderstyle" property to "2 - Sizable", then the user can change the size with click-and-drag. Is that what you had in mind?

>> Do you, or anyone by any chance knows how to write the code to do it without setting the property. <<
Stop wasting you time re-inventing the wheel. I have been using VB for years and have no idea how to write the code to prevent users resizing a Window. Thats becasue some kind person has done it for me. Well thats not strictly true, I do have an idea, but I would never use it.
If you look on the VB6 installation disk. There are loads of examples of VB code there that you can use to learn from. The VB help files also have lots of sample code.
Stuart

Stuart,
I understand your point; however, there is a fine line between being curious, and wasting time reinventing the wheel.
Remember, the process of learning starts with curiosity. I used Martyn999's suggestion, and I'm grateful that he helped; however, I still want to continue the learning process. I'm not rushing to get an application out of the door. I'm more into learning what's under the hood. My personal opinion is that "The best programmers are those who know what is going on under the hood" You can argue it if you want.
With all due respect, the phylosophy of ignoring what's going on under the hood should be left to the software developers who are rushing to get an application out of the door.
I thank you very much for your insight. I'm aware of the help files. I tried to write the code on my own using the form resizing event, scaleheight, scalewidth,the top and left property of the form, I failed miserably. My failure is due to a limitation in my knoledge of the VB language. I would love to see the code from another perspective.
Different people have different ambitions.
newman,

Newman, if you want to know what's going on under the hood you can just forget Windows. It's not going to happen. If you want to be a Real Programmer and learn what's going on under the hood, learn C and use Linux.
Use the web the way it was meant to be used. Get Firefox.

TazG,
You seem to make a very good point; however, VB doesn't stop anyone from finding out what's under the hood. Finding out what's under the hood depends on the programmer. The VB language only provides more guidance to beginners. Once you go pass the level of beginners, you can find out what's under the hood, regardless of languages.
Althouth very powerful, the Santax of C is outdated. We are living in 2005. I know very little of C. The santaxes on C needs Serious improvements.
TazG, I appreciate you help!
Thanks,newman,

>> the Santax of C is outdated <<
Interesting observation considering the syntax of VB is as older than of that of C. C goes back to the early 70s. BASIC syntax goes back even more to the early 60s.
Stuart

>VB doesn't stop anyone from finding out
>what's under the hood.It is the nature of Billy-G and his buddies to hide what's under the hood, because they want to have complete control.
Real Programmers don't use Microsoft.
Microsoft just wants to own and control everyone and everything.
Programmers are not supposed to be controlled, they are supposed to control.Use the web the way it was meant to be used. Get Firefox.

Stuart,
Forgive my statement the word outdated may not be the right word. Let's replace it with complex, instead.
VB is a very high level language. Its syntaxes are very simple and English-like. The simplicity of the VB language helps the professional programmer to focus on the task at hand.
Sometimes emotion deviates people's perception from seeing the truth. Let's take away, all emotions, such as, hatred, resentment and anger. We can't speak the truth with those negative emotions inside. They will blind block your true reasoning.
We as human invent new things in order to make life easier. We invented the wheel, the auto-mobile, radio, tele-vision, etc...
We go on and invented the calculator, then the computer. Then we invented programming. If you take a look at each one of the things I mentioned, They all go through a process of becoming easier and easier, in other words more user friendly. VB seems to go through that process of being friendlier and friendlier to the user. In my opinion VB seems to free the programmer's imagination from the strain of complex and difficult syntaxes.TazG,
Let me tell you something, I feel your vibre.
Do not react with anger toward Bill. He revolutionized the software industry. You can argue that all you want. The guy is a genius. put yourself in his place, you may have done the same. Poor Bill, he is not trying to control anything. Bill is trying to protect his intellectual properties. I would protect mine as well.
Let me tell you something. People react automatically to windows not because Bill is controlling them, but because Windows is very user friendly. Windows is the most user-friendly operating system on the market. Nothing is forever. As long as nothing better is created, Windows will survive. We are in 2005 and we are moving fast. We need something that can help us move faster. Difficult stuffs are not only slowing us down, they are eating up considerable amount of time. Programming is the number one time eater. We have friends, wives and kids to spend time with.I can guarantee you that. If you can get a more user friendly operating system than windows out there, you will invade the market to the point that people will claim that you are trying to control, an that your software contains subliminal messages, etc...
I love you philosophy of refusing to be controlled. I hate being controlled myself!!
Newman,

>> In my opinion VB seems to free the programmer's imagination from the strain of complex and difficult syntaxes. <<
It does, but complex and difficult syntaxes are part of learning any language, whether it be a computer language or a spoken language.
It is easier and quicker to developer programmes in VB. But there is also a whole lot of things you cannot do with VB that you can in C. It's is because it is a very high level language the restricts its capabilities.
Try writing a device driver in VB. In fact try doing anything really worth while in VB without using the API, which is written in C++, and you soon come up against a brick wall.
Indeed there are some things that are best done in Assembler, and you can't get any more complex than that.
Stuart

Yes VB is simpler than C and you can go ahead and use it... I was saying that it won't let you see what's going on under the hood, because it's higher level. High level languages are always easier but less powerful. However, VB is not the only high-level language, and in my opinion is definately not the best. It creates gigantic files for even the simplest programs, and has memory leaks.
> Do not react with anger toward Bill. He
> revolutionized the software industry.
> You can argue that all you want.
OK, I will. He revolutionized nothing. He stole everything. I would say that Apple revolutionized. Look at the history.
> The guy is a genius.
Maybe... but definately not a computer genius, a business genius. He knows how to make money, and does it very immorally.
> Poor Bill, he is not trying to control
> anything. Bill is trying to protect his
> intellectual properties.
He has none. Like I said, he stole everything, I mean EVERYTHING, and then told the world he is the king of originality.
> As long as nothing better is created,
> Windows will survive
Not quite. Windows will survive as long as he can get the world to continue believing his lies.Clearly you haven't done enough research on this. A great place to learn about Microsoft's crap is KMFMS.com.
Use the web the way it was meant to be used. Get Firefox.

>> It creates gigantic files for even the simplest programs, and has memory leaks. <<
I'll would agree with the first assertion to some extent, but not gigantic, unless to consider 1 Mbs gigantic. Never seen memory leaks on VB. It is it's high level environment that makes memory leaks less likely. All memory allocation is done by the Run Time Environment, not the programmer.
There are some bad programming techniques you can make you think there are memory leaks, like using End to terminate an application, but thats the programmers fault. Not the programming environment.
Its a bit much to say he stole everything. True he acquired most of MS's products, with the exception of BASIC and it derivatives, from other companies, but stole!
When you have a case to argue, you weaken it when you start using emotive and misleading language.
Stuart

> I'll would agree with the first assertion
> to some extent, but not gigantic, unless
> to consider 1 Mbs gigantic.
It is gigantic considering you can write the same thing in another language as 100KB or so...
> Its a bit much to say he stole everything.
> True he acquired most of MS's products,
> with the exception of BASIC and it
> derivatives, from other companies, but
> stole!
Are you saying Microsoft invented BASIC!? That's simply not true.
Anyway, "stole" is correct because they use other software and say it is their own and, in many cases, sabotage the competition they took it from.Please read the KMFMS article before you try to make any more arguments.
Use the web the way it was meant to be used. Get Firefox.

No, I did not say he invented BASIC, but he did write his own Interpreter. Anyone can write their own BASIC interpreter if they know enough about the language.Its like saying Henry Ford stole the motor car off Daimler/Benz.
Steeling is taking from the owner without their consent. Windows/Office/C++ etc were bought from other companies, in which case he is well entitled to call it his own. Just like this computer is mine although it has some else's name on it.
Stuart

Microsoft does more than simply buy; they buy, then destroy the seller with any means they can think of, and then put up ads about how innovative they are. It's true that he's "entitled" to say this... many of the things Microsoft does are legal, but legal doesn't always mean right. Microsoft is destroying the computer industry.
Use the web the way it was meant to be used. Get Firefox.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |