Custom Principal & Identity Missing Custom Functions

Jun 21, 2010

I have a Custom Principal class that Implements System.Security.Principal.IPrincipal and a Custom Identity class that Implements System.Security.Principal.IIdentity. So when a user successfully login to my windows form application, I set My.User.CurrentPrincipal = CustomPrincipal, which worked great until I started adding custom functions to my Principal and Identity classes.

[Code]...

View 1 Replies


ADVERTISEMENT

Handling Exceptions Within Custom Functions

Jun 2, 2009

All of us use the try catch blocks. But what is the best way of handling errors within custom functions?Display a messagebox to the user when the exception is thrown (if possible within the function), or return a value indicating that an error was found within the function?

View 3 Replies

Create A Custom Messagebox, With Varying Number Of Buttons With Custom .Text Descriptions?

Feb 6, 2009

This is what I would like to achieve:To create a custom messagebox, with varying number of buttons with custom .Text descriptions, and other features. I intended to have a property array that would be redim-ed and have values (.Text values) set by the calling class:

[code]...

View 7 Replies

Apply Percentage Format To Custom Cell In Custom Column In DataGridView?

Jun 25, 2009

I came across this great article on creating a custom datagridview column which creates a graph-like effect in the cells of a custom datagridview column:[URL]..Does anyone know how you would edit this to format the number in the cell as a percentage? And does anyone know how you would set this up to take 0 values which do not create any graph effects at all.I have been trying to do this but keep getting errors.

View 1 Replies

Avoid Closing Of A Custom Combo Box Popup Window In A Custom Datagrid?

Jan 31, 2012

I was trying to block the closing of a custom combo box popup window in my custom DataGrid. The popup window comes by pressing F4 or ALT+DOWN keys in my datagrid which is getting closed if I press the down arrow for the first time, after showing the first value in the combo box as selected. Next time onwards, if I press the F4 key and down arrow, I can move to any item in the popup window and select the item using keyboard and in that case, the popup window is not getting closed till I press the ENTER key or selection using the Mouse. Is there any specific reason for this behaviour or something is missing in my code part? [code]...

View 1 Replies

Avoid The Closing Of A Custom Combo Box Popup Window In A Custom Datagrid?

Sep 2, 2010

I was trying to block the closing of a custom combo box popup window in my custom DataGrid. The popup window comes by pressing F4 or ALT+DOWN keys which is getting closed if I press the down arrow for the first time after showing the first value in the combo box as selected. Next time onwards, if I press the F4 key and down arrow, I can move to any item in the popup window and select the item using keyboard and in that case, the popup window is not getting closed till I press the ENTER key or selection using the Mouse.

View 13 Replies

Specify A Custom Icon For Display In The Toolbox Window When Create Own Custom Control?

Dec 29, 2011

how to specify a custom icon for display in the toolbox window when you create your own custom control? Something other than the dreaded "gearbox" icon.

View 2 Replies

Make Stand Alone, Custom Web Browser (with Custom Errors, Or Generic)

Dec 13, 2011

Cookies to be stored in folder and on close delete the cookies The ability to watch youtube vids, view images, and play js/flash games good security, no ads?

View 6 Replies

C# - Custom XML Serialization, Write Custom Root Element?

Mar 15, 2010

I'm using custom serialization and when the xml is generated it's putting the class name as the root element

Example:

<MyClassName>
<MyIntendedRootNode>
<ObjectType>

[code]....

I'm invoking the serialization by calling xmlserializer.Serialize(writer,Me) so I'm sure that has something to do with it.I've tried putting XMLRoot onto the class, but I think as vb is compiling this partial class with its aspx page, it's either overwriting this property or ignoring it entirely.I'd like to just tell it to either throw away everything it has and use a different root element.

View 5 Replies

Create A Custom File Association ( A Custom Extension ) In VB?

Dec 19, 2010

know how to create a custom file association ( a custom extension ) in VB .Net and how to open it on the application

View 1 Replies

Not Getting Redirection To Custom Error Page Using Custom Errors?

Mar 24, 2010

Here's my Application_OnError event sink in global.asax.vb:
Sub Application_OnError(ByVal sender As Object, ByVal e As EventArgs)
Dim innerMostException As Exception = getInnerMostException(Me.Context.Error)

[code].....

View 1 Replies

Asp.net Mvc - Custom AuthorizeAttribute + Custom SiteMapProvider Related?

Jan 12, 2010

I have a custom SiteMapProvider (populated from database) and a custom AuthorizeAttribute (validates current users roles + requested page against Role_Page database) for controller classes.I have to implement the function SiteMapProvider.IsAccessibleToUser(context, node). I also have to implement AuthorizeAttribute.AuthorizeCore(context).How are these two functions related? Isn't there some way to 'attribute' the SiteMapProvider?

