|
-
Jan 17th, 2004, 12:49 PM
#1
Thread Starter
Ya ya Baby!!!Me is Back
removing/adding tab BUG
Hi,
I have an administrator form that contain 4 tabs. Depending of what privileges the user have the user have access to some tab.
Here is the code that I use :
VB Code:
Dim strPrivileges As String = AvoirDroitUsager()
Me.tabAdmin.Controls().Remove(Me.TabPage1)
Me.tabAdmin.Controls().Remove(Me.TabPage2)
Me.tabAdmin.Controls().Remove(Me.TabPage3)
Me.tabAdmin.Controls().Remove(Me.TabPage4)
If InStr(strPrivileges, "P") > 0 Then
Me.tabAdmin.Controls().Add(Me.TabPage1)
Me.tabAdmin.Controls().Add(Me.TabPage2)
Me.tabAdmin.Controls().Add(Me.TabPage3)
Me.tabAdmin.Controls().Add(Me.TabPage4)
Else
If InStr(strPrivileges, "A") > 0 Then
Me.tabAdmin.Controls().Add(Me.TabPage4)
End If
If InStr(strPrivileges, "C") > 0 Then
Me.tabAdmin.Controls().Add(Me.TabPage2)
End If
If InStr(strPrivileges, "M") > 0 Then
Me.tabAdmin.Controls().Add(Me.TabPage3)
End If
End If
The problem is that I can't close the form since I have implemented that piece of code... why?
-
Jan 17th, 2004, 12:58 PM
#2
Sleep mode
Are you getting specific error ?
-
Jan 17th, 2004, 06:38 PM
#3
I dont think it has anything to do with that code... I even tried addign a tabpage and tried all the different privileges. I can close the form.
What happens when you try to close the form.
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jan 18th, 2004, 01:09 PM
#4
Thread Starter
Ya ya Baby!!!Me is Back
I receive no error, only that the form doesn't want to close.
-
Jan 18th, 2004, 02:51 PM
#5
yay gay
It's a known bug, search the forum about it and you'll find the answers
\m/  \m/
-
Jan 18th, 2004, 03:17 PM
#6
Sleep mode
Are you closing the form with code or by the 'X' button ?
-
Jan 19th, 2004, 11:16 AM
#7
Thread Starter
Ya ya Baby!!!Me is Back
Originally posted by Pirate
Are you closing the form with code or by the 'X' button ?
Both doesn't close the form, with the 'x' and with the Me.Close()...
The only thing I see it's maybe somewhere in the code I do load something in a textbox from the database and since I have removed the tab it might search this textbox ... but I haven't see any code that might do this
-
Jan 19th, 2004, 11:17 AM
#8
Thread Starter
Ya ya Baby!!!Me is Back
Originally posted by PT Exorcist
It's a known bug, search the forum about it and you'll find the answers
If it's a known bug why you do not help me with at least few keyword.... these kind of post aren't helping the community... but well...
-
Jan 19th, 2004, 11:39 AM
#9
Sleep mode
Are you doing any databinding on that form ?
-
Jan 19th, 2004, 02:00 PM
#10
yay gay
Originally posted by Daok
I receive no error, only that the form doesn't want to close.
If at the time I didnt have the time to search FOR YOU I at least said that if you searched you could find the bug, but it seems it is just not that important to you to solve it.
@Pirate it has nothing to do with databinding, simply if you have panels that have controls inside it that have focus if you try to close the form it will not allow until it's the form which have the focus, or at least is some strange theory like this. Like i said before if you search the forum you'll find the answer
\m/  \m/
-
Jan 19th, 2004, 03:36 PM
#11
Sleep mode
That's what I thought too but I suspected it's bound to a datasource or something and he never disconnected it . Anyway , this seem to be the most confusing bug though .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|