Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 20th, 2003, 05:13 AM
hanz hanz is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 3 hanz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy treeview

hi, my name hanafiah

i like to ask one question to the developer that using vb as a develoment tools.

i want to use treeview as my menu which as take all the details for the treeview from the database include the form name. but a having a problem when i want to show that particular form using the command form.show because it not supported, can any one help me on this matter..

thank you

Reply With Quote
  #2  
Old August 20th, 2003, 08:26 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,840 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 27 m 47 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
Welcome to the Dev Shed community.

I'm not really sure I understand your problem(s) can you please explain better? Please show where you are having the problem along with what errors you are getting.

Also, I would suggest that you follow the link in the sticky thread at the top of this forum and read the "How to Post a Question" thread. It will give you some good details on how to post a proper subject title.

Reply With Quote
  #3  
Old August 24th, 2003, 08:44 PM
hanz hanz is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 3 hanz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile Treeview

Hi, i'm sorry for my last question, acuatlly what i try to are :

1. inside vb when we create form, we can use menu editor to create the menu. but i find if i use this menu editor my menu fix, which mean i must hard code all the menu name into the form if i want to disable or enable it. so i try to use the treeview where i store all the needed info in the table, espacilly formname. i can retrieve the menu name but when i want to display the form i cant because it give error : "Object doesn't support this property or method"

here is the code that is use:

Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
dim myobject as object

' Create an ADODB Recordset object variable.
Dim objrec1 As New ADODB.Recordset

Set objrec1 = New ADODB.Recordset
objrec1.CursorType = adOpenKeyset
objrec1.LockType = adLockOptimistic
objrec1.Open "select * from Menu where menutext ='" & Node & "' and menuid =" & Val(Node.Key), gldbobjconn, , , adCmdText

If objrec1.EOF = False Then
Set myobjrec = objrec1!formname
myobjrec.Show
Else

End If
End Sub


** purpose i do this method is diffrent user login will have diffrent menu to enter, previously i controll all menu using code so i find its dificult to maintain because user always ask me to add new menu / form

Reply With Quote
  #4  
Old August 24th, 2003, 09:36 PM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,840 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 27 m 47 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
I understand what you are trying to accomplish now, but unsure of a way to accomplish it. This may be possible, but unsure of a method to do it.

Reply With Quote
  #5  
Old August 25th, 2003, 02:37 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,849 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 23 h 58 m 10 sec
Reputation Power: 766
Quote:
Set myobjrec = objrec1!formname

I don't think the ! operator is available to VB like it is in Access. Plus I don't understand what you're trying to do with this line.

Reply With Quote
  #6  
Old August 25th, 2003, 03:04 AM
hanz hanz is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 3 hanz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
treeview

actually that line use to set the object to the form name that read from file, and there is an error in the coding, myobject should be declare as form not object.

** actually i want to read the menu from the database (this already done). and when user click the menu system will read form name from database and display its using form.show command but when it going to execute that show command its prompt the error object doesnt support.

Reply With Quote
  #7  
Old August 25th, 2003, 08:44 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,840 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 27 m 47 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
Quote:
Originally posted by Doug G
I don't think the ! operator is available to VB like it is in Access. Plus I don't understand what you're trying to do with this line.
It is valid.
What he is trying to accomplish in simplified terms is to have a form object that is dynamically set through a string and then activate the form.

i.e.
Code:
Dim formName As String
Dim myForm As Form

formName = "Form1"
Set myForm = formName
myForm.Show

But the following is illegal, so I am unsure as to how to solve this problem.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > treeview


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway