|
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
|
|
|
|
|
hi alzaabi20xx
i understand what you are Saying and feeling sorry for you, but it will be better if you show us the code that gives you problem so that we can help. but for now we cant because we dont know what you did in your code, and it seems that you use your error trap that you have defined your self like
try
Adapter1.update(ds,"Table")
Catch ex.Exception
messagebox.show("make an appropriate update button")
end try
This is your own Error, give us your code, then we will help.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
hi Mr Vuyiswa Maseko,
thank you for your feelings towards me and I really appreciatte it and thank you again for replay....
I want to show you my form Design to let you understand it well:
Click Here:
http://www.albumtown.com/data2/f0897e959b9ad043dbdc11f4b8f9a115/84859_1289450.pjpeg[^]
this is the Error messege that shows to me:
Missing the DataColumn 'DDate' in the DataTable 'AddressBook' for the SourceColumn 'DDate'.
Here it is my Form Load code:
inc = 0<br />
con = New OleDbConnection(conString)<br />
con.Open()<br />
<br />
sql = "SELECT * FROM tblContacts"<br />
da = New OleDb.OleDbDataAdapter(sql, con)<br />
<br />
ds = New DataSet<br />
da.Fill(ds, "AddressBook")<br />
<br />
MaxRows = ds.Tables("AddressBook").Rows.Count<br />
<br />
txtFirstName.Text = ds.Tables("AddressBook").Rows(0).Item(1)<br />
txtSurname.Text = ds.Tables("AddressBook").Rows(0).Item(2)<br />
<br />
sql = "SELECT * From Attendance"<br />
da = New OleDbDataAdapter(sql, con)<br />
<br />
dt = New DataTable<br />
da.Fill(dt)<br />
<br />
dg1.DataSource = dt<br />
<br />
con.Close()
and here it is my update button code:
Dim cb As New OleDb.OleDbCommandBuilder(da)<br />
<br />
ds.Tables("AddressBook").Rows(inc).Item(1) = txtFirstName.Text<br />
ds.Tables("AddressBook").Rows(inc).Item(2) = txtSurname.Text<br />
<br />
da.Update(ds, "AddressBook")<br />
<br />
MsgBox("Data updated")
ok that's cool
|
|
|
|
|
Good morning MR alzaabi20xx
Firstly i will go line by line and we will solve the Problem with you.
|alzaabi20xx wrote
Missing the DataColumn 'DDate' in the DataTable 'AddressBook' for the SourceColumn 'DDate'.
What the Error means, there is no Field in the table AddressBook that has a name "DDate".
Another thing, how many tables are you using?
Are these tables related?
on the Following code
sql = "SELECT * FROM tblContacts" 'No Problem
da = New OleDb.OleDbDataAdapter(sql, con) 'No Problem
ds = New DataSet 'No Problem
da.Fill(ds, "AddressBook")' Problem
you have an SQl statement quering the tblContacts after that a Dataset is being filled and from nowhere i see the table "AddressBook".
MR alzaabi20xx we dont Fill in table name everywhere. ok lets sort out your code.
Can you you give me the names of your Fields in your table. and decide which table you are using.
iF you are going to use all this tables its fine, but use them in order and dont use Fields from other table.
Give me the above info and i will help
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
Hello again Mr Vuyiswa Maseko,
thank you again for replaying.
In this application i use 2 tables and as you wrote my problem is i don't know how to make a relation between both tables (tblContacts & Attendance).
ok then i made my Database using MS Access and my tables order as following:
------------- ---------------
tblContacts: Attendance
------------- ---------------
ID (PK) "Text" EmpID "Text"
FirstName "Text" DDate "Date/Time"
SurName "Text"
as you see this is my both tables...
thank you again Mr Vuyiswa Maseko and i really appreciatte what you done to me....
ok that's cool
|
|
|
|
|
Dear alzaabi20xx
its my plesure to help you.
|alzaabi20xx wrote:
ok then i made my Database using MS Access and my tables order as following:
----------------------------------------------------
tblContacts: Attendance
----------------------------------------------------
ID (PK) "Text" EmpID "Text
FirstName "Text" DDate "Date/Time
SurName "Text"
When you Create a Relation in two tables, there must be a Primary Key for each table and a foreign key. e.g
-----------------------------------------
Customer Products
============ +++++++++++++
CustomerID(PK) Product_ID(PK)
CustomerName Product_Name
Product_ID(FK) Product_Descreption
The Above will be possible with Relations Product_ID is the Primary key of the Products table and a Foreign key in the Customer table.
The Following code will help you understand.
' Open a database connection.
Dim strConnection As String = _
"Data Source=localhost;Initial Catalog=Northwind;" _
& "Integrated Security=True"
Dim cn As SqlConnection = New SqlConnection(strConnection)
cn.Open( )
' Set up a data adapter object.
Dim strSql As String = "SELECT * FROM Customers" _
& " WHERE City = 'Buenos Aires' AND Country = 'Argentina'"
Dim da As SqlDataAdapter = New SqlDataAdapter(strSql, cn)
' Load a data set.
Dim ds As DataSet = New DataSet( )
da.Fill(ds, "Customers")
' Set up a new data adapter object.
strSql = "SELECT Orders.*" _
& " FROM Customers, Orders" _
& " WHERE (Customers.CustomerID = Orders.CustomerID)" _
& " AND (Customers.City = 'Buenos Aires')" _
& " AND (Customers.Country = 'Argentina')"
da = New SqlDataAdapter(strSql, cn)
' Load the data set.
da.Fill(ds, "Orders")
' Close the database connection.
cn.Close( )
' Create a relation.
ds.Relations.Add("CustomerOrders", _
ds.Tables("Customers").Columns("CustomerID"), _
ds.Tables("Orders").Columns("CustomerID"))
When you bind the Datagrid, you are going to use "CustomerOrders" the name of the relation.
If you dont understand you will tell me.
MR alzaabi20xx we take it step by step, next we will update. try this First.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
Hello Mr Vuyiswa Maseko,
thank again for your time...
i copy the code that you've gave me and it worked but there is still a problem of the datagrid. How can i make "btnUpdate" and "btnNext" and other buttons..
thanks for your concern....
ok that's cool
|
|
|
|
|
Am Sorry i could not reply to your message, i was busy on the meetings. tomoro i will get you your answer. i have to Go now bye for now
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
Good Morning alzaabi20xx
for your Button First enter the following code
Private Sub cmdfirst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdfirst.Click
'Move to the First Record
Try
Me.BindingContext(DataSet11, "Property").Position = 0
Catch ex As OleDb.OleDbException
MessageBox.Show("Canot Navigate, Because the is no Connection to the Server", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
End Sub
For your Button Previous
Private Sub cmdprevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdprevious.Click
''' This will obviously point to the Previous record of the Dataset
Try
Me.BindingContext(DataSet11, "table").Position -= 1
Catch ex ex As OleDb.OleDbException
MessageBox.Show("Canot Navigate, Because the is no Connection to the Server", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
End Sub
For Button Next
'''Display Next Record
''' This will obviously point to the Next record of the Dataset
Try
Me.BindingContext(DataSet11, "property").Position += 1
Catch ex As OleDb.OleDbExceptionn
MessageBox.Show(ex.Message)
End Try
For Button Last
'move to the last Record
Try
With Me.BindingContext(DataSet11, "property")
.Position = .Count - 1
End With
Catch ex As OleDb.OleDbExceptionn
MessageBox.Show(ex.message)
End Try
For your update Button
SqlDataAdapter1.Update(DataSet11, "Property")
PLease modity this code according to your datasource. try to catch the Errors and display system Errors not your your Errors messages on the Messagebox,and that will be until you finish your Delopment. after that you can make Errors that users can understand. Contact me through E-mail vuyiswam@tshwane.gov.za because i might be codeProject the whole of today.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|