VS 2008 Getting Current Container

Jun 20, 2010

I have a picturebox in a groupbox (which was generated by code). The click value of the picturebox has been assigned a click event. AddHandler pctIcon.Click, AddressOf FooClick Inside the groupbox there are two labels aswell. I want to get the name of the groupbox, so I can use it in a for each loop.

[Code]....

View 2 Replies


ADVERTISEMENT

VS 2008 With A MDI Container Property?

May 7, 2010

I have a mdi container thats got 9 forms running in it.When I minimize a form it minimizes into a small "window" in the left-bottom corner of my mdi-container.

How do I change this so that the forms will minimize to the Left-TOP corner of my mdi-container?

View 1 Replies

VS 2008 : Set Locations Of Textboxes/labels According To Graphics In Container?

Mar 11, 2010

VB2008 I have a panel in which I draw some graphics. Parts of the codes which I have successfully wrote & drawn are shown below:

Dim scaleX1 As Single = CSng(Me.pic_pcg.Width / 1.355)
Dim scaleY1 As Single = Me.pic_pcg.Height / HGT
'
e.Graphics.ScaleTransform(scaleX1, scaleY1)

[code]....

I want to add some labels and textboxes in the panel so as to add remarks & captions to certain parts of the graphics.How do I set or modify the "scales ?" of the locations of these labels & textboxes so that they will be placed correctly, corresponding to the above scaletransform/translatetransform/rotatetransform.

View 3 Replies

[2008] MDI TabControl Container - TabGroups (Vertical / Horizontal)?

Jan 6, 2009

I'm trying to make an MDI TabControl Container usercontrol, which is used instead of the MdiClient control in an MDI application. Instead of MDI Forms, you can use (modified) TabControls that behave like (maximized) MDI Forms in a Tabbed environment.

A great example is of course the Visual Studio IDE. Each window is just a TabPage on a TabControl (at least it looks like it is, I don't know exactly how it works in the IDE.. but let's assume it is).Now, the VS IDE uses some great functionality which I believe is called TabGroups. By Right-clicking (or dragging it into nothingness) a TabPage 'header', you can choose New Horizontal / Vertical Tab Group, which splits the 'container' into two TabControls, each with their own TabPages, with a splitter in between so you can resize them.

I have been trying to recreate this behaviour, and I must say it works pretty well so far for very little effort. The only (major) downside is, it only works for Vertical OR Horizontal TabGroups. I have no idea how I can possibly make it work using both vertical and horizontal TabGroups simultaneously...

