MouseWheel Event In User Control - Works Only After Every Picture Box Was Selected?

Aug 14, 2009

I'm developing User Control. It have many picture box and I use MouseWheel event on every picture box. Why MouseWheel event work only after every picture box was selected?

View 6 Replies


ADVERTISEMENT

Link From Button - When Sheet1 Is Selected, It Works, But When Sheet2 Is Selected, Not Works

Jan 5, 2012

I have a spreadsheet with this code:

'insert link
sheet1.Hyperlinks.Add(sheet1.Range("P1"), "http://http://www.vbforums.com", "")
the code of the button (ribbon)

[CODE]...

When I press the button, it connects to the web site. when the sheet1 is selected, it works, but when the sheet2 is selected, not works, why? the path is sheet1,What's wrong?

View 2 Replies

User Control Which Works As A Login Control Using Windows Class Library

Feb 12, 2009

I Need Build a user control which works as a Login control using Windows Class Library or Component Template:The user control returns the user name and the password It means that the control has minimum two ReadOnly Property procedures. You let the user of your control (he/she which uses your control in his/her software) to set the background colour of the two labels. Create a Windows application to test your control.

View 10 Replies

Save Picture Selected By The User?

Sep 11, 2009

May I know if its possible to save a picture file like .jpeg file in vb after the user chooses his picture? As i want the user to be able to save the picture that he chooses at run time. So that the next time he runs the app, the picture will still be there.the below is the code that i used to open the picture.

Dim strFileName As String
OpenFileDialog1.InitialDirectory = "C:"
OpenFileDialog1.Title = "Open an Picture File"

[code]....

Is it i save using the my.setting part? but i'm not so sure abt the setting type. AS there doesnt seem to have system.drawing.image.

View 4 Replies

User Control - Calling A VB Linkbutton's(within A User Control) Click Event From Javascript?

Apr 11, 2009

how can i call a VB function - deleteevent() in usercontrol.ascx.vb from a javascript function in clickhandler(e) in usercontrol.ascx. The call should cause a postback because I need the usercontrol to display the changes.I am currently trying to do it by using a linkbutton with style display:none, and calling its click event from the javascript function. But i dunno how to call the click event.

View 2 Replies

VS 2005 Using Combo Box In User Control And Getting Selected Value In Another User Control

Aug 31, 2009

i am using vb.net 2005 to developed desktop application I am having two windows form user control , the first control name con.vb containing the design and code for connecting to database and getting a list of my project values in combo box.

Now the second user control report.vb which i am using to generate some reports , since the code behind is using connection to connect to various project database , so i want to get the value of

First user control into another how i can get the i have tried the below but its giving me error in run time but no error in design or code behind -

MR.MainForm.Connection1.project_combobox.SelectedV alue.ToString

Error i am getting is :

System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="MDR"

View 1 Replies

Play Audio According To The Value Of Selected Control In A User Control?

Apr 2, 2012

How can i play an audio that possibly mp3 or wav without let the user to select the file by using the open dialog box. i want the audio to play when the user press a key. for example user press key 1 then audio1.mp3 will be play.

View 1 Replies

Control Size Of Picture Uploaded By User?

Aug 1, 2009

Normally when user upload a picture, how do u control the size of the picture uploaded by the user?

is there a way to change the size picture (scale the image according my size 300 x 150). Let say an user upload an image with (500 x 300), using picturebox, can i scale the image (500 x 300) to my picturebox size so that it can looks perfectly nice?

View 5 Replies

Interface And Graphics :: MouseWheel For Interop'ed ActiveX Control?

Apr 18, 2011

Is it possible to get the MouseWheel event from an Interoped ActiveX Control?

I have a DXF Viewer (with measure) control I wrote in VB6 that is quite frankly... Huge. It would take an inordinate amount of time to rewrite the whole thing and supporting tools in VB.NET. The MouseWheel event is used to Zoom in and Out. The control has a MouseWheel_Input() method to accept MouseWheel data from the host.

I added all the VB6 Mouse events, the Enabled Property, and The ActiveControl Property in VB6. Recompiled and registered the control on my VB.NET development machine. Added the control to my new VB.NET project and verified it has a focus method.

View 1 Replies

One Trigger A Click Event In A UserControl From The Main Form's Tab Index Control That Contains An Instance Of The User Control?

Jan 5, 2011

The code is listed below which hopefully illustrates what I'm trying to do:[code]....

View 12 Replies

.net[2008] Graphics - User Control - Picture Box Image Not Being Displayed?

Oct 1, 2009