Some code:

edit: Might this be a solution (inside AuthorizeCore())? context however is HttpContextBase, and IsAccessibleToUser() only takes HttpContext as parameter.If Not SiteMap.Provider.IsAccessibleToUser(context, SiteMap.CurrentNode) Then

current code:

Public Class CustomValidateAuthorization : Inherits AuthorizeAttribute
Public Sub New()
End Sub

[code]....

View 1 Replies

Custom Control With Custom Collection Property?

Jul 11, 2011

I have an ASPX Custom Control which is supposed to load it's properties into an internal collection (defined with PersistenceMode.InnerProperty). Here's the ASPX

<cc:CustomControl runat="server">
<Queries>
<cc:QueryTypeOne ... />

[code]...

View 1 Replies

Have Custom Background And Custom Hover Images?

Sep 10, 2010

how can i get custom menu bar like this (office 2010) example:I need to have custom background and custom hover images. I work in Visual Basic 2010?

View 6 Replies

IDE :: Created A Custom UserControl, With A Custom Designer?

Dec 3, 2009

I have created a custom UserControl, with a custom designer, which contains a Panel which is editable. Any controls dropped onto this Panel will go off-form when an Anchor is set. This was already reported here and acknowledged as a bug:[URL].. Are there any known workarounds? Or available hotfixes for this issue?

I already implemented ISupportInitialize in my custom panel class, where i set the docking, which doesn't help. Here's the relevant code:

[Code]...

View 1 Replies

Create Custom Database In Windows Application - Double Click Custom Database File?

Jul 21, 2006

With VB.net, I'm coding a simple application to get more used to the new .Net format.

I'd like to save all the information to a 'new' database file. how to create a database on the fly, once that is done i'll be able to connect to it no problem, but actually creating the file is proving difficult to work/find out.

Also, with vb.net and the newly created custom file, how can it be made to automatically open that information with the program?

Is there a method in installation to associate the file type with the new program? How can i check when the program loads if a database file has been 'double-clicked' (rather than just running from the .exe of the program) and proceed to load the data?

EDIT1 - Extra InfoThe windows application has many different fields and content etc, then i need to save that to a file that could later be loaded by 'double clicking'. I assumed the easiest way would be to create a mini-database for each unique file

View 3 Replies

VS 2010 Custom Type Array / List With Adding Items And Specifying Custom Type Variable

Jun 21, 2011

I recently downloaded VB 2010 Express so i am quite new to the language, but i have worked with dark basic, which seems to b very similar.Anyway, my problem is that i cannot seem to correctly set out my array of a custom type/class. i am trying to create two arrays, one of available entities and another of selected entities of which the user selects the entities to be dealt with in irrelevant ways. i have creates a button (called test) which adds some entities to the available list and all the entities come back the same value but they shouldnt be as you'll c in the code. i have run the step into command a found that "available.item(#).Name = " will change all of the entity's names.As of current i am working with lists as the array kept asking for a 'new' statement but i couldnt figure out where to put it.[code]

View 7 Replies

Get Custom Properties For A Custom Control Into The Visual Studio Properties List?

Nov 25, 2009

What I've done is create a User Control Library (Project) and I've added a single User Control to that project. The control contains a single FlowLayoutPanel, and I created a Property on the control itself to pass the FlowDirection from the Control to its FlowLayoutPanel child.

Build, reference, component appears in the Toolbox and everything works fine, but the property on the control does not appear in the Properties window when I go to edit it at design time.

View 6 Replies

Create A Custom Class That Has Inside An Array Of Another Custom Class?

Jan 31, 2011

I want to create a custom class that has inside an array of another custom class (see my code below) but when the programm runs is crashes. Why? What is the right expression???? Plz help I'm a newbie in VB.net.....

Public Class ctrarray
Public nameclass As String
Public ctrlindex(glvar_spaces) As ctrlindexclass
End Class

[code]....

View 6 Replies

Custom Type Cannot Be Cast To Custom Type And Losing Will To Live

Jun 10, 2010

I have been trying to solve a problem related to using RolesProviders in MVC.Basically I would like to an additional set of criteria to the roles table so that a user can switch roles based on what they are doing on the site.However as simple as it may sound its proving to be a nightmare. I cannot for love nor money come up with a solution. I have tried overloading the provider, creating extension methods (which never work with the Roles class) but finally I decided to simply create a reference to my own custom provider and just completely bypass the whole User, Roles class.Now I am getting a ridiculous error which states that I cannot cast MyProvider class to an instance of MyProvider class? All I am doing is calling the Roles.Provider method and casting its return value to my custom provider class (which inherits from RolesProvider). The asp.net forums are a waste of time since no one ever answers the questions and there are simply no examples of extending the Roles/Membership model without using SQL server.