What I did is pretty simple: I have a mdiTabControlContainer which is just a blank UserControl. I made a public property TabControls that returns a (custom) mdiTabControlCollection (inheriting from a generic Collection(Of mdiTabControl) which is basically just a collection of my tabcontrols.

When the collection is modified, I call a RedrawTabControls method which first clears the Controls (deletes all TabControls), and then adds them one by one. First the last in the collection (docked Fill) then the rest docked Left. I also add a splitter between each TabControl. (Code at the bottom)If I dock the TabControls to "Top" for example, I can make it Horizontal. But I have no idea how I can possibly dock a few of them to Left and the other few to Top...? I would need some kind of property that determines which TabControl should be docked where, right? But how and when would I set that property?

The code I'm using now is:

vb.net
Imports System.Collections.ObjectModel
Public Class mdiTabControlContainer
Public Sub New()

[code]....

View 1 Replies

VS 2008 Floating Toolbar - Display That Container (containing Toolstrip) In Form

Mar 30, 2009

I've two forms Form1 and Form2, I want to add container(*) in form2 having toolstrip(Toolbar) and later want to display that container(containing toolstrip) in Form1, that enable the user to use toolstrip to execute needed actions written in form2.

[Code]...

View 1 Replies

VS 2008 : Making 'main Window' Form Acting As A Container For The Other Forms?

Mar 17, 2009

Am devloping an application with multiple forms, which reside on top of a main form. i.e the main application window. The 'child' forms do not need to be linked in any way as they do not pass information to the parent form, as all the parent form does is act as main window.Now I would like to know what is the correct way for the 'main window' form acting as a container for the other forms? So that all the smaller secondary forms stay focused on top of the main application form, that when the main window is minimized, so these forms should do also etc..

I have read other posts and they mention, leaving all the forms standard i.e. IsMdiContainer = False and then using form.showDialog() to call the secondary forms. This did not work for me as what happens is that as soon as I give focus to the main app form, the secondary form disappears underneath.I tired making the main app form IsMdiContainer = True and when it loads calling:

frmMemberForm.MdiParent = Me

Now this works, because I can click off the form and minimize the app etc and the frmMemberForm doesn't disappear. However if i close the MemberForm and reopen it, it looses this property and once again when it looses focus, it will disappear.

View 16 Replies

VS 2008 Adding ToolStrips To A Container During Design-time (via Collection Editor)

Oct 28, 2009

I am trying to extend the functionality of the ToolStripPanel control (which is a panel hosting ToolStrips that can be moved during design-time, as I'm sure you know).One thing I wanted to add was a 'ToolStrips' property, which would be a collection of ToolStrips the user can edit via the collection editor in the designer. So instead of manually placing ToolStrips on the ToolStripPanel via the toolbox, the user can just use the property to add/remove (or even edit) them. This is of course similar to how you add/remove/edit TabPages in a TabControl.So, I came up with this code, which I have used successfully in the past for other controls:

Public Class cToolStripPanel
Inherits ToolStripPanel
Private _ToolStrips As New ToolStripCollection(Me)[CODE]....

The cToolStripPanel control inherits the ToolStripPanel control and adds the ToolStrips property, which is of type ToolStripCollection. That class, in turn, inherits the Collection(Of ToolStrip). In the InsertItem method, I add the 'item' ToolStrip to the cToolStripPanel. Of course I also need to override the RemoveItem / ClearItems methods but that's for another time.I am 100% sure that this code should works, at least for other controls. If you replace ToolStrip with Button (for example), I can add buttons via the property during design-time just fine, exactly the way I want it.But it seems that ToolStrips are special. When I try to Add a toolstrip (via the collection editor Add button), a null reference exception occurs. I've been trying to debug this all day and I've finally come up with a possible candidate for the problem... (I've actually used design-time debugging for the first time ever, which was pretty cool, and which showed me that the InsertItem method is not run!)

I think the problem is that the collection editor cannot create a new instance of the ToolStrip class. I can remember when trying to inherit from the ToolStrip, I was forced to add a constructor, because the ToolStrip "has more than one constructor that can be called with no arguments".Perhaps this is causing my problem? Do I (and if yes, how?) have to somehow control the creation of a new instance of the ToolStrip? Or am I completely off track and that is not what is causing the problem? I'm sure that it's a problem with the ToolStrip class, since I can use the exact same method with other controls just fine. It's only when I change the type to ToolStrip that it starts getting angry at me....

View 1 Replies

Asp.net - Clicking Link To Replace Current Frameset Contained In Current Window

Dec 28, 2011

I have following link in a.aspx file:

<a href="a.htm" target="iframe">A</a>

I want to set link from a.aspx.vb page according to what person is viewing the page. How can i change this so that if user clicks on link it will replace current frameset contained in current window with a url provided according to user?

Or in another way:

How will i replace href code in aspx page by giving it value from aspx.vb page?

View 1 Replies

Get Current Enumerator (iterator) In LINQ Query / Like A Current Index In For Loops

Sep 20, 2011

Is that possible to get current Enumerator (...or iterator? Don't know which tern is the correct one) in a LINQ query ? For example, I try to create a XML output (via LINQ to XML) of all currently loaded assemblies. [code] is it possible to somehow get current "index" (counter?) from LINQ's Selects? I would like to use it in XML. [code]

View 1 Replies

VS 2008 Get Current App Name?

Oct 30, 2009

How would I get the app's name? So if I named my program "Blank.exe" the app's name would be "Blank"

View 2 Replies

Keyup Event - Get The Current Value Of The Current Row And Column

Sep 12, 2011

I have a datagridview having 3 columns (qty,scraft factor,actuall qty). What I want is if the user encode 50 in qty and 2 in scraf factor, actuall qty will automatically computed based on qty multiply by 2. I was using keyup event. Now I am using endedit to get the current value of the current row and column, now the problem is if the amount to be encoded is more than one digit it will not accept because of endedit. What event do I have to used? or any solution with this scenario.

[Code]...

View 1 Replies

.net - Getting The Current Date In VB 2008?

Feb 7, 2012

I dont know how to get the current date in visual basic 2008. Here is a sample code

regDate = Format(Date.Now(), "ddMMMyyyy")

The output is like 7/02/1900

View 1 Replies

VS 2008 - Add A ; At The End Of The Current Line?

Dec 13, 2009

I want to add a ; at the end of the current line I'm typing on by using ctrl+end or other keys.. im using a richtextbox..

View 2 Replies

VS 2008 : Get Current URL From Firefox And/or IE?

Oct 18, 2009

I have an app. that downloads a file from the web with no problems, but I was wondering if it's possible to get the current URL from Firefox and/or IE, so that the user just has to click 'ok'.

View 4 Replies

VS 2008 Get Name Of Current Module

Jun 11, 2010

What I'd like to is get the name of the current Module running in a VB app. If I am in a Form, I can use "Me.Name", but in a Module that will not work. I tried: System.Reflection.Assembly.GetExecutingAssembly().GetModules()(0).Name But that gives the name of the app (like "WindowsApplication1.exe") rather than "Module1", which is what I'd be looking for.

View 2 Replies

VS 2008 Current Song Going Through Speaker?

May 25, 2009

is it possible to retrieve the current song (mp3) that is being played through your computer's speakers? No matter which program is playing the song.. This has to be possible since when a program plays an mp3 some code has to be passed through Windows telling it to play the song SongABC.mp3 using the computer's default speakers...

View 9 Replies

VS 2008 : Get The Current Mouse Position?

Oct 2, 2009

How would I get the current mouse position?

View 2 Replies

VS 2008 : Only Seeing Current Users Processes?

Aug 16, 2010

Wanting to do something like this:

VB.NET
Private Sub MaximizeCare()
For Each p As Process In Process.GetProcessesByName("clinical_carestation")
ShowWindow(p.MainWindowHandle, SHOW_WINDOW.SW_MAXIMIZE)

[code]....

But the trouble is that if multiple users are using the same terminal I cannot narrow down the process list to just the current user. So if two users run the same application simultaniously only the first user can open the application on the same terminal.

View 2 Replies

VS 2008 Datagridview Current Cell

Aug 24, 2010

i have a datagridview and i search in it with textbox but i want to select the cell that contain the word i'm searching for

View 18 Replies

VS 2008 Get Label To Current Date?

Jul 12, 2009

Assign the current Date to a label.

Example, if the current date was 25th December. Then the lblDate.Text property will be set to 25.

Also, how would you do this to get the month, but only the first three letters of the month?

Using the example above, the lblDate.Text property will be set to Dec.

View 6 Replies

VS 2008 Getting Current User Folder?

Nov 6, 2009

How would I get the current user's folder?Example:"C:Documents and SettingsOwner"

View 1 Replies

VS 2008 - Capture Original And Current Value In DataGridView

Apr 3, 2010

I want to capture the original value and the new value from a cell in the DataGridView control. When leaving the row, I tried:

dgDataEntry.EndEdit()
Dim row As DataRow
row = tbl2.Rows(e.RowIndex)
Dim m_orig, m_curr As Decimal
m_orig = row.Item("amount", DataRowVersion.Original)
m_curr = row.Item("amount", DataRowVersion.Current)

And the values were the same. How can I capture the different values?

View 5 Replies

VS 2008 - How To Get Current Windows Explorer Path In App

Jan 24, 2012

How to get the current windows explorer path in vb.net windows application?

View 1 Replies

VS 2008 : ListBox Current Line To String?

Dec 9, 2009

i need to convert the current line that is selected/displayed in listbox into a string

View 1 Replies

VS 2008 Add The Current Date And Time To A Form?

Nov 16, 2009

adding basically just the current date and time to a textbox/label or something like that? I have looked at coding but everyone seems to do it in such a complex way. Is there not a simple way of doing this? I don't want to use the date time picker as I don't want a user to be able to select the date or time.

View 4 Replies

VS 2008 Display That Key Value In Registry For Current Drive

Jan 10, 2010

If you open up registry editor and go to: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetEnumIDE you will see subkeys of drives that are currently mounted. [code] This code is getting a list of my hard drives. Now I would like to display that key value in the registry for the current drive. How could I go about this?

View 4 Replies

VS 2008 Download 'Webbrowser' Current Sourcecode

Dec 2, 2009

I would download sourcecode like "WebClient.DownloadString("SITE")"But without Webclient is that possible?

View 2 Replies

VS 2008 Getting Current Url Of Webbrowser And Converting To String?

Mar 31, 2010

I need to get the url of the web browser (check what website it is on) and then convert it to string so it can go in a textbox or wherever.

View 11 Replies

VS 2008 How To Go Back To Previos Form From Current

May 3, 2011

I have a menustrip, in which i have put a BACK option so that the user can go back directly from where he came to the current Form ,as there are many form which leads to that particular form.

View 3 Replies

VS 2008 Refreshing The Datatable With Current Data From The DB?

May 7, 2010

I load up a datatable - bind it to a binding source and a binding navigator - and lots of textboxes on the screen bound to that as well.When I get a concurrency violation - another user has already changed my vendor, let's say - what is the best method to go about refreshing the datatable with current data from the DB?

View 10 Replies







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