#Region Project Attributes #ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim menu As SideMenuBar
Dim a As Typeface
Dim b As Bitmap
Dim i As Int = 0
Dim s As Object
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main")
b.Initialize(File.DirAssets,"logo.png")
a = Typeface.LoadFromAssets("dastnevis.otf")
menu.Initialize("gh",Me,50%x,True,a,Colors.RGB(184,163,0),b,1,Colors.Black)
menu.add_item("صفحه اصلی","",LoadBitmap(File.DirAssets,"Home.png"),1)
menu.add_item("درباره ما","",LoadBitmap(File.DirAssets,"person-icon.png"),2)
menu.add_item("ارتباط با ما","",LoadBitmap(File.DirAssets,"telephone-icon.png"),3)
menu.add_item("خروج","",LoadBitmap(File.DirAssets,"exit.png"),4)
menu.
menu.make(Activity)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub b_show_Click
If i = 0 Then
menu.show
Else
menu.hide
End If
End Sub
Sub gh_Opened()
i = 1
End Sub
Sub gh_Closed()
i = 0
End Sub
Sub gh_Click(Item As Object)
' INJA chejuri vase har kodom jodagane chizi tarif konam?
End Sub
سوال
ali@ali 10
سلام دوستان میخوام بدونم توی این کد
( کد یه منو )
#Region Project Attributes #ApplicationLabel: B4A Example #VersionCode: 1 #VersionName: 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: unspecified #CanInstallToExternalStorage: False #End Region #Region Activity Attributes #FullScreen: False #IncludeTitle: True #End Region Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. End Sub Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. Dim menu As SideMenuBar Dim a As Typeface Dim b As Bitmap Dim i As Int = 0 Dim s As Object End Sub Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: Activity.LoadLayout("main") b.Initialize(File.DirAssets,"logo.png") a = Typeface.LoadFromAssets("dastnevis.otf") menu.Initialize("gh",Me,50%x,True,a,Colors.RGB(184,163,0),b,1,Colors.Black) menu.add_item("صفحه اصلی","",LoadBitmap(File.DirAssets,"Home.png"),1) menu.add_item("درباره ما","",LoadBitmap(File.DirAssets,"person-icon.png"),2) menu.add_item("ارتباط با ما","",LoadBitmap(File.DirAssets,"telephone-icon.png"),3) menu.add_item("خروج","",LoadBitmap(File.DirAssets,"exit.png"),4) menu. menu.make(Activity) End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub Sub b_show_Click If i = 0 Then menu.show Else menu.hide End If End Sub Sub gh_Opened() i = 1 End Sub Sub gh_Closed() i = 0 End Sub Sub gh_Click(Item As Object) ' INJA chejuri vase har kodom jodagane chizi tarif konam? End Subچجوری برا قسمت Sub gh_Click(Item As Object)
برا هر کدوم از گزینه ها جداگانه کاری تعریف کنم؟؟
لینک ارسال
به اشتراک گذاری در سایت های دیگر
9 پاسخ به این سوال تاکنون داده شده است
ارسالهای توصیه شده
بایگانی شده
این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.