Ketu ke kodin per te krijuar nje buton ne menyre dinamike gjate kohes qe programi eshte duke u perdorur (run-time). Aty ku eshte "ctlCommand1" mund te vendosesh nje variabel (string) qe permban emrin e butonit. Form1 duhet ta zevendesosh me emrin e formularit qe ke hapur.
Kodi:
' Si te shtosh nje buton.
Set ctlCommand = Controls.Add("VB.CommandButton", _
"ctlCommand1", Form1)
' Ndrysho pozicionin dhe madhesize
ctlCommand.Move (ctlDynamic.Left + ctlDynamic.Width + 50), _
ctlText.Height + 50, 1500, 500
' Ndrysho tabelen (shenimin)
ctlCommand.Caption = "Click Me"
'Beje te dukshem
ctlCommand.Visible = True
Lexo me shume tek kjo faqe e microsoftit
http://support.microsoft.com/default...NoWebContent=1
Krijoni Kontakt