Jump to content
zeayfa

Visual Basic

Recommended Posts

nak link kan macam mana maksud ko tu..?

tapi untuk membuat memaparkan form yang ko dah buat kena ada arahan.
tak kiralah arahan dengan menekan butang atau guna timer.

contoh:

dari form1 akan paparkan form2 dengan menekan butang yang ada di form1.

code:

form2.show

Share this post


Link to post
Share on other sites
to TJ-Ariff,

sorry r kte mmg xtau lgsg sal vb sbb xpnh blaja pn..
tp kte nyer supervisor nk kte pkai vb 4 my system.
da gak la notes y dia bg tp xphm sgt..
note rgks je..
mtk tlg dia xplen tp dia ckp dh lupa daaa...
huhu...

coding dia mmg xbyk ker?
help me...!!

Share this post


Link to post
Share on other sites
Tak per, no hal...
kalau boleh cuba ko bagi draft apa yg supervisor ko nak tu..
step by step and flow chart how the programs run..

nanti kat sini ramai kawan2 yg boleh menolong...
::icon_biggrin::

Share this post


Link to post
Share on other sites
kalau nak tutorial yang banyak boleh tgk kat forum lama putera.com..

Share this post


Link to post
Share on other sites
Visual Basic ni ada dua jenis, satu Visual Basic 6.0 satu lg Visual Basic .Net, VB 6.0 lebh mudah difahami sebab bahasa dia yg mudah manakala VB.Net ni agak menyerupai aturcara C++ kerana melibatkan OOP, VB 6 lak lbh kpd GUI....

Installer VB 6.0 boleh dpt kat sini: http://abbasbajwa.softarchive.net/microsoft_visual_studio_included_sp_dvd.14842.html

Share this post


Link to post
Share on other sites
Pakai VB.Net pun boleh gak drag and drop jer... dah jadi application.. hehehe. Tapi yang simple2 lah. Kalau nak yang free bleh guna VB 2008 Express Edition. Macam2 boleh buat, pastu boleh terus compile ke bentuk exe, letak icon mana ko nak kat program ko tu... nak jual pun boleh..

Share this post


Link to post
Share on other sites
the twelve wrote:sahabat sekalian. ada note tak pasal VB ni? aku nak kena wat final projek, program guna VB ni..


Tak faham...

Ko nak note tajuk apa ?? :-/

Ko nak note ker nak Tutorial ?? :-/

Share this post


Link to post
Share on other sites
ijadbalqis wrote:aslmkm semua,
visual basic 6 mcm mn nk print statement...ade sesiape bly tlg tak?




wslm...
kalo sy xterslh phm soklan cdg dia cm ni la...:-
form1.PrintForm

Share this post


Link to post
Share on other sites
Code:
Dim stID As String
Dim i, j, k As Integer
Dim cRec, cItem As Integer
Dim RVal As Variant
Dim maxRec As Integer
Dim SVal()                ' Dynamic array
Dim bModify As Boolean
Dim stID2 As String
bModify = False   
stID2 = ""
If Me.obRef.Value Then
        If Me.obSec1.Value Then stID = Range("sIR1").Value
   
  bModify = True
    End If
   
    RVal = lbDProc.List
    cRec = UBound(RVal, 1)
    cItem = UBound(RVal, 2)

    j = 0
    For i = 0 To cRec
    If lbDProc.Selected(i) Then j = j + 1
    Next i
   
maxRec = j - 1
If maxRec < 0 Then Exit Sub
ReDim SVal(maxRec, cItem)

    j = 0
    For i = 0 To cRec
    If lbDProc.Selected(i) Then
        For k = 0 To cItem
        SVal(j, k) = RVal(i, k)
        Next k
    j = j + 1
    End If
    Next i
    Beep
   
    Call PutList(stID, SVal, maxRec, cItem, bModify, stID2, Me.cbAdd.Value)
End Sub


Tolong Tak faham ni . Baru belajar nih.

