Windows Form Application, When The User Clicks X On The Top Right Corner?
Jul 5, 2010I want to run some code when the user exits the current window, how can I do that?
View 1 RepliesI want to run some code when the user exits the current window, how can I do that?
View 1 RepliesLets say i label "label1" , and 2 buttons named "button1" and "btnRefresh " [code]So , when user press the button 1 , the text will change. But what should i put inside btnRefresh to reload the forms ? and display the default label.text = "Form Load" ???
View 9 RepliesOn each of my form I have put an 'Exit' button. When user clicks it, another form is displayed (I don't want to use 'MessageBox') asking user whether he really wants to quit. If user clicks yes the form closes. If user clicks no, form is redisplayed.
However, out of 4 forms only one form refuses to redisplay. The code is exactly same on all forms. I have included 2 Express 2008 projects showing one form each in the zip file apps-ssk.zip
I only managed make the form always on top. But what I want is when the form is on top, user cannot access the other application in the windows.
For example : Some messagebox won't let users access the other application until the users hit the OK button.
How do I change the startup form for an application when a user clicks a button?
View 1 RepliesI have a Windows form application with a MenuStrip at the top (File, etc...) and a TabControl directly beneath it with 8 TabPages arranged horizontally. The tabpages vary in height. The form's autoscroll property is set to True to allow the user to scroll down for those tabpages that contain more content. This all works fine.
What happens at runtime, though, is that when the user clicks on some of the tabpages that are greater in height, the scroll bar automatically scrolls down slightly, which obscures the menustrip at the top of the form. This behavior is undesirable. on how to modify it? I have compared the properties of the form itself, the tabpages, and included controls (table layout panels, etc.) but cannot figure out what distinguishes the tabpages that "jump" down when clicked upon from those that do not. I suspect that there may be a property that eludes me.
Second, I have added a ContextMenuStrip to the form to enable actions upon right-clicking within each tabpage. Even though I have assigned it to the Windows form and each tabpage, it does not appear at runtime. One can right-click all over the place within the application, but it never appears.
I'm trying to make an application where when the user clicks a button, it generates a series of 100 random numbers between 1 and 1000, and then saves those numbers in a text file. All I could come up with is generating ONE random number, but I can't figure out how to make it 100. Here is what I have:
[Code]...
Would it be possible to add a .exe to my resources and when the user clicks a button on the form it will create a directory ( C:My apps ).then add the .exe from my resources and launch the .exe from that folder.
View 12 RepliesI have a VB.NET 2010 Forms Application which includes a form with a textbox, and two buttons which I call from the main form using .ShowDialog
I've messed with something such that I can no longer prevent the dialog from closing when the user clicks the Ok button but has entered invalid information.
Here is the handler for the OK button's click event:
Private Sub cmdOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOK.Click
If SomethingIsWrongWithWhatTheUserEntered Then
[Code]......
[Code]....
I add a button to a form each time the user clicks a menu option as:
[Code]....
This draws a small blue line at the bottom of the button to show it is highlighted. Just like the mouseoverbackcolor property on a button except this will draw the line. It works fine until you slide the mouse very fast between the buttons. It is as if the mouseleave event doesnt always fire.
Clicking on the picture will cause the picture to move in the following manner: * If the picture is in the top left corner, it will move to the center, then to the top right corner * If the picture is in the top right corner, it will move to the center, then to the lower right corner * If the picture is in the bottom right corner, it will move to the center, then to the bottom left corner * If the picture is in the bottom left corner, it will move to the center, then to the top left corner
[Code]...
I need to record the screen when my user clicks start, and stop recording when he clicks stop.I've searched for a while on this subject, and I have found nothing.I want to do this without adding any files to my project, I just want to use some built in function in Visual Basic, and start recording, or even take a snapshot and add it to an AVI file or something...These are some sites I have found:
http:[url]......
This code is in VB6, but I am not sure how to even start using it?
I have set up a notify icon for my form. I want to make it so that when the user clicks the close button that it doesn't close the form it just takes it to shows the notify icon. They can exit the program from the notify icon. Can someone tell me how to keep it running?
View 2 RepliesHow can i draw text(demo demo) on exist image from top right corner to bottom left corner of exit image (on photo) in windows based applicaiton using vb.net.
View 2 RepliesI found some great code on capturing webcam images but the problem is the client PC will need to initiate the communication to this server (click Connect to server IP). This is like 2 way communication.How can i do something like this (door Kiosk system):when a visitor press a button on the LCD that come along a web cam (this will be the server), it will send the signal the client PC that is installed with the application i've created (window form) and pop up the images to the client PC (more like a 1 way communication). This image is captured through the web cam on the server to capture the visotor's image waiting outside of the door. How to do this?I'm really stuck as i'm not familiar with window API programming yet.
1) how to do the mentioned 1 way communication? possible in .NET?
2) how to make my application to be at the tray icon just next to the time displayed on the right bottom corner of the task bar? When a visitor press a button o the server, it will pop up a window form on the client PC showing the image captured via the server's webcam outside of the door.
is there a way to put image in lower right corner of form by using BackgroundImage?
View 1 Replies1) How do I force a form to open in a certain position on the monitor? ie. by default it starts in the top left corner of the screen. I want it to open in the bottom right corner. Also, is there a way to do this as a % rather than in pixels? As I want it to be in the correct position regardless of the resolution being used.
2) Can you remove the "x" close button on the top right hand corner of a form? If you can't, is there a way to disable it?
Looks like a dumb question, but I tried the following (where "Me" is a MDIParent form):
Dim frmNotif As New frmNotifica
With frmNotif
.MdiParent = Me
[Code].....
you know how you can set the windows taskbar to appear and disappear when the position of the mouse is all the way at the bottom? i want to do the same thing with my form when the mouse is in the top left corner of screen.or perhaps you can suggest to me a different way to do this. the user will probably just need to set those trackbars just several times during their usage.
View 1 Replieshow to put image in right lower corner of form as a background?
View 7 RepliesI have seen this happen before but am not sure how I resolved it in the past. On runtime the controls of my form change from the windows 7/vista format to an older version format as shown in the attached image.
How to display the controls in the format on the left (new windows format)
How can I position a form at the bottom right corner of the screen when the form load?
I use visual basic 2010 express
here;
Dim x As Integer
Dim y As Integer
x = Screen.PrimaryScreen.WorkingArea.Width - 400
[Code]....
i am doing project of Order Accepting system for five star hotels.Scenario is Waiter will accept order using Window Mobile which is Connected to WiFi present in hotel.I want to communicate to database(Sql Server) present on My Machine (Computer present in kitchen) through WiFi and Add order into table present inside database. This should notify my application present on Compter and should print order. After completion of Order Application from kitchen will notify to waiter about completion. My problem is How to Communicate with database present on Remote computer using WiFi from windows Mobile.
View 2 RepliesI created my user control for email validation in windows application(C# language).I am using it in the form, if the user leave that textbox it ll show message "E-Mail expected",if its correct value, then it ll be stored in another textbox. How can i retrieve values from the user control into textbox.
View 4 RepliesHow can I get x and y coordinates of a control's location on a form relative to the Screens Top Left corner?
For example, if I have 3 labels on a form and I want label2 and label3 to display the x and y of label1 relative to the screens top and left corner.
When running the app, as the form's possition is changed label 2 and 3 update the coordinate of Label1's possition relative to the top left of the screen.
Im trying to make a form popup on the bottom right hand corner of my screen to display a message when the application opens.I know i can set the location in the properties but that may vary depending on the monitor the application is displayed on, how can i code it so that it can detect were the bottom right hand corner of any screen is ?
View 3 RepliesFinal step in my application. I finally got all the requirements working, but now I need to have the application run in the background.
The application was written in Visual Studio 2010 VB, Win form app.
The requirements are as follows:
1.) run the application at start up
2.) no icon
3.) always in focas
4.) always runs in the background.
Here's the full code I have right now (working! whahoooo)
Public Class Form1
Private Property count As Integer
Private s As New Stopwatch
[CODE]...
How do you cache user session in a windows forms application? So that the user session expires when inactive for a certain period of time. I wish to include that functionality using an integrated security and caching application block from microsoft's patterns and practices.
View 2 RepliesI am looking for ways to implement custom user-roles in windows application with vb.net. I got a database table called Roles with Administrator and User entries. User cannot see some of the form data. In ASP.NET MVC we can do like.
[Authorize(Roles = "Administrator")]
public function GetAccount() as Array
End Function
I have an intranet asp.net application and when a page is loaded, i want to log the IP Address, Computer Name and the Windows Account(from active directory) currently logged into the computer from which the page is being accessed.
So far, Im able to get the IP address and computer name but the windows account, am getting NT AUTHORITYSYSTEM