ParsX.com
پذیرش پروژه از دانشجویی ... تا سازمانی 09376225339
 
   ProfileProfile   Log in to check your private messagesLog in to check your private messages  |  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups Log inLog in   RegisterRegister 

I want to make a connection.help me

 
Post new topic   Reply to topic    ParsX.com Forum Index -> ويژوال بيسيك .NET
View previous topic :: View next topic  
Author Message
eec
مهمون يكي دو روزه


Joined: 08 Aug 2005
Posts: 3

PostPosted: Wed Aug 10, 2005 9:04 pm    Post subject: I want to make a connection.help me Reply with quote

سلام
چه طور میتوانم connection درست کنم usrename,password,phone number رو هم خودم به برنامه بدم.یا اینکه یک connection رو کنترل کنم.
با تشکر.
Back to top
eec
مهمون يكي دو روزه


Joined: 08 Aug 2005
Posts: 3

PostPosted: Wed Aug 10, 2005 9:06 pm    Post subject: Reply with quote

help me i want to make a conection
Back to top
unknown
مدير بخش ويژوال بيسيك
مدير بخش ويژوال بيسيك


Joined: 05 Dec 2004
Posts: 439
Location: Tehran

PostPosted: Thu Aug 11, 2005 10:32 am    Post subject: Reply with quote

این برنامه ای که شما می خواهید رو می تونید از سایت های مخصوص ویژوال بیسیک دریافت کنید.
یه سری به سایتهای زیر بزن:

www.a1vbcode.com
www.vbcode.com
www.planet-source-code.com
www.vbip.com


ولی بد نیست کد زیر رو هم امتحان کنید.
البته کد زیر در صورتی کار می کند که گزینه ی 'Never Dial a Connection' در Internet options/connections انتخاب نشده باشد.


Option Explicit
 Private Const INTERNET_AUTODIAL_FORCE_ONLINE = 1
 Private Const INTERNET_AUTODIAL_FORCE_UNATTENDED = 2
 Private Declare Function InternetAutodialHangup Lib "wininet.dll" (ByVal dwReserved As Long) As Long
 Private Declare Function InternetAutodial Lib "wininet.dll" (ByVal dwFlags As Long, ByVal dwReserved As Long) As Long



' !! Dial the Net Automatically !!
' This waits until the connection is made and THEN proceeds.

Private Sub Command1_Click()

    'To prompt the user to connect to the Net

    If InternetAutodial(INTERNET_AUTODIAL_FORCE_ONLINE, 0) Then
         MsgBox "You're Connected!", vbInformation
    End If

    'To automatically start dialling

    If InternetAutodial(INTERNET_AUTODIAL_FORCE_UNATTENDED, 0) Then
         MsgBox "You're Connected!", vbInformation
    End If

    'To disconnect an automatically dialled

    ' connection

    If InternetAutodialHangup(0) Then
        MsgBox "You're Disconnected!", vbInformation
    End If

End Sub
Back to top
Display posts from previous:   
Post new topic   Reply to topic    ParsX.com Forum Index -> ويژوال بيسيك .NET All times are GMT + 3.5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum