|
OK. I think it's pretty obvious just by reading the error message. You're missing a column in your DataTable("Main_table") that you included in your SQL statement.
|
|
|
|
|
Thanks Mr. Dave,I have solve the problem. I make a mistaken on the DataGridView1.Column1 header name. So I change it to the original name and it works now.
Thanks alot to Mr. Dave and everyone reading here.
Regards
Drex
|
|
|
|
|
hii all..how to type a label vertically?
|
|
|
|
|
Change the label to a graphic and rotate the graphic
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
actually i want to do is the label can be display like this:
L
A
B
E
L
1
instead of LABEL1
by the way..thanks alot for your help..
|
|
|
|
|
well I'm sure you can alter the code from those articles.
My first idea would be to make a custom control inherited from label.
Then on the textchanged event set the height of the label (and width)
Then draw the every letter (make an array with the split function) on the control.
Haven't done it myself but it shouldn't be that hard to do.
If I have time I'll see what I can come up with once I'm home
|
|
|
|
|
oke thanks..but i dnt know how to do that.. ,but i will try tonite,,thanks alots,,have a nice day!!!
|
|
|
|
|
Public Class VerticalLabel
Inherits Label
Public Sub New()
Me.AutoSize = False
End Sub
Public Overrides Property AutoSize() As Boolean
Get
Return MyBase.AutoSize
End Get
Set(ByVal value As Boolean)
MyBase.AutoSize = False
End Set
End Property
Protected Overloads Overrides Sub OnPaint(ByVal e As PaintEventArgs)
Dim graphics As Graphics = e.Graphics
Dim text As String = Me.Text
Dim width As Integer = 0
Dim height As Integer = 0
Dim textBrush As Brush = New SolidBrush(Me.ForeColor)
For Each c As Char In text.ToCharArray()
Dim sw As Single = graphics.MeasureString(c, Me.Font).Width
If sw > width Then
width = sw
End If
Dim sh As Single = graphics.MeasureString(c, Me.Font).Height
height += sh
graphics.DrawString(c, Me.Font, textBrush, 0, height - sh)
Next
Me.Width = width
Me.Height = height + 2
End Sub
Private Sub VerticalLabel_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.TextChanged
Me.Refresh()
End Sub
End Class
This should do what you want (very basic so you might want to add a bit, like an option to set it to vertical or horizontal,...)
|
|
|
|
|
oke, how about multiple label???
|
|
|
|
|
????? multiple label?
I gave you a custom control just copy past the code into an empty class file.
Build you solution and you'll have an extra control in you toolbox which you then can drag onto you form as many times as you want
|
|
|
|
|
Just rotate the monitor 90° right.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Actually still wouldn't solve his problem but still funny
|
|
|
|
|
look at this...
Application.Restart()
if i use this,the application will restart..but i dnt want the application to restart?
any idea?..plss..txxx..
|
|
|
|
|
You would need to write a Reset method that manually re initialises all your objects and variables
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Why are you reposting same question[^]?
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
hi ,
i have a question about events in vb.net ,
im looking for a similar functionality to c# event registering ,
like how could i "unregister" an event during run time and then register it back.
for example in c#
myclass.myEvent -= new MyEvent(myHabdler);
[code block , that i dont want the event will fire]
myclass.myEvent += new MyEvent(myHabdler);
thank you for your time!
Net
|
|
|
|
|
Hi,
I suggest you read up on the AddHandler and RemoveHandler methods. They serve that very purpose.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Thank you its exactly what i was looking for.
Net
|
|
|
|
|
hi, i've written a few applications using vb.net, and they all work fine on my computer, but after copying into another computer, there is always one error or the other. sometimes, the applications woulnd't even start up at all. i've seen other applications that people developed using vb.net, i've downloaded some from the internet and they dont seem to have any problems... how do they do it?
how can i make my vb.net applications run on other computers without an error message???
|
|
|
|
|
|
yea, i've tried that. it only solves error at start up. but... how can i distribute the application without a setup? for example, there an application i downloaded, it had just the .exe and some .dll files... no setup or anything, and the application works just fine! i want to be able to distribute ma applications just like that. i wrote a little yahoo multi messenger patch application... the application is too little to create a setup for it. so what can i do?
|
|
|
|
|
There are several aspects to consider in development and deployment. Just think about the following ones at least.
Hardware and software is a broad subject. I have no doubt that evey developer has faced with such problems because development is not as easy as we think. There is no perfect software and even hardware and definetly there is no expert one to solve every type of problem. The problems are time depended to be solved.
We all make mistakes and therefore we draw something from the story we experienced not to fall into it again.
Targeted OS is important (32 bit / 64 Bit)
The frame work is importand (for example you developed an app with .Net frame work 3.0) if the user doesn't have this framework in his/her system, he suppose to download it to make your app running.
Whichever library you use during the devlopment make sure that you have to also include this libraries in deployment package. Some time you use your own ones but sometime you use the ones which belongs to OS.
Consider the security issues and make sure that OS will allow you to install your app.
Surely you will come over the problem soon.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
i search for visual basic code that i can use in a macro to copy tables to excel sheet...
from : http://www.nhl.com/scores/htmlreports/20082009/PL020875.HTM
i want to automate the extraction process in my excel macro to do it several times from similar pages with different datas and do a analysist of the data. i want to keep same format as in the web page
can you please help me?
i can pay for help
please reply!!!!!
modified on Sunday, February 22, 2009 3:53 PM
|
|
|
|
|
There is a computer competition in our school , programming with Visual Basic , but they didn't specified which version of Visual basic is gonna be used , and due to their .... computers , everything is possible , even VB2002(3) ( not sure which version really exits !! )
right now i'm learning C# , but I want to learn some Basic for this competition . If i start learning VB.NET 2008 syntaxes , can i use them in 2005 and 2002(3) versions too ? what is the real difference between them ?
17 years old, new to C# and programming
|
|
|
|