Share this post


Link to post
Share on other sites
assalamualaikum...

bro kalu guna func
Code:
[code] ~ script ~ [/code]
lagi senang nak baca..kalu yg mcm ko pos tu keliru sikit..

Share this post


Link to post
Share on other sites
waalaikumsalam, Kawan ni sebenarnye dah pening. Kawan klik button untuk pindahkan dari List box ke worksheet range (Microsoft Excel ), tapi list yang kite select tu belum ade tapi msg kluar kate dah ade.
kod seperti kat bawah ni

Code:

Public Sub PutList(fmID As String, VData As Variant, _
                  iMax As Integer, jMax As Integer, _
                  Optional bModify As Boolean = False, _
                  Optional fmID2 As String = "", _
                  Optional bAppend As Boolean = True)
'
'
Dim fmTarget As String
Dim tMsg As String
Dim bSkip As Boolean
Dim bAgain As Boolean
Dim i As Integer
Dim idx As Integer
Dim iRec As Integer
Dim xMax As Integer
Dim yMax As Integer
Dim RSData As Variant
Dim TData()

If bModify Then
    idx = 4
    RSData = ModifyData(VData, idx, 3)
    SData = RSData
    xMax = UBound(SData, 1)
    yMax = UBound(SData, 2)
Else
    idx = 1
    SData = VData
    xMax = iMax
    yMax = jMax
End If

ReDim TData(idx - 1, yMax)

'For d = 0 To xMax Step idx      ' For every selected item

    fmTarget = fmID
    bAgain = False
   
AGAIN:
    iRec = 0
   
    With Range(fmTarget)
        .Show
        Do While Not IsEmpty(.Offset(iRec, 0))
            iRec = iRec + idx
            If (iRec > 27 And bAgain) Or iRec > 999 Then
                tMsg = "Unable to find empty cell"
                MsgEx (tMsg)
                Exit Sub
            End If
        Loop
       
        If bModify And iRec > 27 Then GoTo RESCAN
       
        For i = 0 To xMax Step idx
       
            iCnt = 0
            For p = 0 To idx - 1        ' to check whether they exist!
                For q = 0 To yMax
                    If TData(p, q) = SData(i + p, q) Then iCnt = iCnt + 1
                    TData(p, q) = SData(i + p, q)
                Next q
            Next p
           
            CData = TData
           
' Skip if the last data already checked
            If (bAgain And iCnt = idx * (yMax + 1)) Then GoTo SKIPDATA
   
            If RecInList(fmID, yMax + 1, CData, bModify, idx, fmID2) Then
                bSkip = True
                GoTo SKIPDATA          ' Skip if data existed
            End If
' Put data in the list
            For m = 0 To idx - 1
                For j = 0 To yMax
                    If bAppend Then
                        .Offset(iRec + m, j).Value = CData(m, j)
                    Else
                        .Offset(i + m, j).Value = CData(m, j)
                    End If
                Next j
            Next m
           
            iRec = iRec + idx
SKIPDATA:
            If iRec > 27 Then GoTo RESCAN
        Next i
    End With
   
RESCAN:
    If fmID2 <> "" And Not (bAgain) Then
        bAgain = False
        fmTarget = fmID2
        GoTo AGAIN
    End If

'Next d

If bSkip Then
    tMsg = "Some or all of the items selected" & Chr(13) & _
          "you are trying to put in the list" & Chr(13) & _
          "are already existed."
    MsgEx (tMsg)
End If

End Sub


Maaf, kawan betul betul pening pasal ni. kawan selak kat program yang member kawan tinggalkan kat company kawan pasal nak amend sikit program tu. member kawan tu kat maner tak tau...lost contact.

Share this post


Link to post
Share on other sites
Kepada en. Sobrija, sebenarnya apa problem anda dengan kod berkenaan? Masih kurang paham. Cuba terangkan program yang anda gunakan dan objektif yang ingin anda capai dengan kod berkenaan...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...