CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Post VB Frequently asked questions (50 and counting)

    Below is a list of question that are beeing asked over and over again.
    With the question, we also give you the answer, or a link to an already existing post in this board.

    With this we (VB Moderators) hope to reduce the amount of obsolete posts made in this forum.

    This list is probably far from complete. If you want us to add a question to the list, or if you think there's a wrong answer, please contact one of the moderators (Cakkie or Cimperiali).

    Honored contributors:
    Cakkie
    Cimperiali
    JeffB
    Twodogs
    M Owen
    + all the authors of the posts of course
    Last edited by Cakkie; April 25th, 2003 at 08:42 AM.

  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477
    Q) Do I need ServicePacks?
    Yes. Of everything...
    but beware: newest might be dangeorus in first month
    An issue with Xp sp 2
    positive experiences:
    Example 1 : Vb
    Example 2 : Vb
    Example 3 : Deployment Wizard
    Example 4 : Office
    [do you need more?]

    Where to find Sp6 for visual studio

    Q) How can I search the forum?
    A) Ok, I added this myself:
    http://www.codeguru.com/forum/search.php?s=

    Q) How many variables, forms, controls may use?
    http://www.codeguru.com/forum/showthread.php?t=305509

    Q) How do I open a webpage in the default browser?
    Q) How do I open a new email message with a specified address?
    Q) How do I open a file with it's assiciated program?

    A) Using ShellExecute

    Q) How do I send an email from VB?
    A1) Using Outlook or MAPI or Cdo or Winsock
    A2)Some more options
    A3)Outlook Express

    Q) How do I send a Fax from VB?
    http://www.codeguru.com/forum/showth...&highlight=fax

    How to get HTML from WebBrowser ?
    innerHTML
    in the WebBrowser control


    Q) How do I create, list, or retrieve file asssociations in Vb?
    A)http://www.codeguru.com/forum/showth...ht=association

    Q) Does VB support multi-threading?
    No, but this could be usefull anyway:
    http://www.codeguru.com/forum/showth...hreadid=189649

    Q) Where can I find a VB5/6 decompiler?
    A) Nowhere. There's no such thing as a VB5/6 decompiler.
    There are some programs that allow you retrieve properties
    of forms (like captions etc), but you can't get back the code.

    Q) How do I open a password protected database using ADO?
    A) http://www.codeguru.com/forum/showth...threadid=27393

    Q) How can I get the command line parameters passed to my VB program?
    A) http://www.codeguru.com/vb/articles/1755.shtml

    Q) How can I let the user select a folder?
    A) http://www.codeguru.com/forum/showth...hreadid=209798

    Q) How can I save/get a picture in a database?
    A) http://www.codeguru.com/forum/showth...hreadid=197304

    Q) How to capture screen?
    A1)http://www.codeguru.com/forum/showth...hlight=capture
    A2)A working example saving bmp screenshots every 5 minutes
    A3)Another one that draw also the mouse cursor position

    Q) How can I download a file from the internet?
    A) http://www.codeguru.com/forum/showth...hreadid=220177

    Q) How can I call a function in a C++ dll from VB?
    A) http://www.codeguru.com/forum/showth...threadid=29471

    Q) How can I position a messagebox/inputbox?
    A1) http://www.codeguru.com/forum/showth...threadid=20567
    A2)http://www.codeguru.com/vb/controls/...cle.php/c3483/


    Q) How to read the content of a file in one time?
    A) http://www.codeguru.com/forum/showth...hreadid=220439

    Q) How to write to a file ?
    A1)sequential, random, binary example
    A2)FileSystemObject example

    Q) Any trick to seek in a file ?
    a great Chris Eastwood can teach one

    Q) How can I get information on the tables/queries in a database
    A)You can use ADOX

    Q) How do I use Crystal reports?
    A)There's now a forum dedicated to Crystal Report

    Q) Where can I find other VB resources, like examples and stuff
    A) http://www.codeguru.com/forum/showth...&postid=568385

    Q) How can I get the name of the computer?
    A) http://www.codeguru.com/forum/showth...hreadid=220717

    Q) How can I get the currently logged on user?
    A) http://www.codeguru.com/forum/showth...hreadid=200297

    Q1) How to run statements in a string?
    A)Use the scriptcontrol

    Q2)How to load or show forms having only form name:
    Look for Bruno answers here

    Q3)How to Use CallByName ?
    http://www.codeguru.com/forum/showth...884#post699884

    http://www.codeguru.com/forum/showth...ght=callbyname

    Q) How can I evaluate an expression in a string.
    A)Use the scriptcontrol

    Q) What to do with single quotes ( ' ) in SQL Statements?
    A) http://www.codeguru.com/forum/showth...hreadid=204669

    Q) How to disable the default popup menu of a textbox?
    A) http://www.codeguru.com/forum/showth...hreadid=216832

    Q) How to manage shortcuts in VB?
    A1)Create shortcut

    A2)VB5STKIT.DLL vs VB6STKIT.DLL

    A3)Launch shortcut

    A4)Get stored path from shortcut

    A5)Working Dir of shortcut

    A6)Create an Uninstall Shortcut in the StartMenu

    Code:
    ********************************
    * Continue a bit down     
    ********************************
    Last edited by Cimperiali; December 2nd, 2004 at 11:19 AM.

  3. #3
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477
    ...continued

    Q) Not really a question, but a good link, explains a lot of small nice to know things, very usefull for beginners
    A) http://www.planetsourcecode.com/vb/s...45014&lngWId=1

    Q) Microsoft good links, explains things about Ado, Dao and Rdo
    http://www.codeguru.com/forum/showth...hreadid=248230

    Q) Sql Server and Access the need of a Primary Key to link access table
    http://www.codeguru.com/forum/showth...2&page=1&pp=30

    Q) Api-Guide, free examples on Api usage in vb
    www.mentalis.org/agnet/apiguide.shtml

    Q) Simulate Enter Key on another window
    MKsa answer

    Q) Simulate Mouse click
    A)Shree solution
    B)Covin solution
    C)Iouri solution
    D)Lothar Solution

    Q) Can I divide a CommandButton in regions as per clicking ?
    A)Luthv Tip

    Q) Set Default (System) Printer
    http://www.codeguru.com/forum/showth...772#post747772

    Q) Change Printer Settings
    http://www.codeguru.com/forum/showth...hlight=printer

    Q) Dynamically add controls
    1)http://www.codeguru.com/forum/showth...dding+controls

    2)http://www.codeguru.com/forum/showth...dding+controls

    3)http://www.codeguru.com/forum/showth...commandbuttons

    Q) Disable X Form Button
    1)http://www.codeguru.com/forum/showth...48#post1026548

    2)http://www.codeguru.com/forum/showth...hlight=disable

    Q) Disable minimize/maximize button of MDIForm
    1)http://www.codeguru.com/forum/showth...hlight=disable

    Q) Icons in menu
    1)http://www.codeguru.com/forum/showth...ght=icons+menu

    2)http://www.codeguru.com/forum/showth...t=icon+in+menu

    3)http://www.codeguru.com/forum/showth...t=icon+in+menu

    Q) Right justify Help Menu Item
    http://www.codeguru.com/forum/showthread.php?t=305427

    Q)How to deal with Nt (win2k) eventLog
    1)How to write to nt log
    http://www.codeguru.com/forum/showth...525#post828525
    2)How to read from event log
    http://www.codeguru.com/forum/showth...hreadid=265918

    Q)How to launch dos commands?
    http://www.codeguru.com/forum/showth...&highlight=dos

    Q)How to Shell an exe from ASP?
    http://www.codeguru.com/forum/showth...hreadid=233294

    Q)How to deal with Registry
    1) JeffB suggestment: http://www.codeguru.com/forum/showth...088#post850088
    2)http://www.codeguru.com/forum/showth...248#post848248

    Q)How to Block a keyboard key even for
    external programs

    (Note: this will NOT disable Ctrl+Alt+Del combination)
    1)works on Win2000:
    http://www.codeguru.com/forum/showth...hreadid=281666

    Something not all know:
    How to: handle file greater than Two_Gigs in Vb (if Os lets you)
    http://www.codeguru.com/forum/showth...hreadid=270549

    Something always useful
    How to: Zip and Unzip in Vb
    http://www.codeguru.com/vb/gen/vb_gr...cle.php/c6743/
    Last edited by Cimperiali; October 8th, 2004 at 09:57 AM.
    Tom Cannaerts
    email: cakkie@cakkie.be.remove.this.bit
    www.tom.be (dutch site)

  4. #4
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    ...Continued... More stuff

    Q) HowTo kill a Process
    http://www.codeguru.com/forum/showth...446#post936446

    Q) HowTo discover Cpu/Mem usage
    1)http://www.codeguru.com/forum/showth...hlight=process
    2)http://www.codeguru.com/forum/showth...hlight=process

    Q) get Exe name from Form caption
    http://www.codeguru.com/forum/showth...hlight=process

    Q) Advanced PrevInstance using mutex
    hspc solution

    The truth on SSTab Control
    What WizBang TheWizard discovered

    Q) My vb program does not close even if I unloaded the form
    JeffB: Exit process
    or: a cylce to be sure you really unloaded all and some advices more
    and - in any case - avoid "End" (unless on Windows Me)

    Q) Suddenly Right() and Mid() stop working...
    WizBang solution

    Q) Dealing with As400 and waitMsg
    Dmorley Great solution

    Q) Is it possible to Send Ctrl+Alt+Del using code?
    We are still working on that...

    Something more under the Hood?
    Nice article on How Vb stores data

    Q)How to Invert Colors ?
    Vb_The_Best solution
    Last edited by Cimperiali; June 13th, 2005 at 03:54 AM.
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  5. #5
    Join Date
    Dec 2001
    Posts
    6,332

    Re: VB Frequently asked questions (50 and counting)

    Q) How to convert an image to JPEG
    http://www.codeguru.com/forum/showthread.php?t=288179
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

  6. #6
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Reputations

    From http://www.codeguru.com/faq.php

    What are the "reputations" in the forums
    The CodeGuru site allows for a number of different ratings. Reputations is one of
    these ratings. Reputations are points gained or lost on individual posts within the
    discussion forums. Because these are tied to individual posts, they reflect back on
    the person who made the post, thus giving them a reputation.

    Your reputation can have positive and negative changes. Better yet, as a member
    of CodeGuru, you can add to others' reputations. If someone gives you a great
    answer, you can give them a positive reputation point(s) as a thanks. If someone
    blasts a thread with an off-topic post or with negative comments, you can give
    them a negative reputation. With time, these reputations will help the "star
    posters" rise and the people who only provide noise to become visible as well. Is
    it possible to cheat the system? Yes, but as it was in the old days, the forum
    moderators and I are aware of many of the ways to cheat the system and will
    take appropriate actions.

    Reputations are indicated by a small graphic. The more positive your reputation,
    the more visible the graphic will become. This will be displayed by all your posts
    and in your profile. To add to someone's reputation, you will click a small scale
    graphic on the upper, right area of the post. It looks like a scale or balance. This
    will result in a pop-up window as shown in Figure 1.


    Figure 1: The Reputations window.

    In this window, you can either give a positive point (approve) or negative
    (disapprove). You should also add a comment on why you approve or disapprove.
    If this is your post, you'll be able to see the reputation points you have by clicking
    on the scale;

    Reputations come with rules. You only get a certain number of points each day, so
    use them only for the best postings and responses. Right now, this is 6 times per
    day that points can be given.

    There is reputation POWER. Power is the number of points you give each time.
    This starts at 1 point, but increases based on a number of criteria such as posts,
    tenure, and your own reputation. When you give negative points, they are at half
    of your power level.


    Here are some other rules and settings for reputations(which are subject to
    change):

    You must give reputations to a number of different people before you can
    come back to the same person again. No giving just one person all your points!

    For every 1000 posts at CodeGuru (that are counted—so not including chitchat),
    you get an extra point of reputation POWER.

    For every year you have been with CodeGuru, you get an extra point of repuation
    POWER.

    For every 1000 points of reputation you receive, you get an extra point of
    repuation POWER.

    While you can use reputation points today, your reputations will not be applied
    until the following conditions are met:

    You must have posted at least 25 counted messages to CodeGuru.

    There was a rule that you must have 5 points of reputation yourself before your
    points will count (you start with 5).
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  7. #7
    Join Date
    Dec 2001
    Posts
    6,332

    Re: VB Frequently asked questions (50 and counting)

    Q) How to print directly to a Dot-Matrix printer:
    http://www.codeguru.com/forum/showth...08#post1435653
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured