16,016,736 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by __BrokenArrow__ (Top 17 by date)
__BrokenArrow__
24-Feb-13 6:41am
View
Well its both there from me and OriginalGriff
__BrokenArrow__
10-Feb-13 3:11am
View
I think KalaiPond wants to remove all of the datagridview rows
__BrokenArrow__
10-Feb-13 3:03am
View
Hi KalaiPondy here is a solution you might be able to try Let me know if you it worked for you
private void BtnDcDelete_Click(object sender, EventArgs e)
{
int i = dataGridViewEx1.Rows.Count - 1;
try {
while (!(i <= -1)) {
foreach (DataGridViewRow row in dataGridViewEx1.Rows) {
dataGridViewEx1.Rows.Remove(row);
}
}
} catch (Exception generatedExceptionName) {
}
}
__BrokenArrow__
25-Jan-13 0:50am
View
I found the solution to my problem... Posting it now
__BrokenArrow__
24-Jan-13 5:19am
View
Oh so it should look something like this then
Dim method As MethodInfo = type.GetMethod(strMethodName,int32 or just the number or string?)
__BrokenArrow__
24-Jan-13 5:04am
View
Dim method As MethodInfo = type.GetMethod(strMethodName) """This is the line giving me the error code
__BrokenArrow__
24-Jan-13 4:59am
View
Then what would you prescribe on my impossible solution? Lol we'll I am battling
__BrokenArrow__
24-Jan-13 4:52am
View
Like this??
Dim oo As Object = New Object() {10}
Dim objInstance As Object = Activator.CreateInstance(type)
method.Invoke(objInstance, oo)
__BrokenArrow__
24-Jan-13 4:48am
View
Where?
__BrokenArrow__
24-Jan-13 4:43am
View
Imports System.Windows.Forms
Public Class ReflectionLib
Public Shared Function ShowX(ByVal x As Integer) As Boolean
Dim t As Boolean = True
Dim f As Boolean = False
Dim chk As Boolean
Dim retstring As String = ""
'' I just removed the code for the internet check'''
'' Partial of this is to get the string from my database located on the server and resend it to the application'''
If retstring = Nothing Then
chk = f
Else
chk = t
End If
Return chk & retstring
End Function
End Class
__BrokenArrow__
24-Jan-13 4:34am
View
I have created the dll with this and played around but the same error occurs with the line
hh_m.Invoke(Nothing, New Object() {})
And I tried using a function with parameters and changeing the lines to something like this
Dim args as Object = New Object() {variable}
hh_m.Invoke(Nothing, args)
But still the same error...This function is supposed to check and validate a user input on my database for an activation...Trick is the dll should be located elsewhere on the hdd
__BrokenArrow__
24-Jan-13 4:17am
View
I want to call a function which returns boolean using a variable supplied by the user but to no avail ... Here's the code
Try
Dim ass As Assembly = Assembly.LoadFile(Application.StartupPath & "\ReflectionLib.dll")
Dim t_sam As Type = ass.GetType("ReflectionLib")
Dim hh_m As MethodInfo = t_sam.GetMethod("ShowX", BindingFlags.Public Or BindingFlags.Static)
hh_m.Invoke(Nothing, New Object() {})
Catch ex As Exception
MessageBox.Show(ex.Message + ex.StackTrace + vbLf)
End Try
I keep getting Object reference not set to an instance of object error with this code
hh_m.Invoke(Nothing, New Object() {})
__BrokenArrow__
24-Jan-13 4:17am
View
I want to call a function which returns boolean using a variable supplied by the user but to no avail ... Here's the code
Try
Dim ass As Assembly = Assembly.LoadFile(Application.StartupPath & "\ReflectionLib.dll")
Dim t_sam As Type = ass.GetType("ReflectionLib")
Dim hh_m As MethodInfo = t_sam.GetMethod("ShowX", BindingFlags.Public Or BindingFlags.Static)
hh_m.Invoke(Nothing, New Object() {})
Catch ex As Exception
MessageBox.Show(ex.Message + ex.StackTrace + vbLf)
End Try
I keep getting Object reference not set to an instance of object error with this code
hh_m.Invoke(Nothing, New Object() {})
__BrokenArrow__
24-Jan-13 4:05am
View
By adding this to a click event of a button ...
Dim nitem as new listviewitem
nitem = listview1.items.add(combobox1.text)
'Repeat this for the amount of fields you have
nitem.subitems.add(combobox2.text)
nitem.subitems.add(textbox1.text)
nitem.dispose
NB! Just remember it's much easier to create the columns in the listview in design time
__BrokenArrow__
24-Jan-13 3:56am
View
If you are using let's say an access database you can update the database table like this usin an sql statement an oledb.
Imports System.Data
Imports System.Data.OleDb
Public claas1
Private dbpath As String = "Location of database"
Private dbx1 As String = "Database Password"
Private m_conn As OleDbConnection
Private con_str As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & dbpath & ";Persist Security Info=True;Jet OLEDB:Database Password=" & dbx1
' You can Add as many comboboxes or textboxes as you require
Public Sub SaveData(ByVal cbo1 As Combobox, ByVal cbo2 As As Combobox)
m_conn = New OleDbConnection(con_str)
Dim strInsertSql As String = "Insert Into [tblUsers]([Username], [Password])Values('" & cbo1.text & "','" & cbo2.text & "')"
Dim cmd As New OleDbCommand(strInsertSql, m_conn)
Try
m_conn.Open()
cmd.ExecuteNonQuery
m_conn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message & ex.StackTrace)
Finally
m_conn.Close()
End Try
End Sub
If this is not what you require please let me know
__BrokenArrow__
24-Jan-13 3:44am
View
Do you want to add the data to a dataset then create a datatable or do you want to add the data from the comboboxes to a listview control and then update the datatable or update the database directly?
__BrokenArrow__
24-Jan-13 3:38am
View
Do you mean to put the data in a Listview?
Show More