furiousferret
Member
- Joined
- Dec 21, 2005
- Messages
- 16
- Programming Experience
- 1-3
Hello
 
I'm trying to write an application that is extremely customizable. One thing I want to accomplish is for the user to be able to move a function to whatever button he desires by editing the AppSettings Section. I can modify the text of the button this way, but attaching the action has been troublesome.
 
When I run the code below, the button does nothing.
 
 
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
 
the entry AppSetting Field is below:
<add key="topTab6Act" value="Disconnect()" />
 
Any help would be appreciated...
	
		
			
		
		
	
				
			I'm trying to write an application that is extremely customizable. One thing I want to accomplish is for the user to be able to move a function to whatever button he desires by editing the AppSettings Section. I can modify the text of the button this way, but attaching the action has been troublesome.
When I run the code below, the button does nothing.
			
				VB.NET:
			
		
		
		[SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] topTab6_Click([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Object, _
[/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.EventArgs) _
[/SIZE][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=2] topTab6.Click
[/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] topTab6Act [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=2] = ConfigurationSettings.AppSettings("topTab6Act")
[/SIZE][SIZE=2][COLOR=#0000ff]Try
[/COLOR][/SIZE][SIZE=2]topTab6Act
[/SIZE][SIZE=2][COLOR=#0000ff]Catch[/COLOR][/SIZE][SIZE=2] ex [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Exception
MsgBox(ex.ToString)
[/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Try
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Sub
[/COLOR][/SIZE]the entry AppSetting Field is below:
<add key="topTab6Act" value="Disconnect()" />
Any help would be appreciated...
 
	 
 
		
 
 
		 
 
		 
 
		 
 
		