VB Code
2014-07-08, 11:51 AM,
#1
Can someone tell me how to make the thing where the user "connects" there phone to the program and it has a progress bar when you click connect, then the popup saying device connected. Thanks in advance.
Reply
2014-07-08, 12:27 PM,
#2
Code:
Imports System.Timers
Public Class Form1

    Public tim As Timer
    Private _increment As Int32



    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        pgrsDeviceStatus.CheckForIllegalCrossThreadCalls = False
    End Sub

    Private Sub EventHandler()
        _increment = _increment + 1
        pgrsDeviceStatus.Value = _increment

        If (_increment = 100) Then
            tim.Enabled = False
            tim.Stop()
            MessageBox.Show("Device Conncted", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information
                            )
        End If

    End Sub

    Private Sub btnConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConnect.Click
        tim = New Timer
        tim.Interval = 100
        tim.Start()
        tim.Enabled = True
        AddHandler tim.Elapsed, New ElapsedEventHandler(AddressOf EventHandler)
    End Sub
End Class

Your Designer should have a button (name=btnConnect) and a progress bar (name=pgrsDeviceStatus)
Latest Thanks - View all

Duke546(2014-07-09 02:40 AM) 

Feel free to PM me if You need any assistance in VB.NET/C#.NET. Will help you for sure, if I can. :)
Reply
2014-07-08, 12:37 PM,
(This post was last modified: 2014-07-08, 12:38 PM by #DEViL.)
#3
Little easy for you ---> Change the code according to your needs <---

Drag a timer into the Form
Double click on "Connect" button, and the write the code:
Code:
Timer1.Start()

Click click the Timer [below the form] and write the code:
Code:
ProgressBar1.Increment(5)
If ProgressBar1.Value = 5 Then Label1.Text = "Searching for Device"
End If
If ProgressBar1.Value = 50 Then Label1.Text = "Device Found, Identifying Device"
End If
If ProgressBar1.Value = ProgressBar1.Maximum Then
Label1.Text = "iPhone or Android Detected"
MsgBox("Whatever you want here.......", MsgBoxStyle.Exclamation)
Timer1.Stop()
End If

<---- Modify the code according to your Needs ---->
Latest Thanks - View all

Duke546(2014-07-09 02:40 AM) 

[Image: eOKOotU.jpg]
Reply
2014-07-09, 02:23 AM,
#4
(2014-07-08, 12:37 PM)theinocent9090 Wrote: Little easy for you ---> Change the code according to your needs <---

Drag a timer into the Form
Double click on "Connect" button, and the write the code:
Code:
Timer1.Start()

Click click the Timer [below the form] and write the code:
Code:
ProgressBar1.Increment(5)
If ProgressBar1.Value = 5 Then Label1.Text = "Searching for Device"
End If
If ProgressBar1.Value = 50 Then Label1.Text = "Device Found, Identifying Device"
End If
If ProgressBar1.Value = ProgressBar1.Maximum Then
Label1.Text = "iPhone or Android Detected"
MsgBox("Whatever you want here.......", MsgBoxStyle.Exclamation)
Timer1.Stop()
End If

<---- Modify the code according to your Needs ---->

Thanks for helping him out.

Any questions related to CPA belong here.
Before posting, make sure you are in the correct section.

I am temporarily absent due to family circumstances.

Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Where to find content locker code on a pre designed landing page? Holyearnings 3 152 2017-09-13, 06:56 AM
Last Post: Holyearnings
  OGads captcha locker onclick code ? gamertrial1 1 173 2017-08-11, 10:04 AM
Last Post: lovecash
  Decode this .js code roktim 11 443 2017-07-24, 09:27 PM
Last Post: Harrington
  how to youtube verify code phone ? warrensandre25 2 148 2017-07-23, 07:29 AM
Last Post: Padfoot
  [HELP] How Do I Remove Widget Container From The Code blunt 0 139 2017-06-14, 11:35 PM
Last Post: blunt




About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top