الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

كيف استخدم Tip OF The Day فى البيسك

مغلق
بدأه عشاق الجنة في 4 فبراير 2003 · 2 رد · 681 مشاهدة · في لغة Ms Visual Basic 6 وما قبلها من إصدارات
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم يا اخوانى الاعزاء

برجاء افيدونى كيف استخدم المساعدو فى الفيجوال بيسك

و هيا Tip of the day

و كيف اصمم ملف المساعدة الذى ينتهى امتدادة hlp

و اشكركم جزيل الشكر

و ربنا يحفظكم يارب العالمين

#2

الأخ عشاق الجنة :

كل عام وأنت وجميع المسلمين بخير بمناسبة عيد الأضحى

يوجد لدي الخاص بما طلبته ، ولكن دعني أبحث عنه في أرشيفي ، وسأضعه لك في المنتدى قريباً جداً حتى تستفيد منه وكل الأخوة المطلعين على هذا المنتدى.

أخوك : أبو مراد:)

#3

هذا الكود مأخوذ من موقع أجنبي:(gift)(gift)

This code will show you how to make "Tip of the day"

form. You will need to make he tips in Text Form (.txt) in NotePad, nad name it TIPOFDAY.TXT.

Make a command button named cmdNextTip, picture box named Picture1, lable box named lblTipText, and a checkbox name

chkLoadTipsAtStartup_Click

Option Explicit

Const TIP_FILE = ""

Dim CurrentTip As Long

Private Sub DoNextTip()

' Select a tip at random.

CurrentTip = Int((Tips.Count * Rnd) + 1)

' Or, you could cycle through the Tips in order

' CurrentTip = CurrentTip + 1

' If Tips.Count < CurrentTip Then

' CurrentTip = 1

' End If

' Show it.

frmTip.DisplayCurrentTip

End Sub

Function LoadTips(sFile As String) As Boolean

Dim NextTip As String ' Each tip read in from file.

Dim InFile As Integer ' Descriptor for file.

' Obtain the next free file descriptor.

InFile = FreeFile

' Make sure a file is specified.

If sFile = "" Then

LoadTips = False

Exit Function

End If

' Make sure the file exists before trying to open it.

If Dir(sFile) = "" Then

LoadTips = False

Exit Function

End If

' Read the collection from a text file.

Open sFile For Input As InFile

While Not EOF(InFile)

Line Input #InFile, NextTip

Tips.Add NextTip

Wend

Close InFile

' Display a tip at random.

DoNextTip

LoadTips = True

End Function

Private Sub chkLoadTipsAtStartup_Click()

End Sub

Private Sub Check1_Click()

SaveSetting App.EXEName, "Options", "Show Tips at Startup", Check1.Value

End Sub

Private Sub cmdHelp_Click()

Dim nRet As Integer

'if there is no helpfile for this project display a message to the user

'you can set the HelpFile for your application in the

'Project Properties dialog

If Len(App.HelpFile) = 0 Then

MsgBox "Unable to display Help Contents. There is no Help associated with this project.", vbInformation, Me.Caption

Else

On Error Resume Next

If Err Then

MsgBox Err.Description

End If

End If

End Sub

Private Sub cmdNewWeb_Click()

Dialog.Show vbModal, Me

Me.Hide

End Sub

Private Sub cmdNextTip_Click()

DoNextTip

cmdPrevious.Enabled = True

End Sub

Private Sub cmdOK_Click()

Unload Me

End Sub

Private Sub Command2_Click()

End Sub

Private Sub Form_Load()

Randomize

' Read in the tips file and display a tip at random.

If LoadTips(App.Path & "" & TIP_FILE) = False Then

lblTipText.Caption = "That the " & TIP_FILE & " file was not found? " & vbCrLf & vbCrLf & _

"Create a text file named " & TIP_FILE & " using NotePad with 1 tip per line. " & _

"Then place it in the same directory as the application. "

End If

End Sub

Public Sub DisplayCurrentTip()

If Tips.Count > 0 Then

lblTipText.Caption = Tips.Item(CurrentTip)

End If

End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

If Button = vbRightButton Then

PopupMenu frmTip.mnuWhatsThis1

End If[/ALIGN]

هذا الموضوع مغلق.

مواضيع مشابهة