Interaction Between Two User Controls?

Jun 18, 2009

In the application I'm actually building, I'm dealing with two dynamically-added controls that need to interact with each other, but I've reduced the problem to an as-simple-as-I-can-make-it example with the controls being statically loaded, and it still presents the same problem: a NullReferenceException when invoking the delegate. Here's the gist:

Control 1
Partial Class Control1
Inherits System.Web.UI.UserContr

[code].....

View 2 Replies


ADVERTISEMENT

Code To Send An Email With No User Interaction?

Dec 4, 2009

Using VB.Net 2003, how do you code to send an email with no user interaction? I do not want any windows to open or require any sort of input from the user. The idea is for the user to be able to request technical assistance by simply pressing a button.

View 5 Replies

Display Form When User Interaction Isn't Required

May 24, 2011

I've written a program using Visual Studio 2008 Standard Edition in Visual Basic. It's a Windows Forms Application. The program is very simple, it just reads a directory of text files, parses the text and outputs another text file as .CSV file
for import into Excel. There's no user interaction required but it never displays the form and therefore the progress bar. If I put a GO button on the form and modify the program so that the subroutine that does the processing isn't called until the user clicks GO it shows the form and the progress bar etc. How can I make the program run at startup, show the form, show the progress bar and then pause for 10 seconds or so and then exit?

View 7 Replies

VB - On Screen Keyboard - Creating A Better User Interaction

Apr 13, 2011

This IS a project for the class. HOWEVER, this class is *NOT* a programming class, but is called "Usability Engineering", which aims its goals at creating a better user interaction. I'm not sure of what the "homework" policy is here, but what I am asking isn't for getting a grade, as the grade isn't based on my ability to program here. But nonetheless I am a C++ programmer at heart and VB makes me groan a little bit.

^ The program: Our goal with this project is to make a program with only five buttons (Aiming to be a cellphone type system, I know, the resolution is huge.), The buttons are the arrow keys, and enter. When the user selects a textbox, it changes the focus to the keyboard and then allows input via moving around and hitting enter.

My first problem right now, is that when I use my arrow keys, if I press RIGHT or DOWN, it will only go right, and if i press left or up, it only goes left.

The second problem, is that the buttons are out of order... when I am on "P", and press right, it actually hops down to the space bar button instead. I'm sure this is just some sort of container that can be modified, but I'm unsure of where it is.

View 7 Replies

Why Maximum Value Of Scrollbar Is Impossible To Reach By User Interaction

Jun 4, 2011

Not so much a VB question more of a Net question.Does anyone have a logical explanation as to why the Maximum value of a Scrollbar is impossible to reach by user interaction?The documentation explains clearly the how, it just gives no reason for the why.

View 3 Replies

Very Simple Database Interaction - Using Textbox To Pull User ID From The Table

Jun 25, 2010

I have one table here with a list of UserIDs, Users, and ClientCodes. Each user can be assigned a client code to view that client's data elsewhere. Right now I have to change it for everyone via SQL Server and actually going into the table manually, but I'm trying to make a simple little program that will let the user change it themselves. All I need is a textbox that pulls the user based on a certain UserID from the table, and a drop down list that will not only show the current ClientCode they're set to, but allow me to change it and save that change to the table in the database.

What's the best way to go about this? I tried using the wizards but I guess that's not the best way to go about it. I have it displaying the correct user and their current ClientCode but that's about it.

View 4 Replies

Send Formatted HTML From A Database To A Specific (non-default) Printer With No User Interaction?

Apr 5, 2011

I'm currently pulling HTML data from a database and displaying it in a WebBrowser control in my VB.Net application so that it's correctly rendered. The next step is to print it, but I need to be able to send it to a specific printer rather than the default printer. How can I accomplish this?

View 1 Replies

Printing - Send Formatted HTML From A Database To A Specific (non-default) Printer With No User Interaction In .Net?

Jul 16, 2010

I'm currently pulling HTML data from a database and displaying it in a WebBrowser control in my VB.Net application so that it's correctly rendered. The next step is to print it, but I need to be able to send it to a specific printer rather than the default printer.

