15,892,005 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 Python 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 Rizwan Chattha (Top 39 by date)
Rizwan Chattha
27-Dec-15 11:23am
View
But problem is that I want to give setup package to customer for installation. Does have i to change path in each customer,s pc?
I want it to do programatically so that any customer can install it easly.
Rizwan Chattha
3-Dec-15 6:52am
View
Yeah i understand what you mean. It is better to teach how to fix than giving fix. and this code is written by me but wasting too much time on this problem i am looking this problem with each angle. In hard situations some time minds does not work properly. This is my current situation at spot. I hope you can imagine like this type of situation.
Rizwan Chattha
3-Dec-15 6:45am
View
"Inherits System.Windows.Forms.DataTable" using this line icon of my class is changed in solution explorer.
Rizwan Chattha
3-Dec-15 6:30am
View
Don,t care about childish questions. Questions is best way to learn. I think here we are missunderstanding some points. I am trying to create dll file in class library project to use dll file in other projects to save time instead of writing code again and again.
Rizwan Chattha
3-Dec-15 5:43am
View
This code works "Inherits System.Windows.Forms.ListView"
but now new error showing. This line has error "For Each col As DataColumn In dt.Columns"
here dt.Columns
Public Shared Function FillListView(ByVal lvw As LView, ByVal dt As DataTable)
For Each col As DataColumn In dt.Columns
lvw.Columns.Add(col.ToString)
Next
End Function
In above code dt.Columns giving error. It says "Column is not member of DbLib.DataTable.
I tried to inherit it by using below line code
"Inherits System.Windows.Forms.DataTable"
but this line also giving error "Inherits can appear only one in class statemen and can specify only one class".
Rizwan Chattha
3-Dec-15 5:33am
View
This code works into class in case of windows form project. But it is not working only in case of class library project because i want to create dll file.
Rizwan Chattha
3-Dec-15 5:29am
View
I am using vb.net. and how to set class inheriting ListView.
Rizwan Chattha
3-Dec-15 5:05am
View
I changed name to LView but same error still exist.
Rizwan Chattha
3-Dec-15 0:06am
View
But where is query?
Rizwan Chattha
2-Dec-15 11:40am
View
yeah we got after hard work. Now just 3 lines code is needed to write instead of 7 lines code.
Old long code:
'Dim con As New SqlConnection
'con.ConnectionString = "Server = CHATTHA; Database = Test; User Id = sa; Password = pak123"
'con.Open()
'Dim da As SqlDataAdapter = New SqlDataAdapter("Select * from Table1", con)
'Dim dt As New DataTable
'da.Fill(dt)
'DataGridView1.DataSource = dt
New short code
Dim cs As String = "Server = CHATTHA; Database = Test; User Id = sa; Password = pak123"
Dim qr As String = "Select * from Table1"
GridView.ExecuteQuery(Me.DataGridView1, cs, qr)
Rizwan Chattha
2-Dec-15 11:22am
View
Yes now it is working.
I was stuck here "Public Shared Function ExecuteQuery(ByVal GridView As DataGridView)"
I did not put parameter "ByVal GridView As DataGridView".
Thanks a lot to you. You really helped me.
Thanks againg many many.
Rizwan Chattha
2-Dec-15 9:28am
View
In GridView class "GridView.DataSource = dt" is not working. My GridView class code is below
cc.Text = cc.Parent.Name
MsgBox(cc.Text)
'=============================================
Dim con As New SqlConnection
con.ConnectionString = ConnectionString
con.Open()
Dim da As SqlDataAdapter = New SqlDataAdapter(Query, con)
Dim dt As New DataTable
da.Fill(dt)
Form1.DataGridView1.DataSource = dt
I used GridView.DataSource = dt instead of Form1.DataGridView1.DataSource = dt
but it is not working
Rizwan Chattha
2-Dec-15 9:20am
View
when i replace cc.text instead of Form1 it gives error.
Rizwan Chattha
2-Dec-15 9:18am
View
cc.Text = cc.Parent.Name
works fine but now next is what should replace instead of Form1 in below line code.
Form1.DataGridView1.DataSource = dt
Rizwan Chattha
2-Dec-15 9:02am
View
I solved one part of problem. I got form name by using below code
GridView.UpdateControl(Me.Controls.Find("DataGridView1", True)(0))
Result of above line is that it tells this controls is used in form1. Am i right?
Rizwan Chattha
2-Dec-15 8:54am
View
I am using this line code in button2
GridView.UpdateControl(Me.Controls.Find("Form1", True)(0))
but when i press button2 it gives runtime
error "index was outside the bounds of array"
Rizwan Chattha
2-Dec-15 8:51am
View
i replaced Form1 instead of tbForm2 and i replace GridView class instead of myC. and i also solved this error error "Reference to a non shared member requires an object reference." using public shared function. but now it is giving new error
Rizwan Chattha
2-Dec-15 8:46am
View
error is "Reference to a non shared member requires an object reference."
Rizwan Chattha
2-Dec-15 8:46am
View
error is "Reference to a non shared member requires an object reference."
Rizwan Chattha
2-Dec-15 8:44am
View
myC.UpdateControl(f2.Controls.Find("tbForm2", True)(0))
f2 is not working. I put Me instead of f2 and again it is giving error
Rizwan Chattha
2-Dec-15 8:36am
View
In this code where should i change. Please assing some value in below code and post edited code
Dim a As Control
a.Text = a.Parent.Name
MsgBox(a.Text)
Rizwan Chattha
2-Dec-15 8:32am
View
I want to assign currently open form name to a and this code is in class? what should i write in class.
Rizwan Chattha
2-Dec-15 8:28am
View
Please provide tested example. I shall be thankfull to you if you provide easy example.
Rizwan Chattha
2-Dec-15 8:25am
View
If way i am choosing is difficult then what is easy way to acheive goal.
Rizwan Chattha
2-Dec-15 8:17am
View
I shall be very thankfull to you if you post easy example which you mentioned above.
I tried application.openforms-collection
but still i am stuck before this i have not used application.openforms-collection.
Please give some example.
Rizwan Chattha
2-Dec-15 8:15am
View
I tested below code and it gives error object reference not set to an object.
Dim a As Control
a.Text = a.Parent.Name
MsgBox(a.Text)
Rizwan Chattha
2-Dec-15 8:05am
View
Purpose is to shorten code and instead of writing code again and again just use class which is made already.
Rizwan Chattha
2-Dec-15 7:07am
View
Please ask if my point is not cleared.
Rizwan Chattha
2-Dec-15 7:02am
View
So what changing should i do in class that it shall work for any form name and grid view with any name.
Rizwan Chattha
2-Dec-15 7:00am
View
I want to make this class later dll file. So later i don,t want to change this class and i also want to use this class in other projects with many other forms with different form names and also with different GridView names.
Rizwan Chattha
2-Dec-15 6:59am
View
"Form1.DataGridView1.DataSource=dt" works but i want to use this class for other projects without any changing in class.
Rizwan Chattha
2-Dec-15 6:58am
View
I want to make this class later dll file. So later i don,t want to change this class and i also want to use this class in other projects with many other forms with different form names.
Rizwan Chattha
2-Dec-15 6:56am
View
"Form1.DataGridView1.DataSource=dt" works but i want to use this class for other projects without any changing in class.
Rizwan Chattha
2-Dec-15 6:55am
View
Yes i know string does not have property but i don,t know about how to access gridview properties into class. when i write
Form1.DataGridView1.DataSource=dt" it works. but i want to replace Form1 with some variable to use this class in any other projects without changing class again.
Rizwan Chattha
2-Dec-15 6:52am
View
No it does not works
Rizwan Chattha
25-Nov-15 11:25am
View
I have checked many many but each include math subjects. If i am missing some information please guide me.
Rizwan Chattha
26-Jul-15 5:07am
View
vb and c# both are same. Let me check ObFuscation.
Rizwan Chattha
26-Jul-15 4:13am
View
Deleted
I tried mathematical techniques in another application. Password of application is different on each machine. Calculation is made using date and time and seconds. User give me serial number shown on application i put this serial number in keygen made be me at time of developing application. Keygen shows me correct password after calculation and i send it to user.
Again hackers hacked my software again and i scrambling my hairs again
But i don,t know how bloody hackers cracked my software, even there is no password in plain text in application.
Rizwan Chattha
26-Jul-15 3:46am
View
I tried mathematical techniques. Password of application is different on each machine. Calculation is made using date and time and seconds. User give me serial number shown on application i put this serial number in keygen made be me at time of developing application. Keygen give me correct password and i send it to user.
But i don,t know how hackers cracked my software, even there is no password in plain text in application.
Show More