|
ESTANNY wrote: Now i like to have a mainmenu in the mdi child
Not supported. The menus in the child forms get merged with the menu in the MDI Parent form. There is no option to put the menus in the MDI Child forms.
|
|
|
|
|
You could consider using the ContextMenu control. This you can add to each mdi child form separately.
For all intents and purposes the same, just looks different.
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hello, I have a typical vb.net 2005 databound (strong typed ds, BindingSource, BindingNavigator) details form. The navigator moves the user nicely from one record to the other. The save button saves the changes and they are also saved as a group when the form closes..but..
Any one know how to update the db when the user moves records?
The form seems to want to wait and update the whole dataset when the form closes.. I want the updates written whenever the user 'leaves' the form.
I found a nice article here at codeproject on how to do this with a DataGridView but not with a regular details form: VB DataGridView Automatically Saving Updates to a Bound Database
The update code I can steal from what was generated for the BindingNavigator Save button...but the big question is....which object/event to use???
Thanks for any light you can shed on my dilemma!
|
|
|
|
|
It doesn't even wait for the form to close. Any changes made to the dataset are only written back to the database when the little blue disk is clicked. If you close the form before clicking that disk, all changes are lost.
If you want to automatically save changes when the use moves to another record, handle the BindingSource's PositionChanged or CurrentChanged events and call the Update method on the TableAdapter and pass in the datatable object, just like you find in the code for the little blue disk's Click event.
Private Sub CustomersBindingSource_CurrentChanged(blah, blah) Handles CustomersBindingSource.CurrentChanged
Me.Validate()
Me.CustomersBindingSource.EndEdit()
Me.CustomersTableAdapter.Update(Me.NorthwindCustomersDataSet.Customers)
End Sub
|
|
|
|
|
Is that I'm doing a projet, and I want to include a ProgressBar in the Splashscreen. Is that possible? I want it to be a load progress bar ( Like the one when you turn on your computer, when is says Windows Xp). Could anyone help me, it will be appreciated.
Thanks for your time
-- modified at 14:24 Wednesday 10th October, 2007
|
|
|
|
|
eviljohan wrote: Is that I'm doing a projet, and I want to include a ProgressBar in the Splashscreen. Is that possible?
Yes
eviljohan wrote: I want it to be a load progress bar
To load what? You haven't explained what you want to do.
I suggest you read the documentation on the ProgressBar[^] control and follow up your post if you have a more specific question.
Paul Marfleet
|
|
|
|
|
Hi Pmarfleet
I don't want to show exactly the progress of something, is that I want the progress bar there to be like a decoration. You know like when you start your computer and it says Windows XP, you know there is a progress bar with the blocks passing by, I want my progress bar to be like the one when windows is starting up. I hope you understand.
Thanks, I hope is clear now.
|
|
|
|
|
What are you showing the progress of??
All too often this question comes up and the poster thinks that the progressbar just magically knows what it's showing the status of. You're code has to increment the progressbar every once in a while. So, what is it that you want to show the progress of??
|
|
|
|
|
Hi Dave:
I don't want to show exactly the progress of something, is that I want the progress bar there to be like a decoration. You know like when you start your computer and it says Windows XP, you know there is a progress bar with the blocks passing by, I want my progress bar to be like the one when windows is starting up. I hope you understand.
Thank you very much and sorry for the misunderstanding, is that I'm just a newbie on this. I'm taking my frist class right now of Visual.
|
|
|
|
|
If I understand correctly you are showing a Splash Screen for a certain interval of time, and while splash screen is on screen you want to have a Progress Bar which will increment and show how much time has elapsed.
If this is what you are doing then you may have code like this-
---------------Code Start--------------------
On Form load set maximum and minimum value for Progress Bar, here I am using a timer which will show splash screen for 5 seconds, following lines will go in Form load event of SplashScreen –
Me.Timer1.Enabled = True
Me.Timer1.Interval = 1000
Me.ProgressBar1.Maximum = 5
Me.ProgressBar1.Minimum = 0
Now timer will run following code after every second and will also Increment the Progress Bar-
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
i += 1 'i is a Form level variable
If i = 5 Then
Me.Hide()
Else
Me.ProgressBar1.Increment(1)
End If
--------------------Code End---------------
I hope this helps .
-Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
Hi Dave:
You are almost correct my friend. I just did a copy & paste from this code you send me but it says that Name "i" is not declared. Ok I want the progress bar to be as the one when windows XP starts you know that it doesn't point the progress of windows starting, it is just there with the blocks passing by, that's want I want to do. My apologies for asking so much is that I'm a newbie working with Visual. Could you help me out.
Thanks
-- modified at 18:59 Wednesday 10th October, 2007
|
|
|
|
|
Then change the ProgressBar.Style property to Marquee and set the MarqueeAnimationSpeed to some value, like 250 milliseonds.
|
|
|
|
|
How to make a ruler in richtextbox in vb.net for eg:- see msword
|
|
|
|
|
This is a VERY complicated topic, so I'll ask a simple question first.
Do you know how to write your own custom controls, from scratch?? That means you MUST understand completely how controls work and can write one from the ground up, providing all the properties, logic, rendering code, events, methods, ... So, do you??
|
|
|
|
|
No i don't know how to write custom control if u have any link pls send me and also help me about ruler thanks for reply
|
|
|
|
|
No, there isn'tone link that will tel you how to do this. Dozens of them, maybe. An entire book on creating controls and how they work, maybe. But this is most certainly NOT something for a beginner to tackle, nor is it going to be covered in a couple of articles.
|
|
|
|
|
i know it is heard to do but its my job so tell me the book name or help me out
rishi dubey
|
|
|
|
|
There isn't one book name. There's a bunch of books, articles, and lots of practice involved in understanding how controls work. Search for anything on Windows Forms.
If this is your job, you're in trouble. Tackling a problem this big is not for a beginner, nor is it something for someone who cannot do their own research, because you're going to be doing LOTS of it.
|
|
|
|
|
i want to do bullet and numbering in my richtextbox help me out for example you can see msword the same thing i want to do pls help
|
|
|
|
|
There are several of those here on Code Project and a simple Google search turns up a couple of very nice ones.
Try looking for them and ask if you have specific questions.
The early bird who catches the worm works for someone who comes in late and owns the worm farm. -- Travis McGee
|
|
|
|
|
I search a lot but i did'nt got any answer if u have any link of the site pls send me on rishi_m_dubey@yahoo.com
|
|
|
|
|
i am a fresher in .net field. I have just started learning vb.net..
now i am trying to bind an arraylist to a datagrid. but i am getting a blank datagrid ...
here is my code...i dont know whats happening
this is the form_load event ....
private void Form1_Load(object sender, System.EventArgs e)
{
ArrayList aList = new ArrayList();
aList.Add(new Person("sayoni", 25));
aList.Add(new Person("fahim",28));
this.dataGrid1.DataSource=aList;
}
and the class is....
public class Person
{
String name;
int age;
public Person(String name, int age)
{
this.name=name;
this.age=age;
}
}
..can u find a problem here....?
|
|
|
|
|
A couple of them. First, you're in the wrong forum. This is the VB.NET forum and you posted C# code.
Second, in your Person class, you don't expose the name and age as public properties, so there's nothing for the DGV to bind to.
|
|
|
|
|
From the code you provided, it looks like you don't have any public properties. A class that is to be bound to a control must have property accessors. Any property that is to be bound must have Property Set and Property Get methods.
|
|
|
|
|
set a property for the name and the age..
and set them to the data grid display member and value member for each property.
be care the given property name must be qualify full case-s name..
Try
Dim SH*T as Mylife
Catch ex As Exception
msgbox("Im Happey Today")
End Try
|
|
|
|