تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
معرفة عدد صفحات قسم معين من المنتدى
#1
اريد عند الدخول مثلاً لصفحة القسم يعطيني عدد الصفحات من 1 الى 4 مثلا
واريد التنقل فيما بينها ارجو منكم عمل لي مثال مع اداة الويب براوزير وان يتم التنقل بين الصفحات
مع العلم بان الرابط كالتالي سيكون
PHP كود :
http://vb4arab.com/vb/forumdisplay.php?f=134&pp=200&sort=lastpost&order=desc&page=1 

مع تغيير رقم 1 برقم الصفحة
مع العلم بانني قمت بطلب ذلك من مراقب المنتدى
Raggi Tech

وقال بانه سيطرح الحل بموضوع من قبل 4 ايام والى الان لم يطرحة

ارجو منكم الرد

الرد }}}
تم الشكر بواسطة:
#2
ههههههههههههههههههههههههههههههههههههههههههههههههههههههههههه :confused:
اخت فاتن تحياتي لك
ابلغت حضرتك اني لست متفرغا لطرح الحل هنا و حضرتك سألتيني اكثر من مره في الرسائل الخاصه و على رسائل الزوار و اعطيت حضرتك حل مؤقت

انا لدي الحل ولكن ليس عندي وقت كافي لطرحه باستفاضه الان
ان شاء الله احد من الاخوه الاعضاء يقدمو المساعدة المطلوبه
وشكراً لحضرتك
الرد }}}
تم الشكر بواسطة:
#3
يا ريت يا استاذي بدون مسخرة
وانا ما بدي اسحب مواضيع المنتدى انا بدي بس اتعلم على الاداة

ومثل ما حكيت في الاخوة الاعضاء بقدمو المساعدة وانتا عندك الحل بس مش فاضي :confused: تنسخه من جهازك للمنتدى بارك الله فيك


وكمان مرة بدون ضحك ما الو لزوووم

