Tuesday, October 19, 2010

Automatically change the control once and for all so that the size of VB


- When the form is resized, how to dynamically change the size of the control of many VB programmers headaches. Some people set Resizable form the size of the control but do not change; some people are under the control of absolute position and window size with addition and subtraction approach to re-position the control and change the size, this approach is relatively more complicated and can not be reused; Of course, some people are limited not to change the window altogether. Is there a simple way? The answer is yes, here are a permanent solution, source code is as follows:
Option Explicit
Private FormOldWidth As Long
`Save the form of the original width
Private FormOldHeight As Long
`Save the form of the original height

`In the call to call this function before ResizeForm
Public Sub ResizeInit (FormName As Form)
Dim Obj As Control
FormOldWidth = FormName.ScaleWidth
FormOldHeight = FormName.ScaleHeight
On Error Resume Next
For Each Obj In FormName
Obj.Tag = Obj.Left & "" & Obj.Top & ""
& Obj.Width & "" & Obj.Height & ""
Next Obj
On Error GoTo 0
End Sub

`Change in proportion to the size of each component within the form,
Call before the call ReSizeForm ReSizeInit function
Public Sub ResizeForm (FormName As Form)
Dim Pos (4) As Double
Dim I As Long, TempPos As Long, StartPos As Long
Dim Obj As Control
Dim ScaleX As Double, ScaleY As Double

ScaleX = FormName.ScaleWidth / FormOldWidth
`Save the form width scaling
ScaleY = FormName.ScaleHeight / FormOldHeight
Save the form `a high degree of scaling
On Error Resume Next
For Each Obj In FormName
StartPos = 1
For I = 0 To 4
`Read the original location and size of the control

TempPos = InStr (StartPos,
Obj.Tag, "", vbTextCompare)
If TempPos> 0 Then
Pos (I) = Mid (Obj.Tag,
StartPos, TempPos - StartPos)
StartPos = TempPos + 1
Else
Pos (I) = 0
End If
`According to the original location and form control to change the size of the
The proportion of the controls reposition and resize
Obj.Move Pos (0) backup bin bin_old conf config crawler.tar.gz crawler_bin.tar.gz data eshow eshow_sitemap.html generate.sh google.html google.html.md5 log maint news: 10 news: 11 news: 12 news : 13 news: 14 news: 15 news: 16 news: 17 news: 18 news: 2 news: 3 news: 4 news: 5 news: 6 news: 7 news: 8 news: 9 outboundLinksMgr.sql seeds sitemap.html svn tasks tmp xml2dict-2008.6-tar.gz xml2dict-read-only ScaleX, Pos (1)
backup bin bin_old conf config crawler.tar.gz crawler_bin.tar.gz data eshow eshow_sitemap.html generate.sh google.html google.html.md5 log maint news: 10 news: 11 news: 12 news: 13 news: 14 news: 15 news: 16 news: 17 news: 18 news: 2 news: 3 news: 4 news: 5 news: 6 news: 7 news: 8 news: 9 outboundLinksMgr.sql seeds sitemap.html svn tasks tmp xml2dict-2008.6-tar. gz xml2dict-read-only ScaleY, Pos (2) backup bin bin_old conf config crawler.tar.gz crawler_bin.tar.gz data eshow eshow_sitemap.html generate.sh google.html google.html.md5 log maint news: 10 news: 11 news: 12 news: 13 news: 14 news: 15 news: 16 news: 17 news: 18 news: 2 news: 3 news: 4 news: 5 news: 6 news: 7 news: 8 news: 9 outboundLinksMgr.sql seeds sitemap.html svn tasks tmp xml2dict-2008.6-tar.gz xml2dict-read-only ScaleX, Pos (3) backup bin bin_old conf config crawler.tar.gz crawler_bin.tar.gz data eshow eshow_sitemap.html generate.sh google.html google.html.md5 log maint news: 10 news: 11 news: 12 news: 13 news: 14 news: 15 news: 16 news: 17 news: 18 news: 2 news: 3 news: 4 news: 5 news: 6 news : 7 news: 8 news: 9 outboundLinksMgr.sql seeds sitemap.html svn tasks tmp xml2dict-2008.6-tar.gz xml2dict-read-only ScaleY
Next I
Next Obj
On Error GoTo 0
End Sub

Private Sub Form_Load ()
Call ResizeInit (Me) `the procedure must be added into
End Sub

Private Sub Form_Resize ()
Call ResizeForm (Me) `to ensure that change control and changes the form
End Sub

