|
|
|
Welcome to Discuss Monday, 6 September 2010 @ 05:29 PM HKT
| S080056@eClass |
 |
March 03 2010 22:30 PM (Read 380 times) |
|
|

Newbie
Status: offline
Registered: 03/03/10
Posts: 2
|
Excuse me, How to set the property of the cancel button of a form?
(When I execute the program, if I click the cancel button in the form, the computer cannot stop running the program!)
Thanks!
|
| |
|
|
| Wong sir |
 |
March 03 2010 23:44 PM |
|
|

Chatty
Status: offline
Registered: 12/28/06
Posts: 57
|
....
There is no way to set such property. Do you mean that [X] at the top right-hand corner?
In fact, most students find that the program is still running though they have clicked that [X]!
Very often, these students create some forms, let's say formA, formB and formC. Student will cause formB to load in formA, may be by clicking a button "Go to PLAY" / "Up LEVEL" ...
If the student write in this way:
PHP Formatted Code
me.visible = false
formB.show ()
since formA is just INVISIBLE, NOT closed! Though you click that [X] in formB, that formA is still running but the form is INVISIBLE.
So, I would prefer just the following:
PHP Formatted Code
formB.showdialog ()
When user click [X] in formB, the control will go back to formA.
Hope it helps.
In fact, students of my group should know this. All students, not just me, can give answers!
|
| |
|
|
| S080114@eClass |
 |
March 04 2010 21:19 PM |
|
|

Junior
Status: offline
Registered: 02/12/10
Posts: 18
|
不如我係學校同你講啦,你個意思係咪話想form2關ge時候,form都關埋,定係form2開左,form1關埋???
如果係2個一齊關,你可以用個event 好似係叫declared...係指如果form2close 時做d咩,你自己打code啦
|
| |
|
|
| Wong sir |
 |
March 04 2010 23:56 PM |
|
|

Chatty
Status: offline
Registered: 12/28/06
Posts: 57
|
Haha! Thanks Ling!
In fact, I don't understand much about the question.
|
| |
|
|
| S080024@eClass |
 |
March 05 2010 18:34 PM |
|
|

Newbie
Status: offline
Registered: 03/05/10
Posts: 2
|
hi! Wong sir,
如果click左兩個Picturebox,之後其他ge picturebox都disabled,要點寫code?
thx... ^~^
|
| |
|
|
| S080024@eClass |
 |
March 05 2010 19:19 PM |
|
|

Newbie
Status: offline
Registered: 03/05/10
Posts: 2
|
And also, if picturebox1.Show() &picturebox3.Show() then picturebox1.enabled=False & picturebox.enabled=false 要點寫?
佢會話if吾得用Show/Visible/backgroundimage/image
but my game is 卡片對對碰,how can i do it?
thx...
|
| |
|
|
| S080114@eClass |
 |
March 05 2010 21:24 PM |
|
|

Junior
Status: offline
Registered: 02/12/10
Posts: 18
|
我有個傻ge方法,就係先dim x as integer
click 一次個picturebox
x=x+1
if x=2 then picturebox(x).visible=false
|
| |
|
|
| Wong sir |
 |
March 06 2010 14:31 PM |
|
|

Chatty
Status: offline
Registered: 12/28/06
Posts: 57
|
唔多明~
Do you mean that you want to show 2 pictures. Then check if the 2 pictures are visible, then set these 2 to invisible? If so, write the following:
If PictureBox1.Visible = True And PictureBox2.Visible = True Then
PictureBox1.Visible = False
PictureBox2.Visible = False
End If
If you want to visible when invisible and set to invisible when visible (Toggle between on / off)
If PictureBox1.Visible = True And PictureBox2.Visible = True Then
PictureBox1.Visible = False
PictureBox2.Visible = False
ElseIf PictureBox1.Visible = False And PictureBox2.Visible = False Then
PictureBox1.Visible = True
PictureBox2.Visible = True
End If
Hope it helps!
Wong sir
|
| |
|
|
| Content generated in: 1.30 seconds |
|
|