Setting Form Window Location?

Apr 19, 2009

I'm having trouble setting a form's location in the load event.

config_set = File.ReadDatabaseKey(Public_Variables.settings_radar, _
"Window Position X", Public_Variables.config, Public_Variables.config_path, 5)
If Misc.GetContainsOnlyNumbers(config_set) Then
Me.Location.X = CInt(config_set)
End If

View 4 Replies


ADVERTISEMENT

Setting The Location Of A Second Form?

Aug 4, 2009

I have a second form that loads when the main form loads. It sits behind the main form, is mainly transparent and does not allow interaction from the User.

Its as if the form is on the desktop, which is what I'm going for.

I set the location of the form to be in the top right hand corner of the desktop. On my PC, which is a 23" monitor, it works and looks great. But when I use my application on a notebook or a smaller screen, the form gets cut off. Why is obvious, because of the screen size differences.

What I want to know is how I might set the form to a more... definitive position. Rather, relative to the size of the screen.

I haven't searched much yet, but maybe there is a way to set the location of the form to a specific location of the desktop, not relative to the size of the screen.

View 4 Replies

VS 2010 Setting The Form Location?

Apr 1, 2011

In my Windows application I have 2 forms, Form1 & Form2 in Form1 there is a Button so now I want to place the form2 exactly bottom of the Button when I click.

View 3 Replies

Setting Form Location Property Within Program?

Feb 9, 2010

I have a single form that I would like to move across the screen with my VB program. Of course it's simple to set the location X and Y property for compile time using the properties tab, but I want the form to move as the program runschanging the coordinates within a for-next loop.I can easily get the X and Y coordinates of the form within my program by using X = me.location where X has been dimmed as type point.console.writeline(X) will appear as {X=20, Y=40}. for example

View 2 Replies

Setting Form's Screen Location Not Working?

Jan 27, 2010

I'm working on a vb 2010 project where I am playing mpeg movies using the Media Player control.The computer has dual heads (extending windows desktop to other display). My aim is to be able to selectwhich screen to show the video on. I have two forms, the first form (frmControl) has two buttons, Play and Stop.The second form (Player) has the embedded Media Player. Initial tests worked fine (not choosing a screen, but making the player fullscreen and playing a movie). When I add the following code to allow choosing the screen

View 4 Replies

[2008] Setting Picturebox Location On Form?

Feb 14, 2009

i need a picturebox to, when an event has happened to either revert back to its original place.or set a location for it to go after the event has taken place.ive tried lots of different code but its not working?

View 3 Replies

Generic Form Location - Display Setting Resolution

Feb 24, 2009

I have two forms. These are a widgets that I made in VB .Net language. But I have a problem, what if the the display setting resolution is change to 800X600, 1024X768, 1280X800 and so fort? How can I maintain the location of my forms? My screen resolution that I'm is 1280X800. I locate the first widget in x.1000, y.20 and the other one is in x.1009, y.325. How can I make this location a generic location for my widgets?

View 5 Replies

Setting Form Bounding Location Property To Entry

Feb 25, 2011

VS 2008, vb.net, Win7 development machine. I've developed a Windows application with several different forms, and am using the My.Settings feature. This is the first time that I have used this feature. For each form, I have set the form's property binding 'location' property to an entry in 'settings' of My Project settings page of the VS 2008 development environment. The settings are set to user scope.

1.) Do I need to add any code to my application to make the settings work, or is it sufficient that I have the "Save My.Settings on shutdown" set to true?
2.) When I create my setup to install the application, what settings file (app.config?) do I install to the user's machine, and what folder should it be installed to?

View 11 Replies

VS 2008 - Setting Location And Making Form Unmovable

Oct 28, 2011

How would I make my form unmovable so you cannot drag it to move it? I also need to know how to make it always start in the same exact spot. I don't know why but it changes spots even thought the location is set: 0,0

View 3 Replies

IE Window - Size The Window, But Not Change The Windows Location On The Screen?

Jun 21, 2011

im using vb.net to open IE and go to a website... i can figure out how to size the window, but not change the windows location on the screen... how can i make the IE window position always 0,0

Dim oIE As Object
Dim hWnd As Long
oIE = CreateObject("InternetExplorer.Application")[code].....