View 1 Replies

C# - Server To Server File Transfer Without Any User Interaction?

Feb 16, 2011

In my scenario, users are able to upload zip files to a.[url]....I would love to create a "daemon" which in specified time intervals will move-transfer any zip files uploaded by the users from a[url].....From the info i gathered so far,

The daemon will be an .ashx generic handler.

The daemon will be triggered at the specified time intervals via a plesk cron job

The daemon (thanks to SLaks) will consist of two FtpWebRequest's (One for reading and one for writing).

how could i implement step 3?

Do i have to read into to a memory() array the whole file and try to write that in b.example.com ?

How could i write the info i read to b[url].....?

Could i perform reading and writing of the file at the same time? No i am not asking for the full code, i just can figure out, how could i perform reading and writing on the fly, without user interaction.I mean i could download the file locally from a.example.com and upload it at b.example.com but that is not the point.

View 8 Replies

Asp.net - Step By Step User Interaction Pattern?

Jul 1, 2011

I have a wizard where users need to fill out data. You cannot navigate to the second step until first step is completed.

I enforced this behavior by disabling/enabling "Next" button, but I really do not like this solution, since it seems not really elegant or safe here. What is the good approach on building step-by-step processes with enforcing step completion.

View 1 Replies

How To Format Drive In FAT 16 Format Without User Interaction

Feb 16, 2010

How to format drive in FAT 16 format using VB.NET without user interaction?

View 1 Replies

Manage A Large Number Of Similar Controls In A User Interface (such As Button Or TextBox Controls)

Aug 23, 2011

There is newer code in a follow up post. I suggest using the code in the later post rather than the code in this one. You can still read this post though. When designing a user interface, one should be conscious of how many individual controls are required to implement the functionality. In some cases an initial design may begin with many buttons or textboxes (for example) but then further review of
the actual required functionality allows for a reduction in the number of unique controls.

But other times, there isn't a better way (which will still make sense to the user of the application) then to have a series of many repeated controls. So in the cases where one can be certain that the best UI implementation for an application will require the use of multiple copies of a given control, then it often becomes necessary to maintain some method of managing all of those controls at various points
throughout the application. Doing so typically requires that one build up some collection of controls which can then be accessed by index in order to work with any given control; but this can lead to a lot of clutter in the code file which handles these control's events. For instance there will be some kind of collection declaration, some recursive routine to find all of the controls of interest, and then any number of event handler methods with long lists of Handles clauses, or additional code loops to wire up the event handling for each control.

Purpose Since most of this functionality could be considered a requirement regardless of the type of control being managed, or its required functionality, it may make sense to wrap all of the control management functionality into a single class. And since our first requirement is a collection of controls, then a base collection class could be the perfect starting point for our control manager. There are a number of existing thread around this topic, with some recent (at the time of this writing) ones being:[URL]..In this, and related, threads I have posted examples of a simple TextBoxManager and ButtonManager control. But again, with so much similar functionality required regardless of the control being managed, it would be technically possible to create a generic ControlManager(Of T As Control) class which can manage any type of control.

[Code]...

So in summary, one can facilitate managing a large number of user interface controls by building a "control manager" class which both encapsulates the list of control instances, and deals with adding and removing defined event handlers for every control it manages. The generic control manager class itself can be inherited and extended into a more specific class on a per-application basis in order to provide more application-specific functionality. Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

View 9 Replies

Custom User Controls - Correct Size With User Choice

Sep 27, 2011

I have some custom user controls in my .net winforms program that do not display correctly when the user has selected larger text size. This setting:

My controls look like this:
Instead of like this:

The bill to area and ship to area are both custom controls. I don't know if this is contributing to the problem but I do have code in each to scale the phone/fax areas to stretch nicely, like this code from the bill to control,

Private Sub panFaxPhone_Resize(sender As Object, e As System.EventArgs) Handles panFaxPhone.Resize
panFax.Width = (panFaxPhone.Width / 2) - 1
panPhone.Width = (panFaxPhone.Width / 2) - 1
panFax.Left = panFaxPhone.Width - panFax.Width
End Sub

