User Name
Remember Me?
Password
Home
Register
Calendar
Today's Posts
FAQ
Free Publications
Search
Xtreme Visual Basic Talk
>
Legacy Visual Basic (VB 4/5/6)
>
General
> Buttons problem
Thread Tools
Display Modes
#
1
02-13-2004, 07:57 PM
DANY
Centurion
Join Date: Jun 2001
Posts: 128
Buttons problem
Hello to all,
Here are my button of arrays
<New Phone > (index =0) <Edit Phone> (index =1) <Cancel> (index =2)
When click <New Phone > (index =0) 'disable
<Edit Phone> (index =1) 'change caption to Save
<Cancel> (index =2) 'enable
when click <Save> (index =1)
<New Phone > (index =0) 'ENABLE
<Save> (index =1) 'change caption to eDIT pHONE
<Cancel> (index =2) 'DISABLE
when click <Edit Phone> (index =1)
<Edit Phone> (index =1) 'change caption to Save
<Cancel> (index =2)
<New Phone > (index =0) 'disable
when click <Cancel> (index =2)
<Cancel> (index =2) 'disable
<Save> (index =1) 'change caption to eDIT pHONE
<New Phone > (index =0) 'enable
my code does not work properly
If Index = 1 Then 'when edit is clicked
If cmdPhone(1).Caption = "Cancel" Then
cmdPhone(1).Caption = "Edit Phone"
cmdPhone(0).Enabled = True
cmdPhone(2).Enabled = False
Else
cmdPhone(Index).Caption = "Cancel"
cmdPhone(2).Enabled = True 'Enable Save buttons caption
cmdPhone(2).Caption = "Save" 'change save buttons caption
cmdPhone(0).Enabled = False 'disable new new phone button
End If
ElseIf Index = 0 Then 'when new phone clicked
cmdPhone(1).Caption = "Cancel" 'change edit buttons caption
cmdPhone(2).Enabled = True
cmdPhone(2).Caption = "Save" 'change Edit Phone buttons caption
cmdPhone(0).Enabled = False 'Disable the New Phone button
ElseIf Index = 1 Then 'if Save clicked
cmdPhone(1).Caption = "Edit Phone"
cmdPhone(0).Enabled = True
cmdPhone(2).Caption = "Cancel"
cmdPhone(2).Enabled = False
End If
thanks
DANY
View Public Profile
Find all posts by DANY
#
2
02-13-2004, 08:51 PM
hardrain
Junior Contributor
Join Date: Dec 2003
Location: Manila, Philippines
Posts: 277
You can use this:
Code:
Select Case Index Case 1 'Then it Case 2 'would be easy Case 3 'to perform operation? End Select
__________________
It's been a while.
hardrain
View Public Profile
Visit hardrain's homepage!
Find all posts by hardrain
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1
(0 members and 1 guests)
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
BB code
is
On
Smilies
are
On
[IMG]
code is
Off
HTML code is
Off
Forum Rules
Forum Jump
User Control Panel
Private Messages
Subscriptions
Who's Online
Search Forums
Forums Home
Announcements
Announcements
Visual Basic .NET (2002/2003/2005/2008, including Express editions)
.NET Knowledge Base
Tutors' Corner
Code Library
ASP.Net
.NET Communications
.NET Game Programming
Managed DirectX
.NET Office Automation
.NET File I/O and Registry
.NET Database and Reporting
.NET Interface and Graphics
.NET Installation / Documentation
.NET General
Xtreme .NET Talk
Legacy Visual Basic (VB 4/5/6)
Knowledge Base
Tutors' Corner
Code Library
Communications
Game Programming
DirectX
VBA / Office Integration
Excel
Word, PowerPoint, Outlook, and Other Office Products
API
File I/O and Registry
Database and Reporting
Interface and Graphics
Installation / Documentation
General
Other Languages
Web Programming
Miscellaneous Languages
General Discussion
Tech Discussions
Random Thoughts
Forum Questions / Concerns / Comments
Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Problem with Inno and Flash buttons
giannicotina
Installation / Documentation
5
02-15-2004
09:45 AM
Problem with Toolbars : Unpressing Buttons
TSK
General
4
11-19-2003
06:37 PM
VBScript Onmouseover, Radio Buttons, displaying an array element problem
Bassman
Web Programming
0
06-05-2003
03:43 AM
Problem with buttons
TheFold
Interface and Graphics
4
10-18-2002
08:44 AM
Advertisement:
Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Home
Register
Calendar
Today's Posts
FAQ
Archive
© Xtremevbtalk.com 2001 - 2013. All Rights Reserved.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
-->