BigxxxDesign [BD]
Würden Sie gerne auf diese Nachricht reagieren? Erstellen Sie einen Account in wenigen Klicks oder loggen Sie sich ein, um fortzufahren.



 
StartseiteNeueste BilderSuchenAnmeldenLogin
 

 [VB6] A Few Modules&Functions!

Nach unten 
AutorNachricht
[BD]Admin Bigxxx
BD-Admin
BD-Admin
[BD]Admin Bigxxx


Anzahl der Beiträge : 30
Location : Germany
Anmeldedatum : 13.09.08

[VB6] A Few Modules&Functions! Empty
BeitragThema: [VB6] A Few Modules&Functions!   [VB6] A Few Modules&Functions! I_icon_minitimeMo Sep 15, 2008 7:40 pm

----------------
OPEN BROWSER:


  • Put this in Module or on Top!


Code:
Private Declare Function ShellExecute Lib _
              "shell32.dll" Alias "ShellExecuteA" _
              (ByVal hwnd As Long, _
              ByVal lpOperation As String, _
              ByVal lpFile As String, _
              ByVal lpParameters As String, _
              ByVal lpDirectory As String, _
              ByVal nShowCmd As Long) As Long
               
Private Const SW_SHOW = 1

Public Sub Navigate(ByVal NavTo As String)
  Dim hBrowse As Long
  hBrowse = ShellExecute(0&, "open", NavTo, "", "", SW_SHOW)
End Sub 

  • Put this into a Button, to open a Link!

Code:

Navigate "http://bigxxxdesign.forenverzeichnis.com" 

  • Put this into a Button, to send a Email!

Code:
Navigate "mailto:NAME@hotmail.com" 

----------------
Protect your Project with a Password:


  • Create...

A new Form
1 Textbox
1 Button
1 Label

  • Label:

Write in for example... "Enter here the Password!"

  • Button:

Code:
If Text1.text = "PASSWORD" then 'PASSWORD = Your Password!
Form2.Show 'If you made a second form!
End if


----------------
Set window on TOP:


  • Create...

A timer ( Set interval to 1 )

  • Code...


Module:
Code:
Private Declare Function SetWindowPos& Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)

General:
Code:
'this code makes the window stay on top:
'rtn = SetWindowPos(<form name>.hwnd, -1, 0, 0, 0, 0, 3)

'window will not stay on top with this code:
'rtn = SetWindowPos(<form name>.hwnd, -2, 0, 0, 0, 0, 3)

private sub check1_click ()

if check1.value = 1 then rtn = SetWindowPos(<form name>.hwnd, -1, 0, 0, 0, 0, 3) else rtn = SetWindowPos(<form name>.hwnd, -2, 0, 0, 0, 0, 3)

end sub


----------------
Play Sound:


  • Create...

Button

  • Code...


Module :
Code:
Public Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

General :
Code:
Public Sub Button1(strFileName As String)
    sndPlaySound strFileName, 1
End Sub
Nach oben Nach unten
https://bigxxxdesign.forenverzeichnis.com
 
[VB6] A Few Modules&Functions!
Nach oben 
Seite 1 von 1

Befugnisse in diesem ForumSie können in diesem Forum nicht antworten
BigxxxDesign [BD] ::  C.o.d.i.n.g :: Visual Basic 6 & 8-
Gehe zu:  
©phpBB | Kostenloses Hilfe-Forum | Einen Missbrauch melden | Cookies
Dieses Forum wird von Forumieren kostenlos gehostet. Erstellen Sie Ihr eigenes Forum mit unserem Hosting-Service.