|
Thanks for the reply.but where i will call the paint method in my component class
|
|
|
|
|
Imports System.Windows.Forms
Imports System.Drawing
Public Class FlatButton
Public Sub Onpaint()
Dim obj As Graphics
obj.DrawRectangle(New Pen(Color.DarkOliveGreen), New Rectangle(0, 0, 100, 100))
obj.FillRectangle(New SolidBrush(Color.DarkRed), New Rectangle(0, 0, 100, 100))
End Sub
This is my class .now i don't want to enter events and properties.just i want to create one outline of my button.please give me a reply. i want to make dll file of this component in one project and i want to add this button to my form.please anyone give a reply
|
|
|
|
|
anujose wrote: but where i will call the paint method in my component class
You don't. The event will be called whenever the control needs to be drawn. That is the way that you provide the code that the system uses to draw your control.
---
Year happy = new Year(2007);
|
|
|
|
|
I have a form which is a loading form. I would like it to close and remove itself from memory before the next form (Login form) LGNFRM loads.
The problem is, is that the form hides itself rather than closes as when I press ALT-TAB to change windows, the form that should have closed is till open, but you cannot access it unless you close the login form. Could anyone help?
Using VB.net 2005
In the end we're all just the same
|
|
|
|
|
Hi Dave,
I am going to assume that you want to remove the first form from memory because it uses a lot of resources itself.
In this case you have to "cheat". Make a new completely empty starting form, have its load event open your second (loading) form, and then hide itself. Then make your second form open the third one in its disposed event, and use me.dispose , instead of me.close .
Et voila.
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
vhuynh View profile
More options Dec 30 2006, 9:32 am
From: "vhuynh" <huynhthanhv...@gmail.com>
Date: Fri, 29 Dec 2006 18:32:12 -0800
I write a sale form using datagrid with it detail:
Item_Code Item_Name Quantity Price Total
HH01 ? ? ?
?
When I input item_code, I want to automatically change item_name, price, and calulate
total
Can anyone help me?
Viet, Huynh
|
|
|
|
|
Hello,
I want to add Image in MDI Form.
How it i Can do. Plz Help me.
Thanks & Regards
Form :-
Vikash Yadav
|
|
|
|
|
you can get The MdiClient Control of your form and set background image for it:
Private Sub MyMDIForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
For Each c As Control In Me.Controls
If c.GetType Is GetType(MdiClient) Then
c.BackgroundImage = Image.FromFile(ADDRESS_OF_IMAGE)
Exit For
End If
Next
End Sub
|
|
|
|
|
Thanks Boss
It was Success.
I want more help with you. It was Tiles, not Stretch. How it will be. & How i will do if i want to set any colour in Background. I am using VB.Net 2005. and colour is in code which i am ussing "255, 224, 192" that is this, How i can use this colour in MDI form as a Background.
Thanks again For help.
Thanks & Regards
Form :-
Vikash Yadav
|
|
|
|
|
Thanks Boss
It was Success.
I want more help with you. It was Tiles, not Stretch. How it will be. & How i will do if i want to set any colour in Background. I am using VB.Net 2005. and colour is in code which i am ussing "255, 224, 192" that is this, How i can use this colour in MDI form as a Background.
Thanks again For help.
Thanks & Regards
Form :-
Vikash Yadav
|
|
|
|
|
1-MdiClent control has properties such as other controls; u can use BackgroundImageLayout property to set background image layout , use BackColor Property to set Back color , ...
2-by using Color.FromARGB you can create your custom colors and assign it to backcolor property
|
|
|
|
|
i have developed a "Voice Based Messenger" which user could record voice and send it to another user. i found difficulty in coding part to record,stop, playback and save it as an audio(.wav) file.
ill appreciate..thanks
|
|
|
|
|
Your program will be useless if it saves wav, that's raw data. You want to save as mp3.
You need the platform SDK to look at DirectShow.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
thanks for the suggestion.
can i get any sample of open source code ragarding on voice recording/playback..
|
|
|
|
|
I presume the DirectShow samples would include some.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Gud Morning All,
i have checkbox column in my datagridview,
when user checks the checkbox i wnt to fill other columns by some constant number.
where shuld i write the code & how to check whether checkbox is checked or not?
in our usual checkbox we can do it by->
checkbox1.checked=True
but for a checkbox as column in datagridview , there is no "checked" property.
so Will anyone please tell me how to do it?
Thanx
--Regards Priyanka.
priya
|
|
|
|
|
You can still hook up an event. Is this ASP.NET or winforms ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi,
my application is in vb.net(winforms)
priya
|
|
|
|
|
OK, then it's a lot easier. You should be able to attach click events to your columns, just by adding a click event in the column definition.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hallo,
Thank you so much for help.
but as i am new in programing, will you tell me how to add events to datagridview column,
at the time of column Definition?
--Regards Priya
priya
|
|
|
|
|
priya_p233 wrote: but as i am new in programing
In that case, you should forget about datagrids, and work through a beginner book on VB.NET, just the language, not any forms stuff.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
I've used VB.NET 2003 Standard to create a form using the wizard.
On the form, I had a bound textbox - txtUnitOfMeasurement.
This was bound to an MS Access table, tblSuppliersProducts, and a numeric field called UnitOfMeasurement.
This worked fine.
I then upgraded to VB.NET 2005 Express, and swapped my textbox for a combo box, and added the following settings to the combo:
Data Bindings - SelectedValue = tblSupplierProductsBindingSource.UnitOfMeasurement
Data Source = tblUnitOfMeasurementBindingSource
Display Member = UnitOfMeasurement
Value Member = MeasurementID
This too is fine, on my experimental dummy first record - it saves my changes to the UnitOfMeasurement field in tblSuppliersProducts - proving, to me, that it is bound correctly. However, when I press 'Add', it retains my previous combo box choice (which isn't a huge problem) on the new record, but when I fill in the remaining fields, and press Save, I get an error message saying that tblSuppliersProducts.UnitOfMeasurement is null.
I am obviously not doing something properly in between changing my text box for a combo box, but I don't know what.
Can you help?
|
|
|
|
|
Is your combo box perhaps binding again, and reseting the data source ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Thanks for your reply. I'll have to have a look.
Unfortunately, as I'm developing the app from home, I don't have access to it in my "real" job!
Another problem is the seemingly unnecessary lines of code that the form wizard throws in. I'm pretty new to all this, which makes it that bit harder for me to read what its done.
Oh well - a bit of debugging to do tonight, then!
|
|
|
|