How can I get my controls to size correctly while still respecting the users choice for larger text (I don't want to just set the AutoScaleMode to None)? After playing with this for a long time it seems to be a problem with anchors in the child controls. See this below image, the inner black box is the control with its border turned on, the text boxes (like name) are anchored left and right and should stretch to fill the control, but don't.

View 1 Replies

Use Parent User Controls From Externally Loaded User Control?

Jun 2, 2012

i have a windows from project and in that project i created a user control lets call itcustombutton1 now i can use that control quite easily either at design time or runtime by creating a new instance of it like

View 1 Replies

VS 2008 Controls Vs User Controls

Dec 2, 2009

How many controls can I have before I should start looking at user defind controls because of too many controls making my program go slow?

View 4 Replies

Add User Controls To FlowLayoutPanel?

Feb 13, 2010

When I add my user control to a flowlayoutpanel its going left to right even though the flowdirection is set to TopDown

View 3 Replies

Any Way To Put All New Web User Controls Under Same Namespace?

Mar 2, 2012

I know this is probably a simple question but, I have a ASP.NET WebSite not WebApplication and I'm trying to get all of my Web User Controls under the same namespace so that I can register them once inside the web.config file and be done with it. My Question is, How do I do this (put them all under the same namespace and make it the default namespace for that folder)?

View 1 Replies

ASP.NET Dynamic User Controls

Jan 19, 2010

I am programmatically adding some custom user controls to a PlaceHolder which I have on a simple aspx page. All of the user controls Postback's work correctly except for one which has a Gridview on it.

For some reason any postback that gets fired from within this control, does not call the specified event on the first click, however all future clicks it will work fine. I have no idea why this is the case, but many solutions I have found, suggest adding an ID to the ascx User Control, however this doesn't work in my case.

I've taken a look at the source file for the page that gets generated before and after the first click, javascript used for calling the postback changes, i.e

Before first click: onclick="javascript:__doPostBack('tmpControlID$sgvPrimaryEmploymentHistory','Select$0')"
After first click:

[Code]....

Again, nothing overly complicated. The USERCONTROLNAME is just a const with the value "tmpControlID" in it.

The control that is giving me trouble is a little complicated, I was originally using a custom GridView control that we have created, but have removed it and replaced it with the standard asp one to see if the problem still occurs, and it does.

Any button, on control which fires off a postback will fail the first time, and all future click will work correctly. On the first click the Page_Load event will get called, but that is it.

View 2 Replies

Databound User Controls In .NET

Mar 2, 2009

I am looking for some information on how to properly implement data binding on a user created control. My UserControl contains a Textbox, a Button, and a MonthCalendar. I am able to databind to the Textbox inside of my user control, however, I want to implement the databinding on the UserControl itself, and not reference to textbox inside the control. I have attempted to set a Property as follows:

[Code].....

View 1 Replies

How To Save User Controls

May 31, 2010

Ok so i have a program that when you click a button it creates a picturebox were ever you want it well how do i save all the pictureboxes created and load them back in on load?

View 1 Replies

Use Of User Defined Controls?

Jan 23, 2012

I have created a User Defined Control that contains Add, Save, Edit, Search, Delete & Close Buttons. I added this User Defined Control in a New Form & How can I call Add, Save, EditSearch, Delete & Close Buttons of User Defined Controls from the New Form. What is the Code for calling a button of User Defined Controls from its Parent form?

View 2 Replies

User Control In Which There Are Some Controls?

May 11, 2011

I have a user control in which there are some controls. Now when I bind the usercontrol to db and show it in a panel (dock fill) it shows some odd behaviour like contols are painting one by one and this is looking odd.Can anyone please tell me how to fix these type of issues.

View 2 Replies

Access Controls In A User Control

Feb 7, 2011

I have a couple user controls that are loaded by a Select Case statement. However, in the behind code file for the main page that loads these controls, none of the asp controls show up in intellisense. I had a feeling it's because the controls are loaded conditionally. My question is what is the best way to solve this?

1) Load the controls and do a Select Case in the behind code to make them hidden or not.