---- In this case are given two functions: ResizeInit and ResizeForm, before calling ResizeForm must call ResizeInit. You can by copying the program code in the form, and then adding any controls on the form where you can test - when the form is resized, how to dynamically change the size of the control of many VB programmers headaches. Some people set Resizable form the size of the control but do not change; some people are under the control of absolute position and window size with addition and subtraction approach to re-position the control and change the size, this approach is relatively more complicated and can not be reused; Of course, some people are limited not to change the window altogether. Is there a simple way? The answer is yes, here are a permanent solution, source code is as follows:
Option Explicit
Private FormOldWidth As Long
`Save the form of the original width
Private FormOldHeight As Long
`Save the form of the original height

`In the call to call this function before ResizeForm
Public Sub ResizeInit (FormName As Form)
Dim Obj As Control
FormOldWidth = FormName.ScaleWidth
FormOldHeight = FormName.ScaleHeight
On Error Resume Next
For Each Obj In FormName
Obj.Tag = Obj.Left & "" & Obj.Top & ""
& Obj.Width & "" & Obj.Height & ""
Next Obj
On Error GoTo 0
End Sub

`Change in proportion to the size of each component within the form,
Call before the call ReSizeForm ReSizeInit function
Public Sub ResizeForm (FormName As Form)
Dim Pos (4) As Double
Dim I As Long, TempPos As Long, StartPos As Long
Dim Obj As Control
Dim ScaleX As Double, ScaleY As Double

ScaleX = FormName.ScaleWidth / FormOldWidth
`Save the form width scaling
ScaleY = FormName.ScaleHeight / FormOldHeight
Save the form `a high degree of scaling
On Error Resume Next
For Each Obj In FormName
StartPos = 1
For I = 0 To 4
`Read the original location and size of the control

TempPos = InStr (StartPos,
Obj.Tag, "", vbTextCompare)
If TempPos> 0 Then
Pos (I) = Mid (Obj.Tag,
StartPos, TempPos - StartPos)
StartPos = TempPos + 1
Else
Pos (I) = 0
End If
`According to the original location and form control to change the size of the
The ratio of the re-orientation and change the size of the control
Obj.Move Pos (0) backup bin bin_old conf config crawler.tar.gz crawler_bin.tar.gz data eshow eshow_sitemap.html generate.sh google.html google.html.md5 log maint news: 10 news: 11 news: 12 news : 13 news: 14 news: 15 news: 16 news: 17 news: 18 news: 2 news: 3 news: 4 news: 5 news: 6 news: 7 news: 8 news: 9 outboundLinksMgr.sql seeds sitemap.html svn tasks tmp xml2dict-2008.6-tar.gz xml2dict-read-only ScaleX, Pos (1)
backup bin bin_old conf config crawler.tar.gz crawler_bin.tar.gz data eshow eshow_sitemap.html generate.sh google.html google.html.md5 log maint news: 10 news: 11 news: 12 news: 13 news: 14 news: 15 news: 16 news: 17 news: 18 news: 2 news: 3 news: 4 news: 5 news: 6 news: 7 news: 8 news: 9 outboundLinksMgr.sql seeds sitemap.html svn tasks tmp xml2dict-2008.6-tar. gz xml2dict-read-only ScaleY, Pos (2) backup bin bin_old conf config crawler.tar.gz crawler_bin.tar.gz data eshow eshow_sitemap.html generate.sh google.html google.html.md5 log maint news: 10 news: 11 news: 12 news: 13 news: 14 news: 15 news: 16 news: 17 news: 18 news: 2 news: 3 news: 4 news: 5 news: 6 news: 7 news: 8 news: 9 outboundLinksMgr.sql seeds sitemap.html svn tasks tmp xml2dict-2008.6-tar.gz xml2dict-read-only ScaleX, Pos (3) backup bin bin_old conf config crawler.tar.gz crawler_bin.tar.gz data eshow eshow_sitemap.html generate.sh google.html google.html.md5 log maint news: 10 news: 11 news: 12 news: 13 news: 14 news: 15 news: 16 news: 17 news: 18 news: 2 news: 3 news: 4 news: 5 news: 6 news : 7 news: 8 news: 9 outboundLinksMgr.sql seeds sitemap.html svn tasks tmp xml2dict-2008.6-tar.gz xml2dict-read-only ScaleY
Next I
Next Obj
On Error GoTo 0
End Sub

Private Sub Form_Load ()
Call ResizeInit (Me) `the procedure must be added into
End Sub

Private Sub Form_Resize ()
Call ResizeForm (Me) `to ensure that change control and changes the form
End Sub