I dipped my toe in the world of user controls as needed to double buffer a panel control and now want to create a picturebox control with a thicker border. Writing a dice based game, the dice represented by pictureboxes when clicked are highlighted and their border style changes FROM BorderStyle.none TO BorderStyle.FixedSingle, which is where I want to increase the thickness of the border. My user control code increases the border thickness using the code below:-

[Code]...

View 4 Replies

Combo Box On A Tab Control SelectedIndexChanged Event Doesn't Fire Until Tab Is Selected?

Jan 24, 2012

I am using VS2008, vb.net, Windows forms project.I have a combo box control on a tab control.The selected value of the combo box is bound to a binding source.The data source of the binding source is a typed dataset.I set the datasource of the binding source when a record is chosen in a data grid control.Since the combo box is bound to the binding source, this should set the selected value of the combo box, and fire the initial SelectedIndexChanged event.Therefore, I remove the SelectedIndexChanged event handler for the combo box before I set the datasource of the binding source, and add the handler again after the datasource is set.

View 2 Replies

How To Play Audio According To Value Of Selected User Control

Aug 22, 2009

How can i play an audio that possibly mp3 or wav without let the user to select the file by using the open dialog box. i want the audio to play when the user press a key. for example user press key 1 then audio1.mp3 will be play. Please suggest me something and provide the simple code if possible.

View 2 Replies

Date Time Picker Control - Day As 1st On Any Value Selected By The User

Jun 21, 2010

An issue.For my date time picker control I want the day as 1st on any value selected by the user.(day of date part should be 1 for any date).

View 1 Replies

For A User Control With A Listbox Expose The Selected Item To A Parent Page?

Oct 27, 2010

I have a simple user control which wraps some logic around an AutoCompleteBox. This question could apply to any ItemsControl control like a dropdown or listbox though.

<UserControl>
<Grid Background="White">
<sdk:AutoCompleteBox Name="myACB" ItemsSource="{Binding myData}" />

[code].....

View 2 Replies

Retrieve Selected Dates From Calendar Control / When User Clicks Button?

Jun 16, 2011

I have a few questions. I am not understanding on how to do it.The first question is:

1.When the user clicks the button the info from the controls on the left appears in the label on the right.
2.How to retrieve the selected dates from the calendar control when the user clicks the button?

View 9 Replies

Custom Event In User Control

May 10, 2011

I've got a page (aspx) that contains a usercontrol (ascx).On postback of the aspx, I'd like to read some control values in the ascx. So upon reading some good articles, I created an event in my aspx that fires on postback.The event handler is in the ascx, and simply writes the values I'm interested in to the viewstate so that the parent page can read them.The problem is my event handler never gets hit, even though I see the event is raised as I step through the code. So my code bombs when trying to read the viewstate (which is empty)[code]Oh, did I happen to mention I'm dynamically loading the ascx? :)

View 2 Replies

Handle The Key Down Event Of The User Control

Dec 19, 2010

I use VB.NET 2010 I have created a user control which holds a few textboxes, where the user can find articles. This user control is added to several Forms (where ever the search is needed). I have to handle the key down event of the user control, but it isn't working... The usercontrols's Key_Down Event is never fired. - I have set KeyPreview of the form to true, then the Key_Down of the Form is fired.

View 6 Replies

.net - Hooking Up Event Handlers On User Control?

Jul 27, 2011

I tried to use this code in the form:

AddHandler MyControl.MouseDown, AddressOf StartDrag

This wont give me an error, but it doesn't happen anything when I mouse down on the Control.

the same doesn't work if I put it in the user control.

Private Sub StartDrag(ByVal sender As Object, ByVal e As MouseEventArgs)
Dim Box = CType(sender, Control)
Box.Tag = New DragInfo(Form.MousePosition, Box.Location)
End Sub

View 2 Replies

Button Event Of A Web User Control Does Not Fire

Jul 31, 2011

My web user control is [code]...

The problem now is that the click event does not fire upon clicking at the button.

View 1 Replies

Call Button Event From One User Control To Another?

Oct 28, 2011

I have created two user controls (lets say A and B) and calling then on default.aspx. Both user controls have button named as clear and its event method "btn_clear_click (sender,event)". Actually I like to do something like this: if I click clear button of user control A then it would also do the same tasks defined in user control B's bth_clear_click method. Means, is there any why to call button event of one user control in another user control.

View 2 Replies

Know Whether An Instance Of An User Control Has Listeners For An Event Or Not?

Mar 15, 2012

