|
I think I have an alternative way to do this which is more elegant
In the constructor of your class you can add this line:
SetStyle(ControlStyles.ResizeRedraw, true)
then from that point windows will stop sending small redraw to part of the control and assume the whole control needs to be repainted when resized.
|
|
|
|
|
thanks, this solved my problem !!
|
|
|
|
|
Hi all,
I need to show the total of a column in datagridview. Actually I am not getting the event, as we have Item DataBound Event in ASP.NET is there any event in VB.NET also?
Please help me.
Thanks in advance.
|
|
|
|
|
MsgBox(DataGridView1.Columns.Count.ToString)
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
this will display the column count and I want the total of that column.
Ex:
Column1 Column2
12 14
10 15
-----------------------------
22 29
Please help me.
|
|
|
|
|
sorry, i can not get u properly in Previous message.
i m not sure about existance of any property of datagridview which is matched with your requirement.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Hi don't know if this will help but this is how I add up a column and show in a textbox.
Good luck
For Each NewTotal As DataRow In Me.HorsesDataSet.CHARGES.Rows
If NewTotal("TOTALCOSTFORSERVICES") Is System.Convert.DBNull Then
Else
Nos = Nos + CDbl(NewTotal("TOTALCOSTFORSERVICES"))
End If
Next
txtbxOverallCost.Text = Format(Nos, "£#,##0.00")
Nala
|
|
|
|
|
Dear friends,
I am getting gdi+ error when using .colordepth in any format (1L in int32, long or just 1L).
what to do?
Heres the code sample.
The error is on the same line.
But taking depth at 24L its working.
I wan't output with 1L only.
Thanks,
ThisEncoderParameters.Param(0) = New EncoderParameter(Encoder.SaveFlag, CType(EncoderValue.MultiFrame, Long))<br />
ThisEncoderParameters.Param(1) = New EncoderParameter(Encoder.ColorDepth, CType(1L, Int32))
-- modified at 6:09 Monday 3rd September, 2007
|
|
|
|
|
This depends on how you're using this, but it looks like the ColorDepth parameter only works with GIF and TIFF files.
|
|
|
|
|
I have been trying this with tif images only.
But don't know why it don't take depth less then 24L
|
|
|
|
|
From what I've been reading, GDI doesn't support 1 bit color depth.
|
|
|
|
|
Hello All,
In my application i have to change child form text and label's visible property to false based on some condition like:
In my application MDI form is a startup screen and written the following code
if bvar = false then
dim frm as new frmchild
frm.label1.visible=false
frm.text="Hello"
end if
Presently i have written it in module because it has to be included in either a class or module as per requirement.
But, whenever i execute my application, the label still remains visible and also form text remains the same.
I am using dot net 2003.
anyone who knows, Please help at the earliest how properties can be changed at runtime.
Please provide some code if possible.
Thanks .
|
|
|
|
|
Pass the Form object to module when you call the Module.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
I have to change multiple child forms label property with a single call.
is it possible.
I am calling the procedure in MDI load event. In the single procedure,
I have created instances of multiple child forms.
Am i doing nothing wrong.
the same code executes in vb.net 2005 , so how it can be done in vb.net 2003
|
|
|
|
|
Hi you need to hold the all object of the form. So
Create the all form object out of the mdi form load method and call module and pass each form object to the module.
Or if got any error messages then post here.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
Hello All,
Well i am working with collections in the project.
I have set the datasource property of the datagrid to a collection (I am not using dataset just the collection).
I am unable to format the datagrid using the tablestyles.
Would anyone please help me in formating the datagrid (using tablestyles) when the datasource property is set to a collection.
Thanks in advance,
P.S - I am unable to set the mappingname property in the tablestyle to collection.
if you send a mail at gokhale.i1@gmail.com in response to this query it would be better...
|
|
|
|
|
Hi for all programmer !
pls look , save and solve my problem below
Dim myarraylist As ArrayList = New ArrayList()
Dim array1(,) = {{"banana"}, {"Pineple"}}
Dim array2(,) = {{"Mango"}, {"Peach"}}
myarraylist.Add(array1)
myarraylist.Add(array2)
Mean that myarraylist store two Array in it.
i want to extract each element out from myarraylist what should i do ?
i wait for all your reply na.
regards from
Anatha
|
|
|
|
|
Access the items of Arraylist like myarraylist(0), myarraylist(1) and so on. Note Arraylist item will return object so you have to cast it into the correct object (2D array in your case).
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
Hello,
I am facing the problem in accessing the child form control property.
In my application depend upon certain condition , i have to hide some controls of some child forms.
I have created a module wherein writen a Public procedure to hide one of the child form's control
and call the procedure in MDI forms load event.
But, Whenver i am executing the application , code doen't take any effect and control still remain s visible.
Here is the code:
Module Mod1
Public sub HideControl(byval var as boolean)
if var=false then
Dim frmName As frmSearch
If frmName Is Nothing Then
frmName = New frmSearch
frmName.label1.Visible = false
End If
endif
end sub
end module
This is first way i tried.
Second way : I have defined a property for accessing the form instance and with this instance accessing the control as below:
''' global variables
Private Shared SearchInstance As frmSearch
Private Shared bSearchInit As Boolean
Public Shared Property DefInstance() As frmSearch
Get
If SearchInstance Is Nothing OrElse SearchInstance.IsDisposed Then
bSearchInit = True
SearchInstance = New frmSearch
bSearchInit = False
End If
DefInstance = SearchInstance
End Get
Set(ByVal Value As frmSearch)
SearchInstance = Value
End Set
End Property
Using this property accessing cotrol and setting its property in module as:
frmSearch.DefInstance.label1.Visible = false
None of the these codes seems to be working.
when i open that child form i still found that label visible.
Please anyone who knows the answer let me know, how to do it.
Please Give some code , its urgent as i am unable to proceed further.
Any help will be highly appreciated.
Thanks
|
|
|
|
|
I think you might be making things a bit to complicated.
This is how I would do it:
in the mdi set a property (shared one) to true or false (for further referance: b1)
then when you open the child forms in the contstructor (or load) check this property and set you're controls to visible or not.
child.label1.visible= mdi.b1(shared property)
...
if you also need to change the visibility of you're child forms while they already exist you can run thru them everytime the property is set:
public property b1 as boolean
get
return ...
end get
set (value as boolean)
for each frm as form in mdi.MdiChildren
if frm.gettype.equals(gettype(frmsearch)) then
dim f as form = frm
f.label1.visible = 'true or false
end if
next
end set
hope this helps
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
how can i read a serial number while running setup and validate it in vs.net 2005 ????
himanshu p.taunk
|
|
|
|
|
himanshu p taunk wrote: how can i read a serial number while running setup and validate it in vs.net 2005 ?
What serial number? Your app or VS?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
How to load and unload DLL or Plugins in VB.NET2005? I have a program that loads dll by mouse click in the menu but i don't know how to unload it,i hope someone could help me or tell me how to unload DLL and Plugins,also help me how to load it by using interfaces,thanks in advance..
<rattlesnake><3:16>
|
|
|
|
|
|
Hello guys,
I want you to help me with this...
1) I have two tables tblEmployee & tblAttendance, i made a form which let the user enter the attendance of the employee of course the attendance is in a datagrid. i did everything but the problem is when i made changes with the attendance and click "btnupdate" error message show to me tell me to make an appropriate update button.
2) i want a suggestion design for my form: I want to make a monthly form which you enter the ID of the employee and Enter the date (Month & Year) and the employee info shows to you.
I wish you could help me with this.
ok that's cool
|
|
|
|