Why Doesn't The Main Window In Application Allow The User To Resize
Jun 15, 2009Why doesn't the main window in my application allow the user to resize?
View 3 RepliesWhy doesn't the main window in my application allow the user to resize?
View 3 RepliesLet's say I make an application where the window (by default) is 1280x720, but the user is able to resize as How can I make the controls inside the application, resize according to the main window?
View 2 RepliesI need to quickly demonstrate a project and decided to create a user control that is connected to an Access database through pure simple data connections (create the dataset and drag it on the control.)When I build the project and add the usercontrol to panel control on the main form, no data is shown in the datagrid.When I add the data components directly on the main form, the data is displayed properly. why I can't get my databound user control to display the data on my main form?
View 2 RepliesI had been looking for a way to move and resize an external window from my application and I came across this method: [Code] now this does not work, after looking around I many threads about how api calls in .net are different.
View 6 Repliesthe code i have that interacts with e.graphics is
'clear area
e.Graphics.FillRectangle(Brushes.Black, 0, 0, 600, 800)
'draw sand
[code]....
here are the variable areas of my two classes, along with their new functions; assume that the get lines do what you think they do.
Public Class Sand
Private x As Integer
Private y As Integer
[code]....
I'm a noobie coming from VBA. i thought i'd try my hand in VB (because this stuff is fun). I'm trying to make the main window for an application. i've created 2 forms so far. one entitled "Main" and the other "Form1". I would like for "Main" to be the main window of the application.
View 2 RepliesI have a VB.NET application that uses Managed DirectSound to capture audio.Everything works just fine until (a) the application is minimized or (b) the application is completey obstructed (covered) by another window.
The thing is that the CaptureBufferDescription structure does not include a GlobalFocus property so I don't know what to do to let my application continue capturing when the main window is hidden.
Here's the basic initialization code I'm using:
' Create a buffer description object
bufCapDesc = New CaptureBufferDescription()
With bufCapDesc
[code]....
I have create a project with one main form window and also i have to use a number of other forms as well. now i want to open these other forms inside the main window and not outside. I'm using Visual Studio .NET 2010 as developing environment.
View 1 Replieshow can I use main form like MDI parent form in window application?
View 1 Replieshow to retrieve microsoft access filenames from a particular folder on my computer? Within my project the user can create a database, and i want to be able to display all of these databases in a combo box?
View 8 RepliesI have application with 2 forms (Form1, Form2), when i click in a button in form1, form2 open.when form2 opened & I switch to other window and try to switch back to my application (By clicking in its icon in taskbar), it switch to form1.I need when form2 open & click in taskbar, it switch to form2 & also when form2 open I can't edit or type anything in form1.Exactly the same as the below scenario in windows:when I open any new window from "Windows Properties" (Right click my computer), and switch back to windows properties, it will switch to the new window not to the main Windows properties window
View 2 RepliesIs there an "official" way to only allow diagonal resize for a Form (main form)? In other words the width/height ratio should always be kept constant always, no matter how the user tries to resize it
View 2 RepliesThe form my application starts with is called Form1.
now if i have another form called form2 and call
form2.width=500
when you press a button on form1 then form2 is resized to 500
BUT if I call
form1.width=500
from the same button Form1 is NOT resized why is this?
My program displays nature pictures so I want to restore the original ratio on wide screens when the form is first normalised. In the form resize event (inside a flagged section to avoid looping) I have
[Code]...
For some reason the resize event is only triggered once and only the width gets set. If I change the order only the height gets set. how to make it change both?Actually I wouldn't ever need to change both if not for a small but annoying little problem on normalising. Rather than fit the available screen height it always seems to be a bit more, as if the top border height is added to the existing max height. This seems to be a .NET bug.
I am working on my application as I am trying to resize the panel when I resizing the winform application. Do any of you know how do I resize my panel when resizing the main form in a winform application?
View 1 RepliesHow to capture when a user switched application windows. Basically what i want to do is for example is when EVER a user works inside Microsoft Word i want the CAP lock to be turned on. When they leave Microsoft word's app window and select a new app the CAPS button would turn off. Then when they return back to Word caps turns back on. I have code I found in another post on how to turn CAPS on, now i just don't now how to automatically capture application switches running all the time. My idea is to create a small app that can be minimized to the system tray then let it run and capture all thE app changes.
View 5 RepliesI am using VB in VS 2008. I have written a program which loads data into SQL Server nightly. It is a Windows Forms application which runs well from Task Scheduler when a user is logged in. However when I try to run it when there is no user logged in, the program starts but it just sits idle.
[Code]...
I know how to add an exit button with a prompt. However, I do not have the slightest cluse as to how I can add this same functionality to the window so that if the user clicks the X in the upper right corner, there is a prompt message confirming the user needs to exit.I added a form closing event but getting wrong results, the form closes if I click no and message window does not leave when I click yes to stay.
Code:
Private Sub frmTest_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
If (MessageBox.Show("Are you sure you want to exit?", "Close Form", _
MessageBoxButtons.YesNo, MessageBoxIcon.Question) = _
[code]....
I have a form positioned slightly above the taskbar/system tray in the bottom right corner of my desktop window.It's sort of like a pop-up notification.The notification itself looks great,but there's a button on it which resizes the form up, animating the sizing in increments of 5px whilst keeping it's position relative to the bottom-right corner of the screen.
The problem with this is that it doesn't look very smooth. Adjusting Me.Width resizes from the left so you have to then move the form to the left with Me.Left to compensate. Me. SetBounds just seems to be a wrapper for setting those properties anyway.Is there anything I can do to have the form smoothly (or at least appear to) resize outwards from the left of the form?
So I have been using MoveWindow to resize a hwnd:
[code]...
The problem is that this doesn't work on different computers. If I want to mouseclick at coordinate 55,55 on my own computer, it will actually click there. However, if I mouseclick at coordinate 55,55 on my girlfriend's computer, it will click at a different position. It will be near 55,55, but it won't be the same as on my computer.What can I use to resize a window that will work on both my PC and hers?
if you guys have used office 2003 or better( i am sure all) then you would have seen that when the help window open it causes the active windows say of MS WORD to change accordingly so that this help windows fits with it along the right side and this functionality i want to implement in my VB windows application and have no idea how to do it Also i have seen this feature in GOOGLE DESKTOP GADGETS...
i want to implement that when my application opens which ever is the active window( of any application) snaps to the left and allows my application to fir in the right hand side i am developing my application in VS 2005 using Visual Basic.
I have been trying to solve this for 2 days now, every text book I own and google have been well and truely exhausted and I am still no closer to solving my problems.I have a login facility reading in user info from a main user file. This takes all info into a temp array and then splits usernames into a username file, passwords into a password file and a current score in a score file.
I have the login working fine and everything else in my program works as intended but touching up cosmetic aspects I want to add a Message box after login to say hello and display current score. This works great for the first name in the user file i.e - after login User1 welcome to the game. Your current score is 45 As intended.But the problem arises with any other users, my message comes out as
User2 welcome to the game. Your current score is 55 I do not understand where the random new lines are coming from. I have tried assigning the message as a variable and removing new line using
[Code]...
I have an MDI form as the app start object.I don't think is related, but in the Form closing event, I check for some condition, and if it's true, I ask for confirmation before closing:
Private Sub FormBackground_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
If (e.CloseReason = CloseReason.UserClosing) Then[code].....
So long, everything works fine in my development machine, which runs windows XP.However, when deploying the application in a windows 7 machine, the message box works correctly, showing itself whenever it should, but after the form is closed the application keeps running in the background. This happens whether the form closes directly or asks the user first.I have fixed it putting an End instruction in the FormBackground.FormClosed event, but it doesn't feel good.
How to resize minwindow in outside process
View 4 RepliesHow can I resize a window? I've done it by using GetProcessName and MoveWindow, but with MoveWindow it doesn't work on different operating systems/computers. what would be an alternative?
View 3 RepliesHow would I re-size the window @ a point relative to its parent location and size. I am using code from Make an unowned window's parent to my form, to be able to set a windows parent to panel1.
Dim proc As Process
' Start the process
proc = Process.Start("C:UsersDmitryAppDataRoamingSpotifyspotify.exe")
proc.WaitForInputIdle()
Dim tmp_hWnd As IntPtr
[Code] .....
This works on most windows except for ones that are customized. Maximizing the window will maximize the window to bounds of the actual screen bounds instead of the panel1 bounds. Code works fine with normal windows but not with this one. (Spotify Window.)
SendMessage(proc.MainWindowHandle, 274, 61488, 0)
I am writing a program that is navigated manly by using tabs, the tab panels (If that is what they are called) hold the vast majority of the GUI, only leaving space for the menue bar and a few rarely used window forms. So my question is this, what do I need to do/set to make the tab control (Or tab Panels) re-size with the window it is in when the user re-sizes the window?
View 5 RepliesI have an application that while running (it doesn't have to have focus, it can be minimized or another window can have focus) can listen and respond to global hot keys pressed. For instance I have the key combo Ctrl+Shift+0. When this hot key is pressed my app can recognize this and then I can do something.
This "something" that I want to do is:
1. Know what window is currently active and has focus when the hot key was pressed. And...
2. Change the size of said window
I can currently identify what window has focus by the following (the code block is inside the function that fires when the hot key is pressed):
Code:
Private Declare Function GetForegroundWindow Lib "user32.dll" () As IntPtr
Private Declare Function GetWindowThreadProcessId Lib "user32.dll" (ByValhwnd As IntPtr, ByRef lpdwProcessID As Integer) As Integer
[Code]....
I can get the handle to the active window and the process that owns that window.
Having this information, how can I get access to the window itself? Furthermore, get access to it's properties so I can change the size of this thing? I'm not sure If this is the right information to be gathering for what I'm trying to accomplish but it seems that I'm close.
I have a form which has no window borders, but I still want to be able to resize the window? How might i achieve this? Even just a few options, like 'small' 'medium' and 'large' size would be fine if it cant be normally resized.
View 5 RepliesI have a simple WPF vb.net application and wish to set the visibility property of some buttons on the main window to True when user successfully logs on
I have a MainWindow window with a frame hosting any number of pages and use the navigation service to load into this frame eg. Me.BodyFrame.Navigate(New System.Uri("Logon.xaml", UriKind.Relative)) One Page (logon) enables user to logon.
vb.net code:
Dim txtLocalLogonID = txtLogonID.Text
Dim pwdLocalPassword = pwdPassword.Password
Dim LocalLogon As New gblLogon()
[Code]....
How do I reload the main window? I realise the code is primitive but I just want to get it working first.