View 3 Replies

Multithreading - Create Custom Objects/list Of Custom Objects In .NET?

Jan 24, 2010

I need two seperate lists, which every item is Integer, String, Bitmap - and one which every item is Integer, String String. However I don't know how to do this, or even where to look - I've googled for custom objects and custom object lists. What I'm trying to do is this.Custom Object1 is Integer, String, Bitmap Custom Object2 is Integer, String, String

In one thread I'll be adding items to List1(Of Object1), and processing them, and adding the results to List2(Of Object2), however I need to be able from other threads to look at the list and say only give me the items where Integer = (my thread ID), is this possible? Any help, or even links to information that would be relevant to this request would be helpful?

View 2 Replies

VS 2008 Make A "Custom.Custom"?

Aug 7, 2010

Is it possible to make a "Custom.Custom"? Example:

Custom.Custom1 = "1"
Custom.Custom2 = "2"

and

MessageBox.Show(Custom.Custom2)

Would show "2"

View 3 Replies

Changing Text Of Custom Control Based On Text Of Another Custom Control

Jan 11, 2010

I am using custom textboxes and I need to be able to set the Text on txb1 based on the Text of txb2. I have simplied my code to the following:

Public Class customtextbox
Inherits TextBox
Public Event ControlReset()

[Code]....

So, when txb1 looses focus, if its Text is "fried", then it sets off txb2's ProcessAlert function. I had tried to change the value of txb2 Text in ProcessAlert function, but didnt work, so I tried to get it to raise an event instead, which then tries to set the Text property. However I still cant set txb2's Text property. The Text property seems to be set for the duration of the "life" of the Event handler. When I step through the forms controls within the Event handler, the changed Text value is there, but not outside of the Event handler.

View 2 Replies

Custom Cursor - When The Cursor Is Over Form1 Its My Own Custom One ?

Jun 6, 2009

can i put my own custom cursor in ? so when the cursor is over form1 its my own custom one ?

View 6 Replies

PropertyGrid Custom Properties - Custom Sub Properties

Oct 21, 2009

I've populated a PropertyGrid with a custom class. How do you create and display a sub property similar to Size (Height, Width) which has two values or Point(X,Y)? For example, the class is Test and the property is Item as string. I want to expand Item to have two sub properties, A and B.

View 1 Replies

.net - Principal Advantages Of C# ?

Apr 18, 2011

What are the most important functional differences between C# and VB.NET?

C#'s edge over VB

I'm programming in VB.net because I'd former experience in VB 6.0 and I've familiar with its syntax. I know that C# is preferred by the biggest part of .net programmers. I know that C performance had superior performance against many other languages, but there is a good advantage in the same .net framework? There is a quite good reason for advicing me if should I migrate right now from VB to C#?

View 2 Replies

VS 2008 : Have A Class Where The Functions Of The Same Name Are Both Instance Functions And Shared Functions?

Dec 6, 2010

What I am trying to do is have a class where the functions of the same name are both instance functions and shared functions.

Public Shared Function Get...(byval xx as xx)

and

Public Function Get...

The Public Function uses a Property xx created in the constructor, whereas the Shared Function has the parameters (byval xx as xx).

View 1 Replies

.net - Can't Set 'Value' Of A Custom ValueType?

Apr 30, 2012

I have created a custom ValueType:

Private Structure MyValueType
Private _integerValue As Integer
Public Sub New(initValue As Integer)

[code]....

But I can't work out how I can test the value such as this:

Dim v As New MyValueType(3)
Dim x As New MyValueType(4)

[code]....

Error:Operator '=' is not defined for Types MyValueType and MyValueType

So how do I define Operators for my ValueType (I know this must be simple but I can't find an exmaple anywhere!)?Note I don't want to test If v.Equals(x)

View 1 Replies

Add A Custom Control?

Jul 4, 2010

[URL]I tried dragging it but it didn't work. I'm not used to the IDE. Also, how would I make that control at runtime and place it on the form I understand you would do

PHP Code:

Dim myAccount as new TAccount

But how do I display it on the form?

View 2 Replies

C# - .NET - Custom Types Possible?

Apr 5, 2012

In Delphi you can do something like this :

TArray = array[1..3] of byte;
where you can then declare
T2Array = array[1..3] of TArray

[code].....

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved