|
Use the Color.FromName method.
---
single minded; short sighted; long gone;
|
|
|
|
|
tHANKS fOR REPLY ,
Sorry It works withyour method
i have to save backcolor.name ,Now it is with font
i am storing like this
drTextBox.Item("Font") = ctr.Font.Name
When i am retrieving the font from datatable it is raising error , string to font conversion cast cannot be done .
.Font = CType(dtTextBox.Rows(iLoop).Item("Font"), Font)
Any Ideas ,
dvs
|
|
|
|
|
You can only convert from a string to types that have a natural representation as strings, like a number.
You should really learn how to read the documentation yourself, instead of having to ask others to do it for you. It's all there, and it's much faster than waiting for a reply in a forum.
To create a Font object from the name, use one of the constructors of the Font class. You have to at least supply the font size also.
---
single minded; short sighted; long gone;
|
|
|
|
|
I have created one project which is working fine,but there is one big problem,i.e. when we add, modify or delete records it gets properly updated in the dataset as well as in the dtabase.I close the project and check the database it sores data properly but when i re-execute the project data in the database gets lost(menas database tables becomes empty).Et could be the reason.
GIRISH
|
|
|
|
|
Stop Stop Stop Stop Stop
you are Saying many things at the same time. we are trying to see the Problem and you jump to another. you need to solve the Problem Step by Step. Now lest start here.
|ShuklaGirish: write
when we add, modify or delete records it gets properly updated in the dataset
How do you know this for sure, paste the code that confirm that it has added your record to the dataset.
|ShuklaGirish: write
I close the project and check the database it sores data properly but when i re-execute the project data in the database gets lost
Lets see the code that you are using to save to the DB not DAtaset. and what DBMS you are using. Access or SQL?
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
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi,
thnx for ut reply.I am using Ms-Access 2003.
I am showing u the code,
this is the code i am using to update the data,
Dim res As Integer = executeDML("update schedule set [date]='" & txtdate.Text & "',[vehno]='" & ComboBox1.SelectedValue & "',[from]='" & txtfrom.Text & "',[from_time]='" & txtfromtime.Text & "',[to]='" & txtto.Text & "',[to_time]='" & txttotime.Text & "',[driver]='" & txtdriver.Text & "',[remarks]='" + txtremarks.Text & "' where [id]=" & scheduleid)
If res > 0 Then
MsgBox("Record Updated Successfully!!")
Else
MsgBox("Error while Updating Record!!")
End If
executedml is function defined in module which is,
Public Function executeDML(ByVal command As String) As Integer
Try
com.CommandText = command
com.Connection = con
makeConnection()
rs = com.ExecuteNonQuery()
closeConnection()
Return rs
Catch ex As Exception
If schedulecode = True Then
MsgBox("This vehicle is already at booked at spcified time")
Else
MsgBox(ex.Message)
End If
End Try
End Function
i have degug the code also everything runs properly.
So,wt could be the problem?
|
|
|
|
|
The Access database is part of your project. The file is also tagged as Copy Always when you build and execute your project. So, every time you hit F5 in the debugger, it copies the database from your project folder to the Debug folder your .EXE shows up in, overwriting the database your code is actually using.
|
|
|
|
|
thank u very much,
my problem gets solved.
thanks alot.
GIRISH
|
|
|
|
|
hi,
i need to know about INTERFACE and what is the use of interface? why we need it
and if you have an article link about INTERFACE which having example pls send the link.
Thanks
sathimailin1
|
|
|
|
|
Here[^] is a useful link.
An interface allows you to define a set of methods that can be implimented by classes even if they have no common root.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks Christian Graus...
I will check the article Link and if i have any doubt when working with Interface i ll post the message.
|
|
|
|
|
Basically I want to Authenticate a User name and Password that is saved in a text file. The username and password is saved in a text file from a Persons Form. I want to call each object (username & password) to authenticate itself with a login form.
|
|
|
|
|
I am writing some controls, and I would like to have Compound Properties similar to the built in "Font" Property where I can have a single property with several sub Properties.
Say I want a Property BackColors() with sub properties of Normal(), Hover(), Pressed(), Disabled(), and Alpha() inside it, and be able to browse it in the property window with the +/- button rather than opening a collection window.
I hope I am making sense. I woudl put a picture on, but this board doesn't seem to let me, as far as I can see.
I have looked everywhere in my current books, and online for a way to make complex properties like this but I only find basic stuff for single properties.
|
|
|
|
|
|
Thanks this worked Great, I apprecaite it Very Much.
|
|
|
|
|
Hey guys, I was just wondering if it is possible to have a program that searches the screen for a certain color in VB.Net via input of RGB values or the built in color tool. Also if that is possible is it possible for it to click or rick click on the spot where it found the color? Any help is appreciated.
|
|
|
|
|
|
Hello,
I have created an application that creates Active Directory users. The application is working fine. I read and write some settings to the application settings with My.Settings.mysettingname
Here comes my problem, I would like to have multiple templates into my application so that if a dropdown box value has "template1" selected other values like department, location, etc. are changed depending on the selected template.
What is the best method to read and save data to? Could i use an Access database? Or is it better to use a XML file or INI file? And how could I read and write to the advised method?
Any help is appriciated. Thanks in advance.
Kind regards,
Roland
|
|
|
|
|
|
Ask your instructor for help.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Pay attention to forum rule no. 9
Paul Marfleet
|
|
|
|
|
Hi everyone
I am using vb.net 2005, and I am trying to get information on how to use the reports that come with it. I would like to generate reports that would serve as invoices from a sql server database and I would want to do this programmatically. I have tried using crystal but that does not seem to be getting me any where, a m getting a load report error.
Does anyone know a site where I could get information on these reports that come with vb.net and just out of interest are these the SQL server reports.
Thanks for reading this
tw5ed f8
|
|
|
|
|
Dim Arr(1,2) As String
Arr.Length = 6
No, I wanna know
Length that = 2
Width that= 3
|
|
|
|
|
Arr.GetLength(0) and Arr.GetLength(1) .
---
single minded; short sighted; long gone;
|
|
|
|
|
My question about properties
Look at this property
http://aycu37.webshots.com/image/30436/2001091364269527811_rs.jpg[^]
when I wrote Cursor I can chose const form list
I need build property like that for example
I created sub building html page
And I want build property specified page color "red or blue or black or ……………"
so user can select color of page
How I can do it?
|
|
|
|