VB Form To EXE/Opening IExplore?
Aug 19, 2011I need to send this to my other admins on my forums so they have access to editing my website andeverything when they need to, but I don't know how to make it distributable (or
View 1 RepliesI need to send this to my other admins on my forums so they have access to editing my website andeverything when they need to, but I don't know how to make it distributable (or
View 1 RepliesHow can i enter information directly into a textbox of a website for example, if i shell iexplore.exe and load [URL] and then want to type a search via the program.
View 3 RepliesI call the method GetUrl below provided in a form-based assembly from a console application to get the content of an HTML page. This works fine so far with one exception. The code starts an iexplore-process in the background and this process remains active even after fnishing my program. The only way I found to get rid of this process was to kill the process, but this seems not be be a very nice and mature solution. I already read that the NET webbrowser control in only a wrapper for an activeX COM control of IE.
Question: How can I close the newly created iexploe-process in a clean way using the webrowser object?
[Code]...
Is there a better way to make a form with multiple buttons opening different things than having a form that has lots group boxes for each tab. So in the begining each box will be invisible and when you click the button the corresponding group box will become visible. Is there any other way?It will be like a background image and it'll have buttons that will mask it with invisible buttons. when the button is clicked it will open the corresponding group box.
View 5 RepliesWhenever I want to reopen a project that I didn't worked on for several month and want to view my form in design mode I receive following error.
Warning1Method not found: 'Void System.Windows.Forms.Design.ParentControlDesigner.WndProc(System.Windows.Forms.Message ByRef)'.00
[Code]....
I used this project in VB2005 express, but also in VB2008.
In the main form the user can choose to download information from a device.Since this request takes time, when "download information" is pressed I open new form in a separate thread: Private Sub RunDownload()
[Code]...
I would like to know the event order of form which is executed while opening form. I am showing my form using following code and the code in form_load event executes twice. Once when the form variables are initialised and second when form is displayed. I want it to execute once only. form showing code:
[Code]...
I have a module with Main(). I am calling a form1 from this Main(). Why Form1 is not opening. I set Main() to run at the first in my Project propertis. I am using VS2008.Net3.5 VB code.The Code is:
Module Module1
Public frm1 As Form1
Public Sub Main()
frm1 = New Form1
[code]....
I have two forms and a button on the first form. What i want is when i click the button the second form to show and the first one to close.But this isn't working with:
Form2.show()
Me.close
I am a bit confused on the correct way of opening a form. I generally practiced form1.show to open a form, but i came across the following code to open an form.[code]....
View 9 RepliesI am creating a simple email application which sends mail from a user's Gmail account, as I haven't worked out how to receive incoming mail yet.I have created a form (frmSignIn) which asks for the log-in info and another (frmComposeMessage) which has all text boxes necessary for composing an email (to, subject, message body).After clicking Sign In on the first form, it should hide it and open the second form, however I get this error:
System.InvalidOperationException was unhandled
Message=An error occurred creating the form. See Exception.InnerException for details. The error is: Object reference not set to an instance of an object.
[code].....
I have form1 and form2 and have when a user clicks on an icon on form1 it shows form2 and hides form1. But how would I get it to when a user closes form2 it will show form1 again?
View 3 RepliesI have 2 separate projects that i created using Visual Basic 2010. I need to have a Command button in project 1 to open a specific form that i have in my 2nd project.
View 1 RepliesI have a program withmultiple Forms and i have made a back and Forward Button so they caneasilgo back to the previous Form.My question is How do you open a random Form with a string i have googled it nd this code is the best one i have found.
View 1 RepliesHow to create an instance of a form if it is not know in advance which formtype has to be opened. If you want to skip the chitchat: the .NET code example is at the end of this post. First the Symantec: when we create a new form, this form has a name. If we refer to that name, we actually refer to the name of the type of object that is just created. When to use of course when reading the subject you might think: why not just pass the form to a parameter that takes a form (or control/object)?
The answer is: you don't when it is not sure, when or if a new instance of the object has to be created or, as mentioned, when the procedure is called it is not known which class has to be created. You could of course hold a bunch of created objects, but that would be a shameless misuse of memory. Imagine the following scenario (seen something like this in a post, but can't find it anymore):
You have a class that is able to trap an event, say the doubleclick of a textbox, and has to open a form when it occurs. If it's always the same form, that's easy, but what if you want it to be determined during runtime? This is a quite common story: doubleclick on article opens the detail form of that article, doubleclick on supllier opens that particular form. If you use a form variable, how do you say to the class which form should be opened? This will not work
Code:
Dim FormToOpen as Form 'you don't want to open it right away, you want to know when the time comes what form to openFormToOpen = Form1You could say FormToOpen = new Form1, but then 1. an instance would be immediately created, even if it never will be used: memory leak. 2. you can never close the form, you'll always have to use the same instance created when setting the form. Consequently, you can never open more than 1 instance using this way.
The solution: use the type. If you know the type, the Activator class will enable you to open (and return) an instance of that form at any time and as much times as you like. (The Activotor class exposes the function CreateInstance which returns an instance of the specified object)The following code creates an instance of the type form1 and shows it.
Code:
CType(Activator.CreateInstance(GetType(Form1)), Form).Show()Or for better readability, the same code split up:
Code:
Dim FormToOpen As Type
FormToOpen = GetType(Form1)
Dim frm As Form = CType(Activator.CreateInstance(FormToOpen), Form)
frm.Show()
I'm trying to create a new screen in the same form, the only thing I've done closest to doing that is when you click on a button in one form, another form opens. But I'd like this action to be presented in the same window. So I guess I want to open multiple forms in the same window.
View 1 Repliesi want to open progream in my Form,like:(The picture edited in Photoshop)
View 2 RepliesJust as the title says there is a way to have the same 'Windows Form' to open two times ?
View 2 RepliesI'm making a program where the user can choose a question section and the program is supposed to randomly open one of a few forms that contain questions. However, I can't get the code right.
[code...]
Okay, so I was making a program, and I wanted to open a new form, and close the current one.Natuarlly, I did this.
If login = True Then
MsgBox("Logged in.")
Me.Close()
[code].....
I have a project in VS2008.Net3.5 with a Module1, form1 and form2.
[Code]...
Question: At the beginning I am opening form1 from sub Main(). Now from the menu I am openning form2. In form2 I am clicking Done button to hide form2 and go back to form1. It works fine in the 1st trial. Keeping form1 open for the 2nd time, I opened form2 from the menu. Now when I Click the Done button 2nd time it just hides up everything. Form1 does not show UP. It just exits the whole application. But in my btnDone event, I have frm1.show().
I'm creating an app in VB2008 that needs a function that automaticly closes the processes "iexplore.exe" and "firefox.exe".
View 8 RepliesI have 3 forms, say Form1, Form2, Form3. Form1 has a public method assigning an image to a picture box:
[code]...
The problem is that this code is Opening a new second instance of the first form (Form1), when I see in debug mode and move my cursor over the frmPers variable, It's value is Nothing, altough I am seen it at the screen ¿Why is this? I am loosing my hair after three days trying several forms to do it without any results.
I have created a main form in my program to which I have added a combo box containing 12 months of the year. What I want is when the selected month is changed it should call a subroutine which does a calculation. The procedure works but the combo box acts as if the selected item has been changed as the form is opening which is not what I want as at that time there is no data loaded for the procedure to do it's calculation. So what I want to know is, is there some way to prevent the combo box from behaving this way at start up?
View 5 RepliesI want it to open and close after 3 seconds at each Timer1.Tick What i got so far:
[Code]...
I am attempting to find a way to get an existing form to close and re-open (with the controls re-set). If I use a method like
[Code]...
I want to open a VB.net form using a ThreadPool with a maximum of 10 threads. I need to do this because, the form should open based on a live event and i need atmost 10 forms on the desktop at a time. If i open the form on every live event without using a ThreadPool, the desktop will be floaded with many forms. I am using QueueUserWorkItem method of threadpool to queue a method which opens the form. In this queued method, there is form1.show() statement called. But after displaying the form, this method finishes execution and again we have 10 threads available in the system. I somehow want to either keep this method running so that 1 thread is occupied or i want to keep the thread alive till the form1 is closed by the user. I want the 11th form to appear on the desktop, only when any of the existing forms out of the 10 (already on desktop) is closed.
View 2 RepliesI have an MDI form on which I am trying to open two other forms in the same place (not at the same time). One works, one doesn't. Both of these forms have the following as the very first statement in the load event.
One form opens in that location and functions fine. The other form, which is the same size, seems to spread out across the MDI form top-to-bottom wise. There is also a bar at the top with min, max, and close buttons that came from where I don't know as the form is set with no border. This form must open in the correct way as there is a menu at the top of the MDI. Anybody have any idea why this is happening? Some property or something which is different between the 2 forms?[code]...
I have an MDI form with child forms which I open on it. The following statement in each form's load event places a child form in the location I want:
Me.Location = New Point(0, 136) I have several of these working. However, I have one form for which this statement does not work. It opens spread out over the entire parent form. Also, there is a border at the top with min, max, and close buttons even though the form has no border. This form has a picture box on it, if that means anything. why this child form does not open in the specified location?
I'm making a game in which you advance through the levels when you click some buttons, the way I'm doing it is "formname.show" and "me.hide" inside the button code, but the problem is, using this code, it shows somewhat of an unprofessional look because it opens a new window everytime I reach a new level, and it gets quite annoying also.
View 1 Replies