|
That's VB6 code. Although the syntax in VB.NET is very similar, it's a completely new language.
Here you see that most of the properties that you try to use simply doesn't exist any more:
MSDN Library: Graphics for VB6 users[^]
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks i'll check it out. hopefully what i'm trying to do is fairly easy
Mr Oizo
|
|
|
|
|
Thanks i'll check it out. Hopefully what i'm trying to do is fairly easy
Mr Oizo
|
|
|
|
|
I managed to sort out what i needed using the following code. Unfortunately if i use it on a button in the paint event it clears the text off the button and the button isn't raised off the form like normal.... Any ideas on how i can fix that?
Dim rec As Rectangle = New Rectangle(0, 0, Me.Width, Me.Height) 'create a new recatangle<br />
<br />
'Create a new brush. Make is a Gradient style brush.<br />
<br />
Dim myBrush As Brush = New Drawing.Drawing2D.LinearGradientBrush(rec, Color.Silver, Color.SteelBlue, Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal)<br />
<br />
'draw the gradient onto the form.<br />
<br />
e.Graphics.FillRectangle(myBrush, rec)
Mr Oizo
|
|
|
|
|
Your prior post said you were trying to do that to a form.
No, if you override the paint event of a button, you're going to have to do all the painting yourself, including the text and all the button states - mouse over, pressed, etc. What you're doing is painting over the button and only painting the background.
If you want pretty gradient/glass buttons, there are tons of articles here on Code Project that will show you how to do that.
The early bird who catches the worm works for someone who comes in late and owns the worm farm. -- Travis McGee
|
|
|
|
|
Thanks dude. I'll look around. If you know of any links i can click then please post them here. thanks again
Mr Oizo
|
|
|
|
|
Hi Guys
Can you any one have idea how we will creating set up for VB application including Desktop Shortcut.
There is any third party s/w to create set up file for vb app.
Regrads
Subash
Subash
|
|
|
|
|
Check out these links:
Link 1
Link 2
You always pass failure on the way to success.
|
|
|
|
|
how to convert pdf to html? by using source code
karthi
|
|
|
|
|
|
please read the sticky note on how to ask questions. All the questions here are about VB.NET, how does that help ?
A web server can serve a PDF directly. If you want to convert it to HTML, you need a PDF that contains text, not just images, otherwise there is little point. Even then, I'm not sure that any component exists, although components to return the text itself certainly do. There is no support for PDF in .NET, it's all via commercial libraries.
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 sir, for your information !!!!
Happy Programming
-----
Abhijit
|
|
|
|
|
I am trying to do a barchart from data in a csv file in vb 2k3. I can write the required data to the csv file, but from here i am totally stuck and don't know which way to turn.
Any help or advise would be greatfully welcome.
Regards
Zeldacat
|
|
|
|
|
You need to either write code to draw a chart, or use a commercial or free library that does it for you.
If you want to write it yourself, read up on the Graphics and Bitmap classes.
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 )
|
|
|
|
|
http://www.zedgraph.org[^]
If you can read the csv file in yourself (and honestly, that should be trivial), ZedGraph has some awesome charting capabilities, including bar charts.
The early bird who catches the worm works for someone who comes in late and owns the worm farm. -- Travis McGee
|
|
|
|
|
Hi,
Can anyone tell me the solution to this problem. I have built a procidure wrapped in a class that takes a parameter.This procidure is called normally by starting a thread. When an event occures, it is required to call the procidure with new paramater.
A code snippet would be like this.
Private Sub btnReceive_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReceive.Click
remote = New RemoteConnection 'this is the class
trListen1 = New Thread(AddressOf remote.ReceiveMessage)
remote.msg = "Message has been received."
trListen1.Start()
End Sub
Private Sub btnChange_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnChange.Click
If trListen1.IsAlive = True Then
trListen1.Abort()
Else
remote = New RemoteConnection
trListen2 = New Thread(AddressOf remote.ReceiveMessage)
remote.msg = "Message has been received,answer is here."
trListen2.Start()
End If
End Sub
But this does not work. How this can be handled?
Thanks.
reman
|
|
|
|
|
Hi Reman,
What you are trying to do is reasonably clear, however...
Amer Rehman wrote: But this does not work.
is not.
How does it not work? Is an error thrown, or what? If so, at what point in this code? etc?
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi!
I'm beginner to VB.net & SQL server. I am doing a project in VB.net 2003 & SQL Server 2000. I don't konw the back up coding. please tell me.
_kalgi_
|
|
|
|
|
How is it that a VB.NET beginner is using SQL Server and trying to write mission critical code for backing up data ?
Which bit are you stuck on ? How much SQL and VB do you know ?
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 )
|
|
|
|
|
If I understand you correctly you are asking how to backup your VB project code.
If I am correct in my assumption then all you need to do is backup the appropriate folder and all its contents within the projects folder.
So if your project is called UseTheForce the path to backup will be something like:
C:\Documents and Settings\HP_Administrator\My Documents\Visual Studio 2005\Projects\UseTheForce
This holds everything relating to your project.
I hope I got the right end of the stick and that this is of help...
You always pass failure on the way to success.
|
|
|
|
|
|
You must use DMO. In this sit you can find source code about DMO
|
|
|
|
|
how can i send a right click event to my application and more over can i get any help how can i simulate double click event in that same application.I want help in VB.net for these events any clue how can i impliment them
farah
|
|
|
|
|
Why do you want to ? Send them from where ? The obvious thing to do is to write a method that is called by your right click event, and call it when ever else you need to.
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 )
|
|
|
|
|
i just want to code a right click that works the same way as normal right click funtion does that is when i right click on any control in VB.net or over any where else outside my VB.net application it performs the right click function i want to write the code in VB.net but i am new to VB.net environment so i am having problem in coding it and i am also having problem to code double click event too .
farah
|
|
|
|