Base Form Handle Event - Array Of ChildForm
Jul 27, 2009
Base form baseForm generate an array of childForm (3 fo them). I have one event handler in baseForm which is called when user close each childForm. The problem is that this event handler is only called when the last childForm is closed. When other childForm is closed, the event handler doesn't do anything.
View 7 Replies
ADVERTISEMENT
Sep 6, 2010
I can quickly knock together soem code to xlate base 10 to/from bae 13, but I just wondered if something very easy already exists in VB.NET (or even somethign generic, with base N, but right now I am only looking at base 13)
View 1 Replies
Oct 4, 2011
Do you mean, "opens a file" or "is opened with a file"?
View 1 Replies
Apr 27, 2011
I have used the below code but its not showing the msgbox. What is wrong with this code ?
Private Sub frmSimple_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed
Dim result = MsgBox("Are you sure you want to Exit ?", vbYesNo)
If result = DialogResult.Yes Then
me.Close()
End If
End Sub
View 3 Replies
Jul 13, 2009
I have two forms, "Customer Information Summary" and "Products Sold". They are shown as separate tabs in a MDI window. When the data in "Products Sold" gets updated, I would like an event to fire from that form which could be handled in the "Customer Information Summary" form.
View 1 Replies
Jan 31, 2012
I'm retrieving data from Excel and would like to keep my arrays 0 based but Excel returns 1 base. Is there a fairly simple way to return change the array from 1 to 0 base? Or do I just need to create a loop? Here's an example code right here:
[Code]...
View 1 Replies
Sep 16, 2009
I has 4 form
1. Main.vb (IsMdiContainer = T)
2. Form1.vb (has textbox1 , Button1)
3. Form2.vb (Has button1)
4. Form3.vb ( has textbox1, button1)
i start with Main.vb, and show Form1.vb (
code :
dim frm1 as new Form1
frm1.MdiParent = Me
frm1.show()
at Frm1 i has 1 textbox (textbox1) and button1, if i clickk button1, form2 show with dialogform
at button1 click
form2.showdialog()
in form2, i has button1 if i click, form3 show with dialogform too
code
form3.showdialog()
in form3 i has textbox1. and button
if i clock button1. i'll put textbox1 value into form 1 textbox.
code : at button1 click.
form1.textbox1.text = me.textbox1.text
but the textbox1 in form1 not has value ?
View 2 Replies
Mar 29, 2011
I already set this code up but still no luck.
childform = PIS
childform.MdiParent = Me
childform.Show()
[Code].....
See the image. Both border of the form is set to none and their control box also and maximize,minimize box.
View 16 Replies
Aug 11, 2009
Even i have use the "BringToFront" keyword for the childform but its not working. The buttons on the main form are still displayed above the childform. But when i open another form from the childform, it is displayed properly
View 1 Replies
Mar 6, 2011
is it allowed to use more than one Sub to handle the same event ? For example , may I have 2 separate subs to handle the Load event of a form ? Will they fight each other ?I have tested it and it seems to work fine , nevertheless I thought I'd ask you . In case you wonder , there is no great deal , I just want to copy the same lines of code in more forms so I am doing it just in favor of the looking aspect .
View 5 Replies
Jul 31, 2010
I've read thru Iceplug's tutorial on control arrays and got it working. I tried to add a new event by basically copying his click event code and calling it a doubleclick event. I used the proper addhandler and assigned the correct name to my sub. I have the click event changing the background color to blue and the doubleclick event changing the background color to green. The background color does not change to green. Why?
Heres the tutorial with my new code encased in asterisks ...
Code:
Imports System
Imports System.Windows.Forms
Public Class form1
[CODE]...
View 7 Replies
Nov 9, 2011
When editing vb.net forms code in vs2008, how do I select base class events that I want to override? In vs2003 there was a list of overridables in the drop down list but now that list is missing?
View 4 Replies
Sep 21, 2010
I have a form called BaseReportForm that handles drawing some stuff to in a panel to create a template for a bunch of reports. The drawing all takes place in the Panel's Paint event and this form will always be inherited. In the inherited forms, I draw the specific details of the report in the inherited form's Panel Paint event. So I am drawing to the same panel from the base form and from the inherited form. It all works fine, but when I try to open the design view for the inherited forms, I get the following error..
Quote:
The event Paint is read-only and cannot be changed.
I'm not sure I am handling my paint events correctly. Is there a different way I should be handling the drawing of these reports?
View 9 Replies
Jun 22, 2010
I have referred DLL in my project. I have to handle the event from DLL in VB.net code. I guess we can do using WithEvents. Can you give me complete picture?
View 2 Replies
Sep 7, 2011
My program gets an encrpyted query string ,decrypts it and then pulls the pdfs in a popup window depending on the values in the string. The issue I am having is I have around 500 ids that I am passing whose pdfs need to be generated, but I keep getting the "Invalid length for a Base-64 char array".
Not sure what I need to do, I have read through the solutions and have done whatever has been said, with replacing the blank with the "+" but I cannot get this to work.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
_CurrentProcName = "Page_Load"
[Code].....
View 9 Replies
Oct 9, 2010
How do I make a splash screen with a progressbar that value changes base on the MainForm_load event? Example:When the mainform finished executing part of mainform_load, the progress bar in the splash screen changes to X value (eg 50)When mainform_load is executed completely, the progress bar moves to 100%, the splashscreen closes and mainform opens.
View 1 Replies
Dec 13, 2009
I am just curious, if there is some way to attach handler to my derived classes base event, if I know EventInfo and I have Delegate to handler function. I have tried MyEvent.AddHandler(CType(Me, BaseClassType), MyDelegate) already, but no positive result at all. Consider being in need of attaching handler to custom event at runtime, while derived class possibly shadows this event.
View 2 Replies
Aug 23, 2011
[code]But even here it seems the handler isn't registered until after New has completed.However, in real life the event is raised within code that's semantically part of the object initialisation, and I'd really rather not have to create some Initialize function.
View 2 Replies
Oct 31, 2011
I have a class structure and am attempting to create an array of object instances from the class some instances are parents and some are children Code snippets,
Parent Class object
Option Strict On
Option Explicit On
Public Class cTransportItem
[code]....
View 1 Replies
Nov 23, 2009
give me example of how I would declare a base case for a 2d array in visual basic. I am using 2008 edition
View 19 Replies
Jun 30, 2010
I have a problem to handle an event on a custom control a have on a form.... So first i made a custom control that is just a groupbox with some labels and txtboxes. That control i add dynamically to my form like this (Baycontrol is the name of my control)
Declaration
Code:
Friend Bay(29) As BayControl
Add the controls to Form
Code:
For Simindex = 0 To 29 'Me.Bays - 1
[Code].....
View 5 Replies
May 13, 2009
I have been reading up on this, but I can't get it to work for me. I am reading in comma delimited text into a three-column datagridview control. The third column is a combo box which only accepts certian values. If the data being imported into col 3 is not in the combo box list I get an error that tells me to handle the data error event.trying to capture that error and get rid of the default error message box. I am working with a Try/Catch statement, but it doesn't seem do anything.
Do Until fileReader.EndOfStream
stringLine = fileReader.ReadLine()
If Not stringLine.StartsWith("'") And Trim(stringLine) <> "" Then
[code].....
View 3 Replies
Mar 2, 2011
I must be missing something really basic, but I just can't figure this out. I have a module (declared as a Module, i.e. a VB "static class") and I have an event declared in it, and places to raise the event. But I can't figure out how to handle the event.
Let's call the module MyModule with an even MyEvent. Like so:
Module MyModule
Public Event CallHelp()
Sub ExamineStuff( ByVal input As String)
[code]....
View 6 Replies
Jul 22, 2011
I have a mouse click event for one of my controls. I then change the text of that control to something. I also have several other textboxes and want to do the same. How can this be done? I thought maybe this:-
Private Sub txtTitle_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles txtTitle.MouseClick, txtTitle2.MouseClick
End Sub
My problem is how do I determine which has triggered the event (title1 or title2).
View 5 Replies
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
May 18, 2009
I cannot Unresolve a post.I have a datagridview control with a combo box. The user loads data from a file into the control. If there are errors (the element in the combo box column is not in the combo box list) I would like to:
1. capture the row in which the error occurred, and store it in code/memory
2. change the cell backround to red (this is not that important)
3. continue without a message at the time of the error
4. post a message with all of the errors after the load is complete
I am using the code staight out of the Microsoft example to try to figure how to do this, but it is not posting any messages when I load bad data, so I am not getting any smarter from the example.[code]
View 2 Replies
Jul 19, 2010
I am using the Event Handler below for the Enter Key Press Event, it is running when ever any of the keys is pressed. This is not so much a problem when the app. is running, unnecessary yes. It is giving me problems when ever I am Debugging using Breakpoints. How can I change the Handler so it only runs when the Enter Key is Pressed, doing away with the If statement?
Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
If e.KeyChar = Chr(Keys.Enter) Then
'Different code blocks will run here depending on what
'TextBox or Label is selected.
End If
End Sub
View 13 Replies
May 30, 2012
I have an event in a module, like this:
vb.net
Module Module1 Public Event Event1(Value as Boolean)End Module
I want to be able to handle this event from different forms. This is what I tried to do...
vb.net
Public Class Form1 Private Sub Event1Handler(Value As Boolean) Handles WindowsApplication1.Event1 End SubEnd Class
But I get a squiggly line under WindowsApplication1 that says Handles clause requires a WithEvents variable defined in the containing type or one of its base types. I tried to swap Module1 in, but same thing. I tried without anything in front of Event1, but still nothing.
View 11 Replies
Jun 5, 2012
I'm needing to make something to ALWAYS replace a "." to "," in all textboxes...
That's what I'm doing, and it's working:
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
For Each myControl As Control In Me.Controls
[Code]....
View 7 Replies
Jul 25, 2011
I have this code in ButtonClick Handle event but nothing works :/ I was wondering why... I tried msg("") as well as the first line in the code to see if it works but nothing!
Dim myConn As SqlConnection
Dim cmd As SqlCommand
Dim sqlString As String
[code]....
View 7 Replies