|
|
I have seen many articles on this website that could help you. Consider doing a search. The manual/experimental way would be to create a timer that will move/collapse the panel to the side of the screen by altering the width, height, x, and y.
Regards,
Thomas Stockwell
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.
Visit my Blog
|
|
|
|
|
|
I have a large application in VB6 which makes extensive use of control arrays as they are so easily used and referenced by the index value
With future support disappearing after win7 I am trying to code extensions in a way that will make the eventual transfer to vb.net easier but faced with a form that has 4 groups of 10 simple list combo boxes that need to be set at runtime and then saved after the user has selected their content all the alternatives to control arrays significantly increase the amount of typing that I have to do and therefore the opportunity for a typo that compiles (each control is called cmbCAtab1, cmbCAtab2 etc which is easy for cut and paste but easier to miss changing one of the names afterwards and it would still compile)
Would it really hurt VB.net so much to have Control Arrays which it seams to me were quite a simple way of handling things
I appreciate there are ways to combine the event handlers and to set and read the "array" of controls in VB.net but WHY should I have to jump through all the extra hoops when I should just be able to use an index value???
It would also help VB6 applications move to VB.net which I would have thought was part of the aim of the .net version developers
Gets under desk and puts fingers in ears, ok people fire away!
|
|
|
|
|
Mike Deeks wrote: Would it really hurt VB.net so much to have Control Arrays
Yes, because the concept isn't OOP compliant.
VB6 taught way too many bad habits.
If you really want control arrays, just throw the controls in a generic collection of them.
|
|
|
|
|
Dave Kreskowiak wrote: Yes, because the concept isn't OOP complian
so having an array of objects breaks OOP compliancy?
I would have looked this up but struggled to find what the definitions are for OOP compliance (yes i did google but got bored after 2 pages of results)
mind you, I did see a number of references where people said they had to break OOP compliance to be able to make a particular program work so maybe it is the OOP definition that is wrong?
|
|
|
|
|
if the Controls are contained in a single Container (a Panel, a GroupBox, ...), you can always use myContainer.Controls(index)
|
|
|
|
|
Luc Pattyn wrote: you can always use myContainer.Controls(index)
true if they are the only controls in that container otherwise it wastes resources putting invisible frames under groups of controls
|
|
|
|
|
If you have that many identical controls, maybe you should be adding them through code instead of copy-pasting in the designer. Do that, and you can add them to a collection (Or even build a dictionary or tree if you get bored) at the same time.
You could even create the first one of each "array", then do something like this, off the top of my head:
Public Function CreateLotsOfStuff(FirstItem as Control, NumberToCreate as Integer) as List(Of Control)
Dim ctlList as New List(Of Control)
Dim previousItem as Control = FirstItem
For x as Integer = 0 To NumberToCreate - 2 'First one's there already
Dim c as Control = previousItem .Clone()
ctlList.Add(c)
previousItem .Parent.Controls.Add(c)
c.Top = previousItem.Top + previousItem.Height + 5
Next x
Return ctlList
End Function
(Haven't done any VB lately, only C#, so my syntax may be a little off)
|
|
|
|
|
Hi
Ever body How to find Particular Drive to the filename i have Temp.txt in my system but i need now
which drive i do know so how to find in my vb6 application or vb.net application with windows
search i need my application only like a windows methods
|
|
|
|
|
I think you are probably looking for one of these[^] methods.
It's time for a new signature.
|
|
|
|
|
dear all
how to use compare in vb 6? thanks a lot
|
|
|
|
|
What do you want to compare?
Objects, strings, numbers, give us a clue!
|
|
|
|
|
i want to compare 2 decimal value(0-255)
|
|
|
|
|
As in ;
Dim a as byte: a = 34;
Dim b as byte: b = 20;
if a > b then
msgbox("a is greater than b")
elseif a < b then
msgbox("a is less than b")
else
msgbox("a equals b")
end if
You cannot get any more basic than that! Surely you could have found out how to do that in the docs or on google.
|
|
|
|
|
sorr, probably i made a mistake, i mean how to use "Compare" to compare 2 deccimal values; for example:compare = int(251 and 4)
|
|
|
|
|
???? I am comparing them, are they greater, less than or equal to other.
So i am not exactly sure what you are on about now.
|
|
|
|
|
you already asked and got answers two days ago.
I suggest you buy and study an introductory book on VB.NET
|
|
|
|
|
Damn, if I had bothered to check his previous messages I would have seen this, and wouldn't have responded with what I had. I see what he is on about now!
*kicks self in @rse*
|
|
|
|
|
thanks sir, i knew this point, but that answer is not what i want. i just want to know after compare..what is result? the result is greater value or less value? i searched online and asked someone already. so still couldn't find solution.
|
|
|
|
|
the result of a comparison is a boolean value, i.e. either true or false, and not a number nor anything else.
Now do yourself a favor: go buy a book and study.
|
|
|
|
|
hahahahaha, i think you also need to buy this book to study hard, although my ability in vb6 is really limited, but i don't agree compare can only get boolen.
|
|
|
|
|
Actually, YOU do need to buy a book and study something called "binary math". Camparing something is usually a boolean result. But, in your simple example "compare = int(200 and 4)" this results in a binary AND operation on two values, resulting in a third value that is assigned to a variable called "compare".
|
|
|
|
|
I am creating a main menu form in Access 2007. I want to use 3 graphics as logos on this form.
I want one to be aligned to upper-left (it is horizontally extended with stripes to stretch across). I also want 2 other graphics to be aligned in the upper-RIGHT of my form (two graphics that occupy equally square areas).
I am making this main menu form to FILL the area of Access, so when I resize the Access window's containing frame, the logos will adjust accordingly.
Is this possible? How can i do this (Use the Header area? Use the form's Picture property? Unbound object? Depth, Z-order?)
Thank you.
JJM
|
|
|
|
|
You'd probably want to find a forum dedicated to Access to ask this question. Everything you're asking is very specific to the behavior of Access and not how to interact with it using VB/VB.NET.
|
|
|
|