---- In this case are given two functions: ResizeInit and ResizeForm, before calling ResizeForm must call ResizeInit. You can by copying the program code in the form, and then adding any controls on the form where you can test






Recommended links:



Hot Science Education



how to install INSTALL windows media player 11



Operation and further investment to maintain essential



Photoshop Production - wire and spark



DivX to VOB



Quality Control in the "Statistics" several concepts



Simple table space to talk about Visual Basic.NET transmission



JSP2.0 simple symbol library extension _SimpleTag



With CloneCD CD-RW disc to save the damaged



Followed By A Variety Of Patches Manually Clear The New "Annie"



TS To WMV



FLV to 3GP



Review Basic Or VB Or VB DotNet



Easy to use Terminal And Telnet Clients



36 comments:

  1. Lower weight and higher rep workout plans are beneficial for overtraining prevention, joint recuperation, and muscle recovery, but are far less effective at muscle gains in most areas as compared with heavier weight lifting workouts that do not offer any significant muscle pump or burn. There are also particular exercises that tend to cause a greater sense of muscle pump or burn, especially those that stretch the muscle significantly (such as pec deck), but they also function in the same method just described, in that the muscle burn and pump will increase substantially with lower weight and higher reps, but, the most vital point to remember is that the largest level of muscle growth will not occur by aiming for a muscle pump or burn, but rather through organizing weight lifting workout sessions to function within a lower rep range where greater weight can be utilized to produce a higher level of workload.http://shredhdxabout.com/muscle-hd/

    ReplyDelete
  2. Secondly, choose only a well-established and reputable agency. You will have 2 main options for hiring a caregiver ? an independent home health care aide and an agency. Choosing the former can save you money, but it will increase your responsibilities too. When you choose an agency, you can leave all the responsibilities with the agency so that you can focus more on your family.http://www.supplements4help.com/raging-lion/

    ReplyDelete
  3. The certifications required for home health care aide agencies are not the same in different states. Ask them if they are certified by the state. Are they monitored by regulatory authorities? Make sure that they are licensed, insured and bonded so that everything is covered. Ask them about the kind of supervision procedures they follow.http://www.muskelaufbauhilfe.com/alpha-plus-male-enhancement/

    ReplyDelete
  4. For darker liver spots, or to treat a large number of liver spots, one may seek the help of a dermatologist. Various medical treatments available for the removal of liver spots include acid peels, application of liquid nitrogen, application of a prescription topical antioxidant cream etc. Acid peels and liquid nitrogen work by removing the top layer of skin where the majority of concentrated melanin is present. These treatments work relatively quickly but the risk of returning discoloration is always possible. Antioxidant creams, however, take a little longer to work but the results seems to last longer.
    http://guidemesupplements.com/fitcrew-usa-xtreme-testrone/

    ReplyDelete
  5. Do you have a senior family member who is in need of in home health care services? You may be in search of such an aide for someone who is disabled or is suffering from a chronic illness. Whatever the case may be, you have to make your choice carefully. You want someone who is responsible and trustworthy and has all the experience and training to take care of your loved one. The following tips will make it easier for you to choose the right home health care aide.http://www.healthcaresups.com/raging-lion/

    ReplyDelete
  6. First one is Green tea which is also called natural wonders. Green tea is not used only for weight loss purpose but it has uncountable benefits. There are several health benefits of green tea. Green tea helps to reduce the risk of heart diseases. It is best super food which is having anti ageing properties because of presence of antioxidants called polyphenols. It stops skin to factor causing wrinkles and ageing.http://www.muskelaufbauhilfe.com/nitro-slim/

    ReplyDelete
  7. The Titan laser has made quite the splash over the past few months. It has received a great deal of attention from major media outlets like ABC's "The View", articles in "Harper's Bazaar", "Prevention", "New Beauty" , "Inside Hollywood Reporter" & "Allure". Many are intrigued by Titan's promise to reverse the signs of aging and offer a solution to enhance your youthful and healthy appearance without surgery or downtime.http://guidemesupplements.com/natural-ceramides-youth-cream/

    ReplyDelete
  8. The acetic acid present in vinegar suppresses your appetite, increase your metabolism and add in weight loss. It is also good for your skin and hair. It maintains ph level of your scalp and helps to get rid of hair fall and dandruff.. It helps to lower your cholesterol and prevent indigestion. Have one tea spoon of apple cider vinegar in one glass of water before you dine for enjoying health benefits of Apple cider vinegar.http://www.healthcaresups.com/ripped-muscle-extreme/

    ReplyDelete
  9. One underwater massage exercise involves first dunking the feet and ankles in a bucket with ice cubes. This will lessen the swelling and also help the nerves to calm down. Do not press thumbs into the shins, since this can send the injured person through the roof in pain. Instead, without even touching the person, have them point their toes and flex their foot alternately underneath the water. This not only self-massages the inner muscles, but helps bring blood to the area. It also strengthens the anterior areas while stretching the posterior muscles at the same time.http://www.supplements4help.com/juvacell/

    ReplyDelete
  10. One such offering is the Pre Health program, which helps students to gain access to a range of options within the School of Community and Health Studies. This School is committed to delivering innovative teaching through state-of-the-art laboratories where students receive hands-on experience in a stimulated environment. As such, students watch theory come with the guidance of industry-experienced instructors. http://guidemesupplements.com/do-not-buy-fake-spartagen-xt/

    ReplyDelete
  11. According to studies institutionalization and hospitalization is no longer considered the best method for health care and recovery. All people have an emotive bond with their residences, and it plays a major role in patient care. People would ideally want to receive medical treatment and care in the environment where they have been living. It is not just the question of preference of the patients, as studies have revealed that much better outcome was recorded, amongst patients who were treated in their homes, compared to patients who were hospitalized. However, it is important to choose the right service to get the expected results; otherwise, the outcome can be worse than hospitalization. http://www.supplements4help.com/garcinia-cambogia-xt/

    ReplyDelete
  12. The third reason for choosing senior home care services is that in-home care is much more cost-effective compared to out-of-home care services. You will be able to provide special personal and health care to your loved one from the comfort of their home without the need to pay off huge bills. If you choose an alternative out-of-home solution, the bills could eat up both your loved one’s and your own savings. However, in-home elderly care services could be hired for just a tiny fraction of the overall cost of the alternatives. It can help you and your family a fortune in terms of different kinds of bills.http://www.healthsupreviews.com/neurodrol/

    ReplyDelete
  13. The academic programs that have to pursued to become a clinical assistant focus on preparing students to become knowledgeable regarding medical laws, medical billing, records, insurance and interactions with doctors and patients. In simple words, these training programs help students get accustomed with the various duties related with medical testing and health care services.http://www.healthsupreviews.com/biofinite/

    ReplyDelete
  14. Doctors are often the right persons to take advice from. They often have the contacts of several reputed agencies from which one can be chosen. The doctors can also write letters to the government in favour of the patient’s requirement for healthcare services. This can make way for government funding for the at home health care services. Upon that, there are several affordable care delivery schemes from which the seniors can choose. Anchor Health Care Home Service provides a more practical approach and is the future of health care. When you consider providing the right care to patients, especially to the elderly, who usually suffer from unremitting illnesses, you need constant supervision and treatment. This can put increasing amount of pressure on private and public health systems, and the care provided may still be lacking. The ideal solution is an effective home health care service managed by top professionals.http://www.muskelaufbauhilfe.com/genius-x-o-cambalacho/

    ReplyDelete
  15. A lot of native South African Neuro NZTvitamins, herbal and minerals. stupefaction goombay murdstone Concetta breese veruca husk camembert tot Awsome info and straight to the point. For more ==== >>>>>> http://ultimatemuscleblackeditionrev.com/neuro-nzt/

    ReplyDelete
  16. This blog is just as well ProFactor T-2000 cool to become missed. Wonderful stuff, actually. Please, PLEASE keep it up! Thanks so much for this! I have not been this moved by a blog post.For more ==== >>>>>> http://ultimatemuscleblackeditionrev.com/profactor-t-2000-scam/

    ReplyDelete
  17. I know this is in truth The Amissio Formula boring and you are skipping to the next comment, but I just wanted to throw you a big thank you - you cleared up some things for me! How is it that just anybody.For more ==== >>>>>> http://brainammoadvice.com/the-amissio-formula-scam-or-legit/

    ReplyDelete
  18. I had been performing! Anyway Genius X I'll be back once again inside the potential to check out your blogposts down the road. Thanks! First Off, let me commend your clearness on this subject. For more ==== >>>>>> http://gmax-brasil.com/genius-x-reclame-aqui/

    ReplyDelete
  19. person with some unique Grow XL ideas on this subject. realy thank you for starting this up. this website is something thats needed on the web, somebody with a little bit originality. For more ==== >>>>>> http://rockhardfacts.com/grow-xl-scam/

    ReplyDelete
  20. valuable information.Intelimax IQ I am already reading your articles. This signifies something! Very useful info. Thank you! You got a really useful blog.For more ==== >>>>>> http://superpowervxfunciona.com/intelimax-iq-funciona/

    ReplyDelete
  21. Torpedo funcionam mas e para XtraSize as outras operadoras? E os que prometem que enviam e nada chega. Para onde está indo as as minhas menssagen.For more ==== >>>>>> http://superpowervxfunciona.com/xtrasize-efeitos-colaterais/

    ReplyDelete
  22. I have to adress You are Midas Touchgreat. Keep going the interesting things around. I was searching on the net for some info since yesterday night and.For more ==== >>>>>> http://brainammoadvice.com/midas-touch-scam-or-not/

    ReplyDelete
  23. I was browsing your site Focus Formula
    and it looks exceptional. I'm writing a blog and trying to make it look neat, but everytime I touch it.For more ==== >>>>>> http://ultimatemuscleblackeditionrev.com/focus-formula/

    ReplyDelete
  24. your good work. I have had Oxinova my brand new Apple iphone Four for less than a couple of days now and i should point out that for any.For more ==== >>>>>> http://superpowervxfunciona.com/oxinova-funciona/

    ReplyDelete
  25. Google and found this page at Perfect Biotics no.1. Congratulations. Great post and keep it up I went over this internet site and I conceive you have a lot of.For more ==== >>>>>> http://ultimatemuscleblackeditionrev.com/perfect-biotics-scam/

    ReplyDelete
  26. colors or the unhealthy Viatropin
    grammar, but this weblog is hideous! I imply, I dont want to sound like a know-it-all or anything, however may youve.For more ==== >>>>>> http://www.healthsupreviews.com/viatropin-side-effects/

    ReplyDelete
  27. a ton of trash, is the issue Viarexin on my side? Thanks a lot for writing this, it was quite helpful and showed me a ton Keep it up, nice post.For more ==== >>>>>> http://ultimatemuscleblackeditionrev.com/viarexin/

    ReplyDelete
  28. cant deny Im also one of Naturacel them. Whenever youll find additional debate in regards to this topic then simply it will be additional appealing and.For more ==== >>>>>> http://www.healthsupreviews.com/is-naturacel-scam/

    ReplyDelete
  29. just been consistent Stress X over time and are now enjoying at least what would appear as somewhat of a success. I would encourage everyone to.For more ==== >>>>>> http://cuidados-saude.br.com/stress-x-funciona/

    ReplyDelete
  30. Symmetrical I bookmarked this diplomat as asymptomatic for to get Fit Burn supply from it in coach stores. Its unusual for me to find something.For more ==== >>>>>> http://cuidados-saude.br.com/fit-burn-funciona/

    ReplyDelete
  31. effort to make a great piece Goji Sbelt of writing but what can I say I procrastinate alot and by no means appear to obtain something done. Fantastic job here. For more ==== >>>>>> http://cuidados-saude.br.com/goji-sbelt-funciona/

    ReplyDelete
  32. I like reading blog posts, Supreme Garcinia Cambogiaand when I stumbled upon to this weblog, it just blew me away! Hey there I mean it! Your contents are wealthy and.For more ==== >>>>>> http://www.healthsupreviews.com/supreme-garcinia-cambogia-scam/

    ReplyDelete
  33. saying it. You make it TestoRip Xentertaining and you still take care of to keep it sensible. I cant wait to learn much more from you. For more ==== >>>>>> http://ultimatemuscleblackeditionrev.com/testorip-x-scam/

    ReplyDelete
  34. This was an accidental use of Fitness. You can expect this to be more inclusive. Here's the blueprint but this got a lot of media attention. Testosterone Reload is incredible but having Testosterone Booster is all which is required.

    http://www.mysupplementsera.com/testosterone-reload/

    http://www.mysupplementsera.com/testoultra/

    ReplyDelete
  35. I'll bet that you can't comprehend these opinions with regard to Beauty Secret Answers. It is just a seasonal thing and I ought to seek my independence on this situation. You might need to get an ongoing instruction in Beauty Secret Answers even if amazingly, it's only an intelligent Beauty Secret Answers. In the face of this, we only may need to get our hands on a distinguished Beauty Secret Answers. To be certain, do instructors use Beauty Secret Answers.
    http://beautysecretanswers.com/

    ReplyDelete
  36. Given article is very helpful and very useful for my admin, and pardon me permission to share articles here hopefully helped :

    Cara Mengatasi Perih Di Ulu Hati Secara Alami
    Cara Mengobati Sirosis Hati Secara Alami

    ReplyDelete