Is it possible to know whether an instance of an user control has listeners for an event or not? I would like to do something like this:

[Code]...

View 4 Replies

User Control Custom Event Program

Jan 16, 2010

I had this new idea for a user control Sliding Bar/Panel. See screenshot. So I quickly whipped it up but I've got this problem that I cannot figure out why it does not work. Because I wanted to make it nice and tidy I desided to use a Class (Header) and created a TypeConverter (HeaderConverter)

Code:
Public Class HeaderConverter : Inherits ExpandableObjectConverter
Protected SortOrder() As String
Public Sub New()
SortOrder = New String() {"Text", "Depth"}
End Sub
[Code] .....
and goes to the RaiseEvent but nothing happens Why?

I know I could put properties on the Container control to access the ctnbutton Control that is embedded into the control but I thought this might be a nicer way.

View 13 Replies

Wpf - Fire A Custom Event From User Control?

Feb 10, 2012

I have a user control (SomeUserControl), that I am using in a Main Window. I write my application entirely on SomeUserControl, and Main Window is hosting SomeUserControl and nothing else.

Right now I have a shutdown button (in SomeUserControl), that is supposed to close the Main Window. The reason for this is that I do not want anything from SomeUserControl to close the application itself, but to fire an event from SomeUserControl, and Main Window receives it, and Main Window will close the application instead of SomeUserControl.

How do I do it? I am not familiar with the concept of creating and handling custom events, so if someone could explain it in words and in code as an example, I will be very grateful to you!

Edit: Here's my code so far.

(in Window 2)

Public Event CloseApp As EventHandler
Private Sub CancelButton_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles CancelButton.Click
DialogResult = False

[Code]....

I want to close the application when I click cancel in Window 2, but I don't want to do it in such a way that Window 2 closes itself, but by sending some notification to Main Window, and Main Window closes the application.

View 2 Replies

.net - Declarative Event Handling From ASP.NET User Control To Page?

Sep 30, 2009

I am trying to figure out how to declaratively pass in a event handler into a user control, but I am stumped. All I can make work is the user control's event handler.. I can't seem to bubble up the caught event into the parent page. Ideas would be quite welcome. Here is my code:Default.aspx:

<%@ Page Language="VB" %>
<%@ Register TagPrefix="rpt" TagName="filter" Src="WebUserControl.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

[Code]...

View 1 Replies

Asp.net - Can A Page Raise An Event That The User Control Can Handle

Mar 13, 2009

I have done this the other way many times as it makes sense (the page knows about the control as it has been added to the page and can handle the 'child' event)

Is it possible to do it the other way? I think not as the control doesn't know what page it is going to be on

The reason i ask this is that I have a modal popup on the page to ask users to login, and it is only when the user has logged in that I want my user control to go away and execute some code but I am not too sure how to tell the control this has happend?

View 2 Replies

Asp.net Vb User Control Raising An Event On The Calling Page

Apr 7, 2010

i'm trying to learn about user controls. I created a user control that has a textbox and a button. What i'd like to be able to do is when i click the button in the user control, populate a label in the aspx page. I understand that i could just have a button on the page that uses some properties on the user control to get that information.. but i'd like to know how to do it with the button the user control.. the reason for this is the button is just an example.. a learning tool. if i can get this working, i'd likely be putting thing in the user control that might require this kind of passing information. Anyway.. i've found some c# examples that i tried to get working as vb.. but once started getting into the delegates and events..

View 3 Replies

C# - Subscribing Event Of Dynamically Loaded User Control?

Oct 27, 2011

I have two usercontrols. One is loaded statically another dynamically.In the aspx page I can write as follows for static user control.

ProgramAddSchedule.onNewProgram += new AddProgram.OnNewProgramClick(onNewProgram_btnHandler);

But dynamically loaded control's event I am not able to get

Control myUserControl = (Control)Page.LoadControl("~/View/EditScheduleProgram.ascx");

How do I get the event of the dynamically loaded control?

View 2 Replies

User Control Button Click Event Not Raised

Nov 4, 2010

I have a User Control that has been added to the page dynamically. When I click a button on that user control[cod]e...

View 2 Replies

VS 2005 - User Control Click Event In Form?

May 31, 2010

I have a user control that I have added a listbox to. I have added this control to a form and would like to use its click event.
Private Sub mycontrol1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mycontrol1.Click
When I click on the control on the form it does nothing none of the code for this event gets triggered. If I click on the listbox inside the user control that .click event inside the control does trigger. How can I make the click event for the user control trigger when the control is clicked?

View 6 Replies







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