Results 1 to 7 of 7

Thread: VB Programmers HELP!!

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    6

    VB Programmers HELP!!

    Im having a bit trouble so i'll go straight to the point I have 4 queries...

    1. My 1st Question is
    '---------------------------------------------------------------------------------------
    ' If Text1.Text And Text2.Text Contains/Has a TEXT Then Form2.Show
    ' But If Text1.Text And Text2.Text doesnt contain a TEXT Then Form3.Show
    ' My Code is Popping 2 Forms at the same time i just wanted one at a time please help...
    '---------------------------------------------------------------------------------------

    Private Sub Command1_Click()
    If Text1.Text And Text2.Text = Value4 Then
    Form2.Show
    End If
    If Text1.Text And Text2.Text = "" Then
    Form3.Show
    End If

    End Sub



    2. How to VB Text Boxes Going/Sends to an Email??
    ' -MS Socket Control 6.0 (Winsock)?
    ' -MS Internet Control (WebBrowser)?
    ' -MS Internet Transfer Control 6.0 (Inet)?
    'W/c One Is Effective/Reliable and how? help will be appreciated



    3. My AV detects "Kewlbuttonz.OCX" as a virus i just want WinXP Button Styles on my program like PrjChameleon.OCX is another great button object similar to Kewlbuttonz.OCX..

    Well anyways, i just wanted to know what are the substitute to the said ActiveX Controls, what are the alternates of Kewlbuttonz.OCX & PrjChameleon.OCX??



    4. Is it possible to compress/bind a Dynamic Link Library or an ActiveX Control on an executable file, my concept is running a single exe file independently, for example

    ActiveSkin Module has it's own .skn file which is the skin for ActiveSkin.. How can i bind/compress the .skn file on the executable file?
    if this can be done as well with .dll or .ocx, kindly let me know...

    Is it possible to do so. then how. Help will be appreciated.


    Any code posted to help me/i use will be duly credited.
    Any output is much appreciated
    Thanks in advance
    More Power... VBForums

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: VB Programmers HELP!!

    Moved to VB6 and Earlier

  3. #3
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VB Programmers HELP!!

    If Text1.Text And Text2.Text = "" Then
    If Text1.Text = "" And Text2.Text = "" Then
    also you should probable be using elseif
    vb Code:
    1. If Text1.Text = value4 And Text2.Text = Value4 Then
    2. Form2.Show
    3. Else If  Text1.Text = "" And Text2.Text = "" Then
    4. Form3.Show
    5. End If

    i use vbsendmail or CDO.message, you can search these, there are several other methods and other programmers will have different preferances
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  4. #4
    Cumbrian Milk's Avatar
    Join Date
    Jan 2007
    Location
    0xDEADBEEF
    Posts
    2,448

    Re: VB Programmers HELP!!

    1) I'm surprised any forms are showing at all, the code you show should cause a type mismatch error
    Code:
    If Text1.Text And Text2.Text = Value4 Then...
    should be
    Code:
    If Text1.Text = value4 And Text2.Text = Value4 Then...
    2)Dunno

    3)Check out Manifest files, you can have XP style buttons without using any third party controls.

    4)You can embed just about anything you want into an executable as part of a Resource file, I'm not sure that embedding dll's is a good idea.

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: VB Programmers HELP!!

    Quote Originally Posted by Milk
    3)Check out Manifest files, you can have XP style buttons without using any third party controls.
    I believe you will find examples of this in our CodeBank, so do a search there.

  6. #6

  7. #7
    Hyperactive Member Philly0494's Avatar
    Join Date
    Apr 2008
    Posts
    485

    Re: VB Programmers HELP!!

    Code:
    If InStr(Text1.Text, Value4) And InStr(Text2.Text, Value4) Then
    Form2.Show
    Else
    Form3.Show
    End If
    this will detect if a certain string(value4) is in both text1 AND text2, if it is form2 shows, otherwise form3 shows

    just make sure Value4 is a string

    if you want it to be either text OR text, then replace AND with OR
    Last edited by Philly0494; May 17th, 2008 at 11:33 PM.

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