2) Is there a way to say (psuedocode): LoadUserControl("UserControl1").Controls("tbTest").Text = ""

3) How can I pass a dataset to the User Control file?

4) Any other ideas?[code]

View 1 Replies

Adding User Controls In VS 2010?

May 12, 2012

i'm adding some user controls to my form but when i debug my project VS 2010 send me this error The variable 'xxx' is either undeclared or was never assigned what does that mean??(and its actually declared in the designer code)

View 3 Replies

Create User Controls In .NET Express?

Jul 31, 2009

I want to build my first user control using VB.NET 2008 Express. This control would simply inherit the ComboBox and use some event handlers to do an intelligent auto-complete function. When it's finished, I naturally want the control available in the toolbox so I can add it to forms in design mode.Is there a good tutorial on how to do this with VB.NET 2008 Express? Should I create this as a stand-alone project or as part of the first project where I will use it?

View 7 Replies

Dynamically Adding User Controls

Jun 23, 2012

I have been set a project from school to design snake in VB.Net but i am struggling to dynamically add the user control which acts as one of the dots in the body of the snake. Every time i add a dot on to the snake the previous vanishes. I assume this is due to me overwriting the previous one by creating a new instance of the object but i cannot find a way of adding a new one in.[code]I have tried using body(i) and other ways of adding a new instance of the object but am stuck.The subroutine will be called up when a new control is needed.

View 1 Replies

How To Declare The Custom User Controls

May 12, 2010

I am getting this annoying warning message "Object reference not set to an instance of an object." all the time because I created several custom user controls and drag it to a Windows form in a vb.net Windows application. I am using vs 2005 and dot.net framework v 2.0. This message pop up when I try to save the projector when I try to debug it in the Design mode.

View 2 Replies

IDE :: Toolbox Still Does Not Display User Controls?

Nov 21, 2005

My project, which has 2 user controls in it- does not display the user controls in the toolbox. Has anyone else had this problem, and/or know of a solution?I have tried adding other user controls to the project, they do not appear in the toolbox.I have tried creating a new project, and it's user controls DO show up in the toolbox. If I add the user controls from the first project to the new project -THEY show up in the toolbox for that project.So it must be something tweaked out with the project right?

View 14 Replies

Include JavaScript When Using User Controls?

Dec 4, 2011

I'm to .NET and all the associated cool stuff you can do, but am wondering about efficiency with User Controls and JS includes.

My user controls are mainly made up with an ascx display page and .vb.ascx code behind, as is customary with the code-behind coding style of .NET, which is great for coding simplicity although it does double then bear of files required. However, as I understand it, the server compiles these and returns the HTML efficiently.

Where the Control requires JavaScript, as I'm developing, I am making external JS files for each User Control with the same name, so the user controls consist of 'controlName.ascx, controlName.vb.ascx, controlName.js'

If a page requested by the user contains several User Controls the browser will be requesting multiple JS files, probably a master page JS file, jQuery AND each required file for the respective Controls.

This approach makes sense to me whilst developing and as everything's all kept nice and neat, making problem solving easy, but when it goes live there'll be loads of get requests from the browser, given that each time the browser gets a file, even the process of requesting the file to check if its cached or not must take some time.

Would I be best off including my JS inline in the ascx files, or code behind, directly inserting the script, or what is the 'correct' way to handle these multiple files to reduce get requests from the browser.

I'm using CSS sprites for buttons and stuff for the same reason, so wondering what to do with JS files. In my case CSS is generally handled by classes in the primary pages, so these are not an issue.

View 1 Replies

Load User Controls From A Directory?

Oct 10, 2011

This is an odd question but can I load custom controls from a directory? (e.g TestControl.dll) in my application at runtime instead of adding a com reference?The reason I am asking is that I have an application that is installed as an add-in for MS office. The entire interface is a panel that contains a user control. Initial installation is a bit involved so after the first install, I would like to use clickOnce to deploy updates by just supplying new user controls.

View 8 Replies







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