View 3 Replies

Get Size And Location Of Top Window Foreground Window?

Aug 14, 2009

I want to take a snapshot of the foreground window without using print screen key. So far the only think i can do with the foreground window is get its title but If i can get the size and location then I can get cordinates on where to set capture with graphics.copyfromscreen.

View 3 Replies

Setting Location Of ListView?

Sep 14, 2011

I'm working on the Inventory section of the project I'm working on. This particular form holds a tab control, by default it has 2 tabs one named General, and the other named "New..". When the user clicks the New tab an input box opens to collect the name for the new Department, it then changes the name of the current "New.." tab, and then adds another tab and names it "New..". This process continues until they reach their limit of departments. The problem is that when the tab gets renamed, a listview control needs to be added into the tab. Adding the new control is simple, but setting it's position as the one in the previous tab has seemed to elude me. This is what I've tried.

Private Sub TabControl1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.Click
Dim SD As TabPage
SD = TabControl1.SelectedTab

[code]....

View 3 Replies

WebBrowser - Setting Special Location For Cookies

Feb 5, 2012

I have a simple exe that loads a page from my site in a webbrowser where users need to enter login details to get on a secure page. Now everything works ok, except I have to use php for this and yeah cookies. So, I want to know if it's possible to set a special location for the cookies, since as some members report, they clean the cookies daily and this makes my exe "forget" that they are logged in. Any way to store cookies on same location with the exe so it won't get deleted by 3rd party tools like ccleaner or so.

View 8 Replies

.net - Excel Interop Moving / Setting Image Location

Aug 8, 2011

We're exporting a set of data using .net interop to Excel and our template file contains some images. Depending on the amount of columns we're exporting we want to position the image X pixels left of the last column depending on the image size/width. Using the record a macro function moving the Image around is a 'no op'. Setting the Shape.Left position also won't work.

[Code]...

View 2 Replies

VS 2008 Setting The Installation Location Of A Published Application?

Jan 11, 2011

I have published a vb.net application and installed it on my PC. When I try to locate the installed application, I dont find the location where its been installed.

How to install a publish application on a specified location in C:Program FilesProject?

View 8 Replies

VS 2010 - Setting Default Location To Computer For Loading Photo

Dec 9, 2011

Just started using the Windows Browser in one of my forms so the user can select a photo they need to load. This was surprisingly easy (This seems to be the norm in Basic, if you think it will be hard it isn't and visa versa). What I am struggling with is how to set the default location to 'Computer' rather than a disk letter and directory name. The photo is most likely to be on a card reader or Memory stick so the drive letter is likely to change.

I am guessing the command will be:
OpenFileDialog1.InitialDirectory = ???????

View 4 Replies

Location Of DOS Window Relative To Form1?

Mar 31, 2010

I am calling a program that runs in DOS screen.Is it possible to position this screen to always open exactly same cordinates relative to my FORM1 screen?Or is it possible to run the FORM1 to start at same screen cordinates all the time?

The Code:

Sub Install1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Install1.Click
instance = Process.Start(Application.StartupPath & "Driver.exe")
instance.WaitForExit()
End Sub

View 7 Replies

VS 2008 : Set Location Of Window On Runtime?

Jan 30, 2012

I have 2 forms. I am calling form2 from a button click in form1. I want through the button click to set the location of form2 by setting X,Y cordinates. I have tried this but nothing happens:

form2.Location = New System.Drawing.Point(100, 15)
form2.Show()

View 8 Replies

VS 2008 Set Location Of Window On Runtime?

Aug 24, 2009

I have 2 forms. I am calling form2 from a button click in form1. I want through the button click to set the location of form2 by setting X,Y cordinates. I have tried this but nothing happens:

form2.Location = New System.Drawing.Point(100, 15)form2.Show()

View 2 Replies

WPF - Window Location Animation On Button Click

Nov 5, 2011

I'm trying to animate my window's location. I have a window, and when I click on my button, I want the window to move smoothly 100px from it's current location.

Example:
Private Sub minimize_button_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles minimize_button.Click
Dim windowsize as integer = window1.top
windowsize = windowsize - 100
End Sub
But with XAML animation. I have no idea how to make this animation in this type of scenario.

View 1 Replies

Setting An Application As An Active Window?

Apr 13, 2009

I've tried everything to set my window as active after I've been working on another external App... I have my system on auto and need to send some keystrokes to the program using sendkeys, so I need that app active. I've tried almost everything I can think of, bringtofront, setfocus, windowstate, setactivewindow, setforegroundwindow (For the last 2, hwnd doesnt work - I'm using VB 2008 Express) but none of them seem to be working.

View 4 Replies

VS 2010 : Setting An Active Window?

Feb 6, 2012

How would I go about setting an active window? I've researched and I can use "SetForeGroundWindow". I have tried, but I still can't get it to work.

View 9 Replies

VS 2010 Getting The Window Layout Setting?

Apr 20, 2010

The Window Layout setting seems to have gone away in VS 2010. I'd rather my environment default to Multiple Documents. I really can't stand Tabbed. Tabs are good for browsers and cell phones, but not so good for a programming IDE.

View 2 Replies

Check File Location In Window Mobile 6 Professional?

Dec 26, 2011

i face check txt file location problem in window mobile 6 professional.code testing for window form

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim FILE_NAME As String = "c:UsersChee KangDesktopNew folder (2) estFile.txt"
If System.IO.File.Exists(FILE_NAME) = True Then

[code]....

coding above show me the correct answer :File already Exist (i pasted the file there before i start my program)but when i apply the same thing in window mobile 6 professional, it give me the wrong answer "File Does Not Exist" although i pasted the file there before i start my program.

View 2 Replies

Restoring A Window's Previous Location / State, It Draws Twice?

Jul 7, 2009

recommend the cleanest way to save / restore a winform's location and state? For some time now I've been using a method similiar to what I posted below (based on the CodeProject: [URL]..The problem with this method is that when the form loads, it is drawn in an initial location, then moved / maximized afterwards. The effect creates somewhat of an eye sore watching the window draw, then quickly update... but in Vista it is a lot more obvious.

What I would like to do is restore a form to it's previously saved location / state invisible to the user, then show it once it's where it needs to be. Or, just know of the ideal way this is supposed to be done - specifically in Vista.

[Code]...

View 4 Replies

Setting MDIChildren Window State To Maximize?

Jan 3, 2010

I want to maximize my mdi child automatically by setting WindowState to Maximize. But it looks like this.. why is this happening? but if I restore it and maximize it again its body now occupies the mdiparent space. To aim is not enough. You must hit.

View 2 Replies

Add Path To Location in window Program With Pictures Used In HTML Document?

Jul 14, 2009

I use VS 2008 Visual Basic and I added windows forms HelpProvider to supply user with more information using F1 button when a windows form is active.No VB coding are used, just help provider and HTML docs. with css.I have created a HTML document and a picture. On both items I have set the [copy to output directory] property to Copy Always.The HTML document starts HTML page and IE is showing the text as expected , but the picture does not appear.I use click once deployment to deliver the system. The HTML documents and picture is located on the user computer after the deployment. How do I add path to a location in a win program with pictures used in a HTML document? What is the correct setting of [ build action ] parameter of these items?

View 5 Replies

.net 1.1 - Start-up Window Changes Based On App.config Setting - Changing ?

Feb 24, 2009

I have this VB.Net 1.1 project that I have to make some changes to. There is a flag in the App.config file. If it is false, the page just loads a splash screen and runs the program normally. If it is true it first opens a login window. VB.Net is not something I've ever worked with before. I can't for the life of me figure out where the logic for the picking the startup object is. In the property pages, Main.vb is always set as the startup object, but that's not even the window that loads up when the flag is false, it always comes after the splash screen.

View 2 Replies

Setting Visibility Property Of Main Window To Hidden?

Jan 8, 2012

I have set the Visibility property of the main window to Hidden and added the following in Window_Loaded:
private void Window_Loaded(object sender, RoutedEventArgs e){
this.Visibility = System.Windows.Visibility.Visible;
}
But it doesn't show up the Window.

View 1 Replies

Control The Starting Location Where On The Desktop Those Four Windows Will Appear When Load (Open) The Window?

Nov 22, 2010

I have a game that will open four windows on the desktop using VBE2008.How do I control the starting location where on the desktop those four windows will appear when I Load (Open) the Window?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved