Valid Methods For Leaving Form?
Jan 7, 2009
I find that if I do me.close and then reopen the form with showDialog later, things are as they were before I closed it. If I use me.dispose and then later open the form again, its as if it was never opened before. Are these two both valid methods for leaving a form?
View 6 Replies
ADVERTISEMENT
Oct 12, 2010
i was wondering i have a picture box which is controlld by the keyboard, and the picture is able to leave the form. i was wondering how to stop it leaving the form without knowing the exact size of the form and using multiple points on the edge of the form.
View 3 Replies
May 9, 2012
My
vb.net
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Closing
[Code].....
How to stop form closing?
View 9 Replies
Feb 9, 2011
How do I keep my picture box from leaving the form screen and how do I make it 'bounce off the walls" when it hits one edge of the form?
View 4 Replies
Nov 1, 2011
How can I set the Opasity of a form (not form1) down to 50% but leaving the Buttons and TextBoxes at 100% Opacity?
View 9 Replies
Aug 29, 2011
This is the original code in c#
public class CategoryRepository: RepositoryBase<Category>, ICategoryRepository
{
public CategoryRepository(IDatabaseFactory databaseFactory)
: base(databaseFactory)
[Code]...
Does anyone has an idea what i should change to let it work and let my UserRepository use the methods in RepositoryBase while implementing the IUserRepository?
View 1 Replies
Mar 21, 2012
I'm fairly new to VB programming. I have a control which is mounted within a form. I need to implement a callback, so that the control can make the parent form do something. My plan was to create a MustInherit class with MustOverride methods, and make the form inherit the MustInherit class. However, Visual Basic tells me that the form cannot inherit more than one class, which means that it can either inherit my MustInherit class, or System.Windows.Forms.Form, but not both.[code]...
View 1 Replies
Jun 29, 2010
How can I view the methods that are hidden within objects please? For example I have a listview vbLstVw - But the only method I can seem to access is by double clicking it to get the
lvwPrac_SelectedIndexChanged
But I know theres more! (I don't know what there called, but for example):
lvwPrac_Initalize
lvwPrac_1337functionOfD00m
View 2 Replies
Apr 21, 2009
I want to add some action to my form when it is closed by clicking on the "X" button in the upper right corner of the form.How is this done? I suspect that i must add a handler for some event, but which event is it?
Currently i am using the closing event, but i dont get it to work properly.
View 10 Replies
Jun 24, 2011
I am working with a vb program, but there is something strange on one of my .vb code pagewhen i put the "dot" afther the object name its dont show the methods availables for this objectbut on other vb code pages i can see it. but in this one no.for exmaplethis is a piece of code: Dim sb As New StringBuilder()
View 3 Replies
Mar 29, 2010
I am not sure how clear my question is by the title, but I am trying to make Class methods instead of Instance methods in Visual Basic that way I don't have to waste memory and code creating temporary objects to execute methods that don't need instance variables.
I am not sure if you can do that in VB but I know you can in Objective-C by using either a "+" or "-" sign in front of the method declaration. And in C++ (at least I think, I can't remember) you put the static keyword or const keyword in front of the function.How would I do this in VB if it is possible? Or should I just make a separate set of functions that are not members of a class?
View 2 Replies
Sep 29, 2010
control that contains a button. the user control is placed on my main form. when the button on the user control is clicked I need to to call a method that is located in the mainform.vb
View 2 Replies
Aug 9, 2009
control that contains a button. the user control is placed on my main form. when the button on the user control is clicked I need to to call a method that is located in the
View 9 Replies
Dec 1, 2011
I have already managed to get friendly urls working with my cms; however, what i want to know is: with asp.net 4.0 routes options, how do i get a root leaving routing? When user types in www.mysite.com/page_name, which is aboutus, it goes to the page cms.aspx but leaves the other routes intact:
[code]...
View 1 Replies
Oct 6, 2010
When a user leaves a TextBox on the form I execute a format and save to a variable. This is saved to a database by clicking on a ToolStrip button.
The problem occurs if the user moves the mouse directly from the TextBox to the Button. Neither the Leave event or the Lost Focus event is triggered, the variable is not created and, of course not saved.
If I put the code in the Save Button and the User moves to another control, the formatting(data type Double to currency format in the TextBox) that I want to show is not executed.
View 13 Replies
Jul 20, 2011
So I have a few variables in an array a I want to compare another variable to each of them, if it is the same do something, AND STOP THE FOR LOOP. else carry on the for loop. So...
for i = 0 to 4
if variable = a(i) then
do some stuff
[code]....
how do i end the for loop from within an if statement that is in the for loop
View 2 Replies
Apr 9, 2011
this is urgent. i have a form in which i need to give timedelay of 3 seconds before each line executes. But when i try system.threading.thread.sleep its freezing the UI and furthermore all delays are executing as one single delay. that is
[Code]...
View 5 Replies
Aug 24, 2011
I have a modal pop up that is supposed to upload documents. It does that just fine, except that it doesn't give them a title, therefore nothing shows up on my page since Title is how they show up in the list. What should I replace LinkTitle.Text with to get this to work?I am trying to fix this guys code because none of it worked right. I added a comment below that has new code in it that is parameterized. This is in ASP.net 4.0 VB using Microsoft SQL Server.[code]
View 1 Replies
Aug 17, 2011
The simple line:
Enabled = False
Leaves the user no options to do anything with the program.What I want is to disable everything using the given line (or if anything else), but leave a Menustrip enabled.
View 3 Replies
Sep 12, 2011
I'm trying to update an old code that I don't have the source code for. In this code, the user enters an integer in a textbox as part of a form. Once they move to the next textbox a new form opens to input the number of files that the user chose (in the textbox).I have created all of the forms, but I can't figure out how to get the code to open the new form once the integer has been entered in the textbox and the cursor has moved to the next textbox. I would prefer this to happen automatically and not involve a button.
View 13 Replies
Apr 27, 2011
I am experiencing a strange issue with a VB6 -> VB.Net conversion. There is a function that uses ADOX to look through the tables in a given database, and reset the seed values of any columns in said tables with the auto increment property set to true.I tracked the issue down to a call of "col.Properties("Autoincrement").Value". If this line of code is commented out, then the file handle properly terminates when I close both the ADO and the ADOX connections at the end of the function. If I leave that line in, the handle stays open despite the closing calls and forcing garbage collection.Here's how I am closing the objects:
System.Runtime.InteropServices.Marshal.ReleaseComObject(adoConn)
Dim connection As ADODB.Connection = cat.ActiveConnection
If Not connection Is Nothing Then
[code]....
View 1 Replies
Jan 11, 2010
I'm trying to find where this code might be leaving old connections open, and I found this code that might be the cullprit. It is in a function. I'm wondering if this connection would close, if an exception occured from within the USING statement?
[Code]...
View 3 Replies
Mar 7, 2012
Using a timer, am making a rectangle platform move from left to right. The problem is that it leaves a trail of itself and I believe this is down to refreshing or something. here is the timer code if your interested:
If shaperet = False Then
Timer2.Start()
platform.Left -= 4
[Code]......
View 17 Replies
Mar 16, 2009
I'm looking for a way to process the text entered into a textbox, before the the focus is lost from the control. Or a way to pass a reference to the control to a function/sub when the control has lost focus. In Access I would be able to use the AfterUpdate event. I have tried the following events, but have not figured out how to get what I want from either of these events:
- TextChanged (tried to capture the Tab key, didn't work)
- Validating (when fired for Text1, the ActiveControl name is Text2 which is the next TextBox control)
View 4 Replies
Mar 7, 2012
I have a situation like this:
if <some test> then
do lots of stuff
endif
I'm refactoring the code getting ready for some major work. I want to remove the if/endif pair but leave the contents (do lots of stuff) intact and in place.
In Visual Studio 2008, what is the easiest way to do that without making a mess
View 4 Replies
Feb 26, 2010
I have a DGV with a CB column in VS2008. I would like an event when a DGVCB selection is made (without leaving the cell). It will probably have to be a DGV cell or row event but I can't find one that fires as soon as a DGVCB selection is made.
View 3 Replies
Jun 14, 2010
i am having trouble getting this to parse and remove the html and only leave the flash applet here is my code so far:
WebBrowser1.Document.Body.InnerHtml = WebBrowser1.Document.All.Item("object").OuterHtml
View 1 Replies
Nov 15, 2011
Our program works fine, until someone locks the computer or the screen-saver pops up (but not ctrl+alt+delete). Once the computer is unlocked/the screen saver is closed, the application stops drawing everything except the title bar, and stops responding to input - it displays a mostly-white window which can't be moved or closed.(Example of application freezing - the mountains are from my desktop background)If we let it sit for about 5~10 minutes, it comes back to life, and doesn't hang again (even after locking the computer/screen saver popup) until the application is restarted.
View 9 Replies
Jan 29, 2010
I'm trying to use StreamWriter to write to a text file; it creates the file fine, but when I open it up, it's still empty. I marked the code below where the writing action takes place.
vb Public Sub BHorse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BHorse.Click
Dim oMarketsReq As New BFExchange.GetAllMarketsReq
Dim oMarketsResp As BFExchange.GetAllMarketsResp
Dim BFWrite As System.IO.StreamWriter
BFWrite = IO.File.CreateText("C:Datamarket.txt")
With oMarketsReq
[Code]...
View 5 Replies
Jun 22, 2010
I am trying to run my program to test it. Actually I am trying to run second form to see it that its working properly or not. But it shows me error. First time I got this error message:
"Exception of type 'System.OutOfMemoryException' was thrown"
& second time I got this one
"An error occurred creating the form. See Exception.InnerException for details.
The error is: Parameter is not valid."
By the way my program has 25 forms.
View 2 Replies