|
Hi Frnd's
I have datetimepicker control for which i need to change the forecolor to red when it is selected i.e the text should be change to Red color
Plz help me..
Thnks...
|
|
|
|
|
Requirement: In vb.net
I want to add records in gridview text boxes? how it will be possible.
Explaination:
I have gridview named gridAsset with 5 columns all are text boxes.
suppose now i am entring values in first row then after that with out saving these values in data base i want to enter another one more record.it means now grid row count is 2.
after this on click on save button it should be saved in data base.
please give me solution aspx as well as in aspx.vb in both.
Thanx
|
|
|
|
|
Well, a gridview can be set up to support an 'add' link that gives you a row with textboxes and saves the data to the server.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Private Structure CUSTOM_EXPORT
Dim Name_Renamed As String
Dim ViewName As String
Dim List() As String
Dim filter_Renamed() As String
Dim ColHeadName() As String
Dim ColWidth() As Object
Public Sub Initialize()
ReDim List(255)
ReDim ColHeadName(255)
ReDim ColWidth(255)
End Sub
End Structure
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dim udtCustom() As CUSTOM_EXPORT
udtCustom(1).List(0) ="Area Code"
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I face with "Area Code" is not assigned to udtCustom(1).List(0) ,
Object Reference not set to an instance of an object.
pls solve my problem,
what other is needed i do for this problem,
THANKS FOR ALL!!!!!!!!!!!!!
|
|
|
|
|
Sorry!!!!
I forget this is
VB.Net Code
|
|
|
|
|
|
Michael Sync
Sorry !!!Please forgive me.
This is my mistake of your annoyance.
Because ,I did not see your answer at .NetFrameWork Boards.
So i make my second time of my question at VB/VB.Net Boards.
Now ,i see your answer at .NetFramework board.
So,Please forgive me again.
THANKS FOR YOUR ANSWER!!!
Now i can resolve my problem.
Sorry!!!
|
|
|
|
|
Meenge,
What Michael has been saying is:
Dim udtCustom() As CUSTOM_EXPORT '<< executing this lines does not actually create any instances of the array. You must specify a size by putting a number between the (). When you do that, now you can use that instance.
Dim udtCustom(1) As CUSTOM_EXPORT '<< now 0 and 1 (because the array is zero based) instances are available for accessing.
---------
Your other problem is the arrays within you structure. Creating instances of your structure does not create any instances of the arrays within. If you notice, in your original post, the () are empty. So once again the variable is created but equal to nothing or has a length of zero (depending on the type of object). So you have to create the instances for those arrays as well by specifying a size. You can do that either at the point of DIMming your variables or using Redim to allocate after DIMming. Michael has chosen to call a routine within the structure to set those sizes. You can either hardcode the size within the () or call a routine or set them outside the structure ex: ReDim udtCustom(1).List(5)
Hope this helps...
Nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
|
|
|
|
|
nlarson11
THANKS A LOT FOR YOUR ANSWER AND KINDNESS!!!!!!!!
Your answer can resolve my problem.My problem is everything OK because of you.Now ,you see my happiness.
|
|
|
|
|
Don't cross post. It's just plain rude.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
How to retrieve a record set from XML file, I want to use data from XML file to add to a drop down combo box for user selection.
Saseendran Kombath
|
|
|
|
|
You can use some XML reader or DataSet.ReadXml().
|
|
|
|
|
Can help with some sample code in vb.net?
Saseendran Kombath
|
|
|
|
|
You can google "VB.NET how to read XML file" or "DataSet.ReadXml()" ..
|
|
|
|
|
I'm using the AppActivate function to bring an application to focus. This function works if the application has not been minimised. If it is minimised, AppActivate function won't bring the specified application to focus.
Thanks
Graeme G
I am always greteful for any help!
|
|
|
|
|
Hello
I want to make a chat program used to talk between 2 computers connected by LAN.
But I couldn't, I made a good one in VB6 using WinSock.
But in VB.NET, it isn't the same.
So can anybody give me a sample, or at least tell how to do it?
Thanks
modified on Sunday, December 16, 2007 6:44:02 PM
|
|
|
|
|
There are plenty of those around (.net remoting chat etc.) - just search for "chat" here
|
|
|
|
|
I searched and looked around, but I got nothing what I need.
Can you help me more please?
|
|
|
|
|
look here[^]">
for example
|
|
|
|
|
The sample you gave me is a VC.NET project.
I don't have VC.NET, but only VB.NET, so I couldn't open it.
What should I do?
Thanks
|
|
|
|
|
I want to manipulate a simple program from my VB - I need to insert s short text in a field and activate a button in the program. Is anyone know how to do that? Thanks, Ronny
|
|
|
|
|
Depends on what the other program is. No matter what, you'd be better off in C++, but with p/invoke you may be able to do it
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have been able to do some successful outlook automation using VB.Net and create a new mail message with the address, subject, and body filled out as below:
Dim app As Outlook.Application = New Outlook.Application
Dim appNameSpace As Outlook._NameSpace
Dim memo As Outlook.MailItem
appNameSpace = app.GetNamespace("MAPI")
appNameSpace.Logon(Nothing, Nothing, False, False)
memo = app.CreateItem(Outlook.OlItemType.olMailItem)
memo.To = "sample@gmail.com"
memo.Subject = "Reminder"
memo.Body = sampletext
memo.Display()
What I would like to next is highlight all the body text and do a find and replace on some words in the text. I haven't been able to make enough sense of the macro recorder on outlook to successfully do this, though. It looks like the way to do this in VBA is:
Selection.WholeStory
memo.Selection.Find.Text = "original_text"
memo.Selection.Find.Replacement.Text = "replacement_text"
memo.Selection.Find.Execute(Replace:=wdReplaceAll)
However, I am having a hard time doing this in VB.Net. I feel like I'm must be missing something really easy. I have done this before using MS Word automation with no troubles. Can anyone steer me in the right direction? Thanks!
Craig
"That rug really tied the room together."
modified on Tuesday, December 11, 2007 12:09:48 PM
|
|
|
|
|
|
Here is my problem...I have the following class:
Public Class Login 'in Database_Class library
Public m_User As String
Public m_Password As String
Public Sub New()
End Sub
Public Property UserName() As String
Get
Return m_User
End Get
Set(ByVal value As String)
m_User = value
End Set
End Property
Public Property Password() As String
Get
Return m_Password
End Get
Set(ByVal value As String)
m_Password = value
End Set
End Property
End Class
This class is going to hold login information...I have a form that a user will enter in the user name and password.
My question is this. I am trying to connect to a database using a connection string (which works). I dont want to provide my username and password directly into the connection string so I decided to set up a class for my login info so i can use a login form. I want to append the user name and password into the connection string and it doesnt work. I have the following in my connection class...
Imports Database_Class 'The class library that contains the Login Class
Imports System.Data.oracleClient
Public Class Connection
Public Shared Function GetConnection() As OracleConnection
Dim connectionString As String = "Data Source = PIDBDEV; User ID= " & UserName & ";Password = " & Password & " ;Unicode = True;"
Return New OracleConnection(connectionString) Return New OracleConnection(connectionString)
End Function
so what am I doing wrong? How do you access the values contained in a property contained in a class library in another class??
Erica
|
|
|
|