|
Hi,
I have a confusion regarding storage of instances in VB.net . I am dynnamically creating pictureboxes in response to a user click at runtime. I am then adding them to 2 different ArrayLists (as i need to use them while maintaining 2 different orders). Now would this create 1 instance of the object in memory or waste resources by creating 3 different pictureboxes? If it will, then whats the way to store a reference as you can in C++ using the & operator?
Thanks,
Ahmad
|
|
|
|
|
This will only create one object in memory. Both arrays can then point to the same instance.
Dim pic As New PictureBox()
With pic
. ' setup the picture box
End With
Me.Controls.Add(pic)
MyList1.Add(pic)
MyList2.Add(pic)
|
|
|
|
|
hi all,
i want to Modify a AVI file. i want to add some Text with AVI file but i dont know from where i start this thing?
can anybody guide me or Provide me some link about modify an existing AVI file
any help will be grately appreciated.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Text? If you're trying to add captions, free programs from download.com will do the same thing without the work. Otherwise, I suggest you start with the XVID source...
|
|
|
|
|
Hi,
I want to design an Mdi application but with a transparent background for the MdiClient container (and form). It should behave in a similar fashion to the way "Mathematica" behaves if you know that software.
I have two screens. I want various child forms to be scattered across both screens but at the same time windows from a different application must be visible, and respond to mouse events, in screen areas where there are no child forms. Put it another way the MdiClient container must fill both screens but be transparent.
The problem is that the class MdiClient in non inheritable and I can not override the appropriate method to not color the background. Setting transparentkey in the main form to some color and setting the MdiClient background to this color doesn't work either, the MdiClient control doesn't support transparent background colors.
If you have a different idea how I can achieve this functionality that's fine by me. My desire is simply to able to use my screens working area with maximum efficiency and at the same time have the sub forms behave as child forms of a single application.
Any help will be most appreciated,
Gary
|
|
|
|
|
I'm not sure but I think the mdiform overrides his color property and sets it back to the default color.
I veagly remember trying something like this a few years ago and if I remember correctly I was able to change the color in code.
So perhaps you need to set the transparenty color and color of the mdiclient container in code
|
|
|
|
|
Nah,
using this line of code:
mdiclient1.BackColor = Color.Transparent
Generates the following exception:
"Control does not support transparent background colors"
But it works fine for any other color.
|
|
|
|
|
then try the following
mdiclient1.transparencykey = color.white
mdiclient1.backcolor = color.white
I'm not sure what will happen. I think you mdi container will just disapear unless there is a form in it which doesn't have its backcolor set to white (once again it's been a few years since I experimented with it so it's a bit vage)
|
|
|
|
|
You can't do what you want. The MdiClient container does not support a Transparent background, nor does the form hosting it.
It can probably be done. You'll have to create your own Form class to support this stuff, complete with how to setup your own window and custom drawing code to show it. You'd better have a thorough knowledge of how Window's windows work, especially Layered Windows. And you'll have to do a bunch of trial-and-error work to get it correct. You're treading in undocumented territory, so you won't be getting much, if any, help on exactly how to pull this off. I hope you can do your own research.
|
|
|
|
|
Well, I know for sure it has been done.
I got the inspiration for this from "Mathematica".
But no, there's no way I can pull this off myself, I don't have the knowledge.
I will find a way to work around this.
Thanks
|
|
|
|
|
Mathematica doesn't use Windows Forms. It uses custom coded windows that do NOT have the weight of the .NET Framework Form class on top of it.
It's kind of like making your own chocalate chip cookies from scratch. You know, grinding the flour yourself, making the chocolate chips, raising chickens to lay the eggs you need, ... And then there's the .NET Framework Form class, where you just pull a ready-made cookie out of a bag.
|
|
|
|
|
I know.
Kudos on the cookie analogy.;)
|
|
|
|
|
I've got a textbox that updates with some information when an event fires. The textbox multiline value is set to true.
A message is appended to a new line in the textbox.
But if the number of lines exceeds the size of the control, the vertical scroll bar appears, but it stays at the top position. It wont automatically scroll down to the last entry.
I've been trying:
TextBox1.Text = TextBox1.Text & vbCrLf & Message<br />
TextBox1.SelectionStart = TextBox1.Text.Length<br />
or
TextBox1.Text = TextBox1.Text & vbCrLf & Message<br />
TextBox1.Select (TextBox1.Text.Length, 0)<br />
But no luck.
Any ideas?
|
|
|
|
|
Hi, when the caret is present, you can make the line containing it visible with
TextBoxBase.ScrollToCaret()
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I want to remove Close button only , not system menu & minimize/maximize buttons
Thanks
|
|
|
|
|
Hi,
I thing this is not possible of removing close button. Because the form loaded by means of inherit from the form class. But we use control box said to be False n Remove all text in text in the Text Properties. Which will remove close button n Max n min buttons also. Then it is batter to create of ur own of Max n Min button...
Senthil S
Software Engineer
|
|
|
|
|
Thank you for your reply
I don't use Form , I want to disable Close button of any window in system , using Window Style flags
Among all Window Style flags , I find that the "SysMenu" flag is only flag to remove Close button ( plus system menu and other titlebar buttons )
But , I can create a Form with disabled Close button , by this way :
1. Handling WM_StyleChanging message , don't allow changing "SysMenu " style
2. Set Form.ControlBox=False
This is the picture[^]
And , I don't know why , when I use Spy++ to view Form's window styles , before and after disabling Close button ( using above two steps ) , Form's window styles doesn't change
My question is : How to disable Close button using Window Style flags ?
|
|
|
|
|
Senthil S wrote: Senthil's Reply for
Why do you prefix your replies thusly? I'm not making a critisism or anything, I'm just curious.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
In Form Closing Event place the code e.cancel=true
prabumj
Prabumj@gmail.com
|
|
|
|
|
I will do it by disabling Close menu item in window's system menu
|
|
|
|
|
i installed the visual studio 6.0 after visual studio 2.0.and got the following message after the vs 6.0 installation
do u want to upgrade the jet settings? Now my question is what's the meaning of the line , upgrade the jet settings.
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
You installed them in the wrong order. IIRC, you have to install VS6 first, then installed Visual Studio 2005. But in your case, I would think you do not want to do this.
|
|
|
|
|
|
i have datagrid that had data , but the headercolumn text is the column text in database. I want to change headercolumn text . What shuold i do ?
gaumeo
|
|
|
|
|
If u pass datas through Dataset u can change by Writting New Header text
e.g code
with dataset
.columns(0).columnname="New Column1 Name"
.columns(1).columnname="New Column2 Name"
End with
or else
from design time itself u can assign new header text and later pass datas in required cells.
Prabumj
Prabumj@gmail.com
|
|
|
|