شكراً لمرورك المؤثر !!!
الرد }}}
تم الشكر بواسطة:
#4
اولا اسف للضحك ولكن انا لحظت ان حضرتك ركزتي على اني لم اساعد حضرتك اكثر من تركيز حضرتك على طلبك
ثانيا كنت احب ان اشرح الكود و لكن اليك الكود
كود :
Private Sub fpages()
كود :
[color=#000080][SIZE=2][FONT=tahoma][b] On Error Resume Next[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]        'لاتوجد مشاركات في هذا القسم.[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]        Dim search = "لاتوجد مشاركات في هذا القسم."[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]        Dim where = InStr(WB.Document.Body.InnerHtml, search)[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]        If where <= 0 Then[/b][/FONT][/SIZE][/color]

[color=#000080][SIZE=2][FONT=tahoma][b]            Dim Elems As HtmlElementCollection[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]            Dim WebOC As Windows.Forms.WebBrowser = WB[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]            Dim numpost As Integer = 0[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]            Elems = WebOC.Document.GetElementsByTagName("TD")[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]            For num = 0 To Elems.Count[/b][/FONT][/SIZE][/color]

[color=#000080][SIZE=2][FONT=tahoma][b]                If InStr(Elems.Item(num).InnerHtml, "vbmenu_control") Then[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                    If numpost = 0 Then[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                        Dim Testpage As String = Elems.Item(num).InnerHtml[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                        Dim MyOutput, MyOutput2 As String[/b][/FONT][/SIZE][/color]

[color=#000080][SIZE=2][FONT=tahoma][b]                        MyOutput = GetStringBetween(Testpage, "<TD style=" & Chr(34) & "FONT-WEIGHT: normal" & Chr(34) & " class=vbmenu_control>", "</TD>")[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                        text1.Text = MyOutput[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                        Dim x = InStr(text1.Text, "صفحة " & pagenum.Text & " من ")[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                        If x > 0 Then[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            text1.SelectionStart = x - 1[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            text1.SelectionLength = Len("صفحة " & pagenum.Text & " من ")[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            text1.SelectedText = ""[/b][/FONT][/SIZE][/color]

[color=#000080][SIZE=2][FONT=tahoma][b]                            lastpagenum.Text = text1.Text[/b][/FONT][/SIZE][/color]



[color=#000080][SIZE=2][FONT=tahoma][b]                            If pagenum.Text > 1 Then[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                                prevpage.Enabled = True[/b][/FONT][/SIZE][/color]

[color=#000080][SIZE=2][FONT=tahoma][b]                                If pagenum.Text = lastpagenum.Text Then[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                                    nextpage.Enabled = False[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                                ElseIf pagenum.Text < lastpagenum.Text Then[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                                    nextpage.Enabled = True[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                                End If[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            ElseIf pagenum.Text = 1 Then[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                                prevpage.Enabled = False[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                                nextpage.Enabled = True[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            End If[/b][/FONT][/SIZE][/color]

[color=#000080][SIZE=2][FONT=tahoma][b]                            pages.Text = "Page " & pagenum.Text & " OF " & lastpagenum.Text[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            getposts()[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            gb2.Enabled = True[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            pages.Left = 50[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                        Else[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            pages.Text = "Only One Page"[/b][/FONT][/SIZE][/color]

[color=#000080][SIZE=2][FONT=tahoma][b]                            pagenum.Text = "0"[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            lastpagenum.Text = "0"[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            nextpage.Enabled = False[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            prevpage.Enabled = False[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            getposts()[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            gb2.Enabled = True[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                        End If[/b][/FONT][/SIZE][/color]

[color=#000080][SIZE=2][FONT=tahoma][b]                        numpost = 1[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                    End If[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                End If[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]            Next[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]        End If[/b][/FONT][/SIZE][/color]

هذا الكود جزء من مشروع و سيأخذ جهد من حضرتك لكي تستوعبي ما هو عمل البرنامج
وهذا هو السبب اني لم اطرح الحل اني ليس لدي وقت لتوضيح الفكره كامله وتركت الموضوع للاخوه الاعضاء

واسف لحضرتك مره ثانية
وشكراً

ملاحظه : انا مجرد مبتدئ في البرمجه و ليس بالضروري اني مراقب منتدى فاكن محترف في البرمجه الرقابه ما هي الا متابعة المواضيع والمساعدة قدر الامكان

واسف لحضرتك مره ثالثه

تحياتي لك
مؤمن
الرد }}}
تم الشكر بواسطة:
#5
Raggi Tech كتب :اولا اسف للضحك ولكن انا لحظت ان حضرتك ركزتي على اني لم اساعد حضرتك اكثر من تركيز حضرتك على طلبك
ثانيا كنت احب ان اشرح الكود و لكن اليك الكود
كود :
Private Sub fpages()
كود :
[color=#000080][SIZE=2][FONT=tahoma][b] On Error Resume Next[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]        'لاتوجد مشاركات في هذا القسم.[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]        Dim search = "لاتوجد مشاركات في هذا القسم."[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]        Dim where = InStr(WB.Document.Body.InnerHtml, search)[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]        If where <= 0 Then[/b][/FONT][/SIZE][/color]

[color=#000080][SIZE=2][FONT=tahoma][b]            Dim Elems As HtmlElementCollection[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]            Dim WebOC As Windows.Forms.WebBrowser = WB[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]            Dim numpost As Integer = 0[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]            Elems = WebOC.Document.GetElementsByTagName("TD")[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]            For num = 0 To Elems.Count[/b][/FONT][/SIZE][/color]

[color=#000080][SIZE=2][FONT=tahoma][b]                If InStr(Elems.Item(num).InnerHtml, "vbmenu_control") Then[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                    If numpost = 0 Then[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                        Dim Testpage As String = Elems.Item(num).InnerHtml[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                        Dim MyOutput, MyOutput2 As String[/b][/FONT][/SIZE][/color]

[color=#000080][SIZE=2][FONT=tahoma][b]                        MyOutput = GetStringBetween(Testpage, "<TD style=" & Chr(34) & "FONT-WEIGHT: normal" & Chr(34) & " class=vbmenu_control>", "</TD>")[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                        text1.Text = MyOutput[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                        Dim x = InStr(text1.Text, "صفحة " & pagenum.Text & " من ")[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                        If x > 0 Then[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            text1.SelectionStart = x - 1[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            text1.SelectionLength = Len("صفحة " & pagenum.Text & " من ")[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            text1.SelectedText = ""[/b][/FONT][/SIZE][/color]

[color=#000080][SIZE=2][FONT=tahoma][b]                            lastpagenum.Text = text1.Text[/b][/FONT][/SIZE][/color]



[color=#000080][SIZE=2][FONT=tahoma][b]                            If pagenum.Text > 1 Then[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                                prevpage.Enabled = True[/b][/FONT][/SIZE][/color]

[color=#000080][SIZE=2][FONT=tahoma][b]                                If pagenum.Text = lastpagenum.Text Then[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                                    nextpage.Enabled = False[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                                ElseIf pagenum.Text < lastpagenum.Text Then[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                                    nextpage.Enabled = True[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                                End If[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            ElseIf pagenum.Text = 1 Then[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                                prevpage.Enabled = False[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                                nextpage.Enabled = True[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            End If[/b][/FONT][/SIZE][/color]

[color=#000080][SIZE=2][FONT=tahoma][b]                            pages.Text = "Page " & pagenum.Text & " OF " & lastpagenum.Text[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            getposts()[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            gb2.Enabled = True[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            pages.Left = 50[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                        Else[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            pages.Text = "Only One Page"[/b][/FONT][/SIZE][/color]

[color=#000080][SIZE=2][FONT=tahoma][b]                            pagenum.Text = "0"[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            lastpagenum.Text = "0"[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            nextpage.Enabled = False[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            prevpage.Enabled = False[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            getposts()[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                            gb2.Enabled = True[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                        End If[/b][/FONT][/SIZE][/color]

[color=#000080][SIZE=2][FONT=tahoma][b]                        numpost = 1[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                    End If[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]                End If[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]            Next[/b][/FONT][/SIZE][/color]
[color=#000080][SIZE=2][FONT=tahoma][b]        End If[/b][/FONT][/SIZE][/color]

هذا الكود جزء من مشروع و سيأخذ جهد من حضرتك لكي تستوعبي ما هو عمل البرنامج
وهذا هو السبب اني لم اطرح الحل اني ليس لدي وقت لتوضيح الفكره كامله وتركت الموضوع للاخوه الاعضاء

واسف لحضرتك مره ثانية
وشكراً

ملاحظه : انا مجرد مبتدئ في البرمجه و ليس بالضروري اني مراقب منتدى فاكن محترف في البرمجه الرقابه ما هي الا متابعة المواضيع والمساعدة قدر الامكان

واسف لحضرتك مره ثالثه

تحياتي لك
مؤمن



ردك كتير مشوش ولم يعمل معي.
الرد }}}
تم الشكر بواسطة:
#6
بسم الله الرحمن الرحيم

تفضلي ست
فاتن الحل مرفق





PHP كود :
Imports System
Imports System
.IO
Imports System
.Data
Public Class Form1

    
Private Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandles Button1.Click
        Dim href 
As String
        Dim links 
As New Collection
        Dim NumPage 
As New ArrayList()
        
Dim cunter 0


        Wb
.Navigate(TextBox2.Text "&pp=200&sort=lastpost&order=desc")
        Do 
Until Wb.ReadyState WebBrowserReadyState.Complete
            My
.Application.DoEvents()
        
Loop


        
For Each link As HtmlElement In Wb.Document.Links
            href 
link.GetAttribute("href")

            If 
href.Contains("&pp=200&sort=lastpost&order=desc&page"Then



                Dim spliter
() As String
                spliter 
href.Split("=")

                
NumPage.Insert(cunterspliter(spliter.Length 1))
                
cunter += 1



            End 
If

        
Next
       

        Dim str 
= (NumPage.Item(NumPage.Count 1))    'Microsoft.VisualBasic.Right(NumPage.Item(NumPage.Count - 1), 1) 


        Dim strArr() As String
        strArr = str.Split("=")

        Dim xx = (strArr(strArr.Length - 1))



        For i As Integer = 1 To xx
            Me.TextBox1.Text &= TextBox2.Text & "&pp=200&sort=lastpost&order=desc&page=" & i & vbNewLine


        Next
    End Sub


    Public Function GetMaxValue(ByVal itemList As ArrayList)

        Dim max As Integer = Nothing

        For i As Integer = 0 To (itemList.Count - 1)
            If i = 0 Then
                max = itemList(i)
            Else
                If itemList(i) > max Then max = itemList(i)
            End If
        Next

        GetMaxValue = max

    End Function

End Class 



تحياتــــي للجميع
ابــــو ســـــامــــي




الملفات المرفقة
.zip   NumPages.zip (الحجم : 61.04 ك ب / التحميلات : 51)
الرد }}}
تم الشكر بواسطة:
#7
واذا اردتي لتحسين المظهر للفورم

ازيلي اداة ال webBrowser عن الفورم
وقومي بتعريف هذا تحت بداية تعريف الكلاس Dim wb As New WebBrowser
الرد }}}
تم الشكر بواسطة:
#8
شكراً اخي ابو سامي لتقديم المساعد و التوضيح
الرد }}}
تم الشكر بواسطة:


المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  تعديل طول حقل معين في جميع جداول القاعدة atefkhalf2004 1 97 09-03-24, 03:17 AM
آخر رد: atefkhalf2004
  معرفة رصيدي للهاتف النقال المتصل بالكمبيوتر وارسال رسائل نصية منه AHMED213 0 98 22-02-24, 11:47 AM
آخر رد: AHMED213
  [VB.NET] معرفة بيانات الجهاز محمد بوقزاحة 1 309 21-02-24, 11:44 PM
آخر رد: AHMED213
  معرفة عدد مرات تكرار الاسم في الداتاقريدفيو صالح عبدالله 8 426 05-02-24, 04:39 PM
آخر رد: صالح عبدالله
  [VB.NET] معرفة بيانات الجهاز محمد بوقزاحة 7 676 12-01-24, 07:31 PM
آخر رد: Kamil
  معرفة عدد الاشهر خلال فترة زمنيةمعينة boofa2022 0 170 01-01-24, 01:18 PM
آخر رد: boofa2022
  [نقاش] أساتذتنا مشرفى المنتدى المساعدة و الدعم فى Telerik dr.programming 6 381 21-12-23, 12:29 AM
آخر رد: dr.programming
Lightbulb [VB.NET] إطهار الصورة بمقاس معين في DataGridView أبو خالد الشكري 2 323 14-12-23, 03:01 PM
آخر رد: أبو خالد الشكري
  كيف اجعل البرنامج في بداية الشهر ينفذ حدث معين بالاصح اريد البرنامج في تاريخ واحد من Adel27213 3 484 05-11-23, 01:45 AM
آخر رد: justforit
  كيفية جمع قيمة على تاريخ معين واستنتاج تاريخ أخر Ahmed.vb 1 317 02-11-23, 03:52 AM
آخر رد: Taha Okla

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم