Interface And Graphics :: Accessing Controls Using Multiple Forms?

Aug 28, 2008

I don't know the best way to use multiple forms in VB, but I have created a problem and I'm not sure where it came from or how to fix it.

Background: I start the program at Sub Main. This is the main function:

Code:
Module modFunctions
Dim frmD As frmDAQ
Dim frmT As frmTrendView

[Code].....

it works, but I don't want to have to change the entire project.

View 1 Replies


ADVERTISEMENT

Interface And Graphics :: Dragable Tool Controls / Forms?

Dec 7, 2010

I'm trying to figure out how to make dragable controls like the ones in paint.net. see the attachment. they look like forms kind of because they have the red x at the top like a form does, but it kind of looks like a custom control too. Is it possible to make these types of controls in VB.Net 2008.

View 2 Replies

Interface And Graphics :: Optimizing Forms / Controls Background Images

Aug 1, 2008

I'm developing a VB.Net 2008 application which uses background images (in jpg format) in some forms and controls, but this makes the application to use a lot of ram. My question is how to make it to use the less possible.

View 3 Replies

VS 2005 Accessing The Controls Of Multiple Data Window(mdw) Forms

Oct 21, 2009

I have to make some automatization on a web server, I use Visual Studio 2005 Visual Basic Windows Console Application. I want to make a load/performance test of the web server, so I open several Internet Explorer instances, and I login the application, that is not a problem. But after that I have a mess on the page and I cannot make any more automatization...The composition of the page after the login is like this: I have the default form, another form and a multiple data window(mdw) controller, which dinamically can switches the forms on this part.

The problem is that I don't know how to access the controls of this mdw forms. I couldn't find much about this mdw controller and I am not an expert.

My code is here:

Imports System
Imports System.Diagnostics
Imports System.Web.Ui.Webcontrols

[Code].....

View 5 Replies

Interface And Graphics :: Sharing Violation While Accessing Bmp File

Mar 11, 2009

I was writing a small test to verify loading and editing a bmp file with a process and MS Paint. If I load the file image into a picturebox before I run the process MS Paint reports a Sharing violation on the file during save. If I Leave the Picturebox empty MS paint allows the file to be saved.

Below is my snippet. I assumed setting the picturebox image to something else would fix the problem. I does not. Looks like something is still holding its finger on the file.

Code:
Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Remark the line below out and there is no violation.
PictureBox1.Image = Image.FromFile("C:Tom.bmp")
End Sub

[CODE]...

View 1 Replies

Accessing The Click Event In Layered Controls Or When Multiple Controls Are Docked Within Each Other?

May 22, 2009

I wanted to know if anyone could tell me how to access the Click_event.I have a boarderles form with a panel control which has the Dock property set to fill and on the panel I have placed a Label also with the Dock property set to fill. I also have a timer running.How can I get code to execute in the Label1 click event.I've tried doing it by using the generic Click_event and also with two variations of the Click_event Handles parameters

'Alternativ 1:
Private Sub Form1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click

[code].....

View 16 Replies

Interface And Graphics :: Controls Not Displaying

Dec 31, 2009

I have inserted a form into my project that a friend sent over. The form works but if I add more controls to it they are not displaying.

The controls are all there in the <form>.designer.vb file but are simply not displaying when I run the form.

I have looked around the net but can find no reference to a similiar problem.

View 1 Replies

Interface And Graphics :: Anchors In Custom Controls?

Oct 21, 2008

I'm having some problems with custom controls and anchors today. I made a custom control containing a picture box and a vertical scroll bar. When I adjust the form the custom control outer area (the blank part) will adjust to the size of the form but the picture box and scroll bar do not. I have the picture box anchored to all sides and the vertical scroll bar anchored to the right side. They just will not adjust with the control when it is resized on the form.

View 4 Replies

Interface And Graphics :: Auto-Resizing Of Controls?

Sep 17, 2009

I have a project running in my old computer. It has panels,textboxes,labels etc. It occupies the full screen when running.I bought a new computer with a widescreen format. When I run this project it only occupies 2/3 of the screen.

What properties of the controls must I use so that I can run this program in any size computer and still occupy the full screen i.e the size is proportionately resized depending on screen size.

View 3 Replies

Interface And Graphics :: Rubberband Drawing Using Controls?

Jul 17, 2008

Im using VB 2005 express edition. Im trying to draw rubber band lines and rectangles using controls like buttons in one form. My problem is, i did the rubberband lines and rectangles on diff forms.Here's the snippet code for rubberband rectangle:

Code:
Private Sub MyDrawReversibleRectangle(ByVal p1 As Point, ByVal p2 As Point, ByVal dashed As Boolean)

[code].....

View 14 Replies

Interface And Graphics :: Controls In Usercontrols Losing Properties?

Feb 5, 2010

The project I'm working on (the same one I'm always asking about) has tabs as the main navigation. I've made some User Controls to sit above the tabs in an attempt to reduce the number of overall controls that are being used (to great success). Now, however, there's one control that overlaps some controls on a tab that are obscured by my newest UControl and I want to make the background transparent.I've seen that AtmaWeapon keeps pointing people to this page detailing how to make the background transparent. That's great and it worked for me. All I did was create the

Code:Protected Overrides ReadOnly Property CreateParams() AsSystem.Windows.Forms.CreateParamsand it worked the way I wanted. Yay. I did write the rest of it too as well as part from a post I saw on the msdn forums, but they weren't needed to get the effect I wanted.However, I've got a number of PictureBoxes on this UControl that should have a BorderStyle of "Fixed3D". However, when this UControl is repainted the borderstyle doesn't reflect this (Note to self: don't .Refresh() a control inside its own .Paint() event ). This doesn't happen the FIRST time they become visible, but only when they've shown up and are made to redraw (like toggling visibility). If the border changes programmatically they look fine

View 1 Replies

Interface And Graphics :: How To Set Alignments Of Form Controls Dynamically

Sep 26, 2010

I have a form containing two panels. In both panels there are two labels and textboxes. I set the 'Center In Form' property of the labels and textboxes to 'Horizontally' and 'Vertically' in design time respectively. But as the form is resizable, when the size of the form is increased or decreased at runtime the controls are no longer center aligned in the panels. How can I handle this problem (provided th

View 3 Replies

Interface And Graphics :: Restrict A Controls Text Area?

Apr 8, 2009

If I have a control, in this case a button, can I restrict the area it considers valid for text?

In the attached image, the left and right arrows are custom drawn in the paint even, I also have a scroll timer that scrolls the text if the length exceeds the buttons width as measured by Graphics.MeasureString.

I want to restrict the text from red line to red line so when the text scrolls it does not interfere with the arrow indicators, can the text area be overridden to some custom region?

View 4 Replies

Interface And Graphics :: Drawing Dynamic Connection Between Two Listview Controls?

Jul 4, 2010

I am need to drag drop listboxes with connection line in vb.net. If the listbox move then connection line should also move. I have attached picture as wel

View 1 Replies

Interface And Graphics :: Place Controls In ASP.Net Table For Formatting Purposes?

Aug 5, 2010

I am using Visual Web Developer 2008 Express and making a Webform. I want to arrange my labels and drop down listboxes in a table to keep them together on the form in a neatly manner. If I use the 'ToolBox' on the side and drag a HTML table to the workspace I get a nicely formatted table with 3 rows and 3 columns. And I can drag and drop my labels/listboxes into these columns and all is fine and good.

If I use the 'ToolBox' and drag a ASP.Net table to the workspace it starts as just a boarder with '###' inside of it, which I cannot drap and drop controls into. I'm not sure how to place controls into it. I figured out that you can add the Rows - then Columns in the properties window, but that just adds more cells which have the '###' in them. I can make it work with the HTML table, but I just want to know if I can do the same with the ASP.net table.

View 1 Replies

Interface And Graphics :: Repositioning The Controls In Panel2 Regardless Of Which Form Is Loaded?

Aug 15, 2011

I have a Main form that has a split container in it. In Panel1 there is a treeview control. Panel2 is initally blank when Main loads. Upon clicking on one of the nodes in the treeview a form will load in panel2 and adjust the location of the controls based on the size of panel2. The controls are all in a panel themselves so that I am only moving a single object.

Moving the controls when the form in panel2 initially loads works great. But if the size of the Main for changes then the only way to get the controls to reposition is to click on the treeview and reload the form in panel 2.Code for the tree.

Code:
Private Sub TreeView1_NodeMouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeNodeMouseClickEventArgs) Handles TreeView1.NodeMouseClick
Me.SplitContainer1.Panel2.Controls.Clear()

[code]....

I tried to with code in the panel2_resize bit i got an error as soon as I clicked on the treeview as i did not know which form was currently loaded. What would be a method to accomplish repositioning the controls in panel2 regardless of which form is loaded?

View 3 Replies

Interface And Graphics :: Dock Or Anchor Controls So That They Resize Themselves Accordingly When Form Is Resized

Feb 12, 2011

we all know how to dock or anchor controls so that they resize themselves accordingly when a form is resized. It works fine till we have rows of controls on left and right size of the form. But what if have three columns (Columns as in visual sense. I'm not talking about any column control containing other controls) of controls? For example a form having a bunch of controls in the left side, a bunch in the middle and a bunch in the right. There may be a few more bunches in the middle. Now while resizing the form, I want the controls to resize accordingly as well as change their positions to make space for the previous bunch of controls that are resizing.I mean, while the user increases the form size horizontally, the controls of the second bunch should resize and at the same time they should move right because the controls of the first bunch are increasing horizontally too. When the user decreases the form size horizontally the same thing should occur in the reverse order.I can manage it somehow using nested splitcontainers but that's too cumbersome. I would like to know if there's some better way to achieve it, like setting some property etc.?

View 3 Replies

Interface And Graphics :: Getting Multiple Monitor Screenshot?

Feb 12, 2009

I'm working on a small app that takes a series of screenshots to analyze a graph. The problem I'm having is that, on my 3-monitor setup, the screenshot works fine on the primary monitor, but when I drag my app to either of the other monitors, the screenshot is black. I've also tried taking screenshots of the other monitors while the app is in the primary monitor by feeding the coordinates into the CopyFromScreen call directly, and that works, but as soon as I drag my app to one of the other monitors, all my screenshots are black. Also, and I'm pretty sure this will be important later, my primary monitor is attached to the on-board video, whereas the other two are attached to a separate video card. Both the on-board and installed cards are ATI Radeons.

Here's the screenshot code I'm using:

Code:

Namespace ScreenShot
'/ Provides functions to capture the screen, in whole or part
Public Class ScreenCapture

[code]....

View 2 Replies

Interface And Graphics :: Multiple Images To One Gif Animation?

Nov 16, 2010

I have multiple bitmaps(i) in arrays, and I want to know if I can save each of these bitmaps into on animated gif file. I thought about using image.saveadd() but i'm not sure if that will work.

View 2 Replies

Interface And Graphics :: TabControl And Multiple DataGridviews?

Apr 8, 2011

I have a strange problem; on my form there is a TabControl, and every tab contains a DataGridView.I set all DataGridViews Autosize column property to DataGridViewAutoSizeColumnsMode.Fill and then I set for every column the width with FillWeight, using the same set of values for every DataGridView.Although all these DataGridViews should look the same, the one on the first TAB looks different, it looks like I used different FillWeight values.All others DataGridViews on subsequent tabs looks the same, only the one on the first tab looks different..

View 2 Replies

Interface And Graphics :: Working With Multiple Combobox?

Oct 4, 2009

How to work with multiple combobox. I have several combobox. I it to have same itemlist and set a default value for this.I used to do:

Code:
Dim MyItemToBox(3) as System.Object
For i as integer = 0 to 3
MyItemToBox(i) = "A" & i
Next

[code].....

View 1 Replies

Upgrading Software Written In VB To Include More Graphics/controls/indicator For User Interface?

Feb 18, 2011

I have been given a project to update software written in Visual Basic. The software and some files are enclosed in a folder and was written 3 years ago. I have no clue what to do. All I have been asked to include more controls. The user interface allows user to select three processes by clicking on the buttons on user interface. The new requirements is to add two more buttons. There is not much information so I have to use only the resources available. When I tried to open the project, visual studio prompted to convert the project so its compatible with current version. I could open the project but dont know what to do from there. Please guide me towards the right direction. If the project folder is required please advise me how to attach it too.

View 2 Replies

Accessing Controls Between Forms?

Sep 4, 2010

I have a thread running on a child form, I want to activate a control on the parent form but cannot. It works fine if It's done from the child forms UI thread:

(FormMain.SetControlPropertyValue(FormMain.RBSQL2005, "Checked", True))

but not from a thread running on the child form:

Public Class FormRestoreDB
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim t = New Thread(AddressOf UpdateListView1)

[code]....

View 2 Replies

Interface And Graphics :: ComboBox With Multiple Images Per Line?

Feb 16, 2009

insert images in a combobox. I understood the code, but what I'm asking is how do I add multiple images per line of the combobox?? I mean the way, the smileys are displayed in dropdown grid in Yahoo! messenger or the sort when you click on the smiley button..

I'm using Microsoft Visual Basic 2008 Express Edition with .NET Framework 3.5

View 1 Replies

Accessing Multiple Form Controls Using A Variable For The Name?

May 23, 2012

I'm trying to iterate through a group of ComboBoxes and set a property using a concatenated string & variable to represent the name of the control. However, I can't get the instance of the form to recognize the (String & Integer_Variable) as one of its controls -- and so it doesn't recognize any of the appropriate properties or subroutines as members of the System.Windows.Forms.Control.Is there a cleaner way to do this?

For myTempCount = 1 To 6
If tempValue < Me.("ComboBox" & myTempCount).Items.Count Then
ComboBox.SelectedIndex = tempValue 'appears to work -- how?[code].....

This code was originally VBA / VB6, which I put through ArtinSoft's Visual Basic Upgrade Companion (VBUC). FWIW, I'm using Microsoft Visual Basic 2010 Express.

View 3 Replies

Interface And Graphics :: Displaying Forms In Another Form?

Nov 17, 2011

I'm looking for a tool that will allow me to display, and change forms, inside my original form.

View 5 Replies

Interface And Graphics :: Navigating Between Forms In A Mdi Application?

Mar 26, 2011

I have a mdi application that will populate a SQL database. I want to navigate between forms using [Next] and [Prev] buttons for data entry.

I have sorted out the navigating to a form using the [Next] button but am struggling with the previous button.

I have attached sample of code from mdiparent and child form 1.

Code:
'####mdi parent code####
Public Property m_ChildFormNumber As Integer
Private Sub ShowNewForm(ByVal sender As Object, ByVal e As EventArgs) Handles

[Code].....

View 1 Replies

Interface And Graphics - Displaying Child-forms In A MDI-application

Jan 23, 2010

I'm having a small problem concerning displaying maximized child-forms in a MDI-application. Everything works fine on Win. Vista but when I start the program on a PC with Win. XP it doesn't look very nice. I found some similar threads on the internet but no answers. Does anyone know how to display maximized windows in MDI properly? [Code] On Vista the child-form switch/appear really smoothly. On XP you can see as they are being maximized.

View 7 Replies

Interface And Graphics :: Creating An Application With Mlutiple Forms

Mar 18, 2009

I am creating an application with mlutiple forms. When you click on a button in the main menu, the main menu will close and the new window will be diplayed. When you hit back on the new window, the main menu will be displayed.I know how to show new forms by using Form1.Show(). When I try to return to the main menu by hitting a back button I created, the main menu does not show up, but the program continues running. In the first form, I have the code: [code] Also, am I creating the new forms the right way for an application the will have maybe 15 forms?

View 2 Replies

Interface And Graphics :: Form That Hides When Open Other Forms From It

Aug 22, 2008

I have a main form that hides when i open other forms from it. On the child forms i have a menu strip with file:exit and help:about. When i click on file:exit the form closes and the main form opens. using the following:

[CODE]........................

That all works fine. What ineed is to get the same results when a user clicks on the x in the top right corner.

View 1 Replies







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