1. Form her zaman üstte(vb5)
VISUAL BASIC
" Bu vb5 için geçerlidir. diğer form üstte vb6 için geçerliydi. ..."
Hepsini Seç'Çalışan programınızda yeni bir form açıldığında bunun en 'üstte görünmesi için; örn 2 form oluşturun form1_load 'a
'form2.Show ,me
'yazın.
'Bu yöntem yalnızca programınızdaki formlar için geçerlidir. Diğer bir program çalıştığında bunun üzerini örtebilir.
'Tüm uygulamaların üzerinde kalan bir form
'oluşturmak için; declare kısmına
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) As Long
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1
Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
En üstte kalmasını istediğinizde:
SetWindowPos hwnd, _
HWND_TOPMOST, 0, 0, 0, 0, _
SWP_NOMOVE + SWP_NOSIZE
Bu özelliği geri almak için:
SetWindowPos hwnd, _
HWND_NOTOPMOST, 0, 0, 0, 0, _
SWP_NOMOVE + SWP_NOSIZE
2. İp numaranı gör
VISUAL BASIC
" Winsock nesnesi ile ip numaranı gör ..."
Hepsini Seçöncelikle Project>Components yolunu izleyerek açılan pencerenin Controls bölümünden Microsoft Winsock Controls 6.0 (SP6) yi araç kutusuna ekleyin
Forma buton ve winsock nesnesini ekleyin.
Aşağıdaki kodları yazın
Private Sub Command1_Click()
ip = Winsock1.LocalIP
MsgBox ip
End Sub
3. 3 yazılı ve 3 sözlü notu girilerek ortalama hesabı yapar ..."
Hepsini SeçDim kontrol As Integer
Private Sub Command1_Click()
If Text1.Text < 0 Or Text1.Text > 100 Then
MsgBox "yanlış"
ElseIf Text2.Text < 0 Or Text2.Text > 100 Then
MsgBox "yanlış"
ElseIf Text3.Text < 0 Or Text3.Text > 100 Then
MsgBox "yanlış"
ElseIf Text4.Text < 0 Or Text4.Text > 100 Then
MsgBox "yanlış"
ElseIf Text5.Text < 0 Or Text5.Text > 100 Then
MsgBox "yanlış"
ElseIf Text6.Text < 0 Or Text6.Text > 100 Then
MsgBox "yanlış"
End If
Text7.Text = (Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text)) / 3
Text8.Text = (Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text)) / 3
Text9.Text = (Val(Text7.Text) + Val(Text8.Text)) / 2
Select Case Text9.Text
Case 0 To 44
Text10.Text = "ÇAKTI"
Case Else
Text10.Text = "YIRTTI"
End Select
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text1.SetFocus
End Sub
Private Sub Command3_Click()
kontrol = MsgBox("ÇIKMAK İSTEDİĞİNİZE EMİN MİSİNİZ?", vbQuestion + vbYesNo, "Çıkış Formu")
Select Case Control
Case vbYes
End
End Select
End Sub



Alıntı ile Cevapla
Bu Konuyu Paylaşın !