|
be... sembra che funzioni
Public Function ConvertiHTML(ByVal html As String) As String
Dim out As String
Dim i As Integer
Dim j As Integer
Dim elenco As String()
Try
If html.Equals("") Then
Return ""
Exit Try
End If
elenco = html.Split(CChar(">"))
For i = 0 To elenco.Length - 1
j = elenco(i).LastIndexOf(CChar("<"))
If j > 0 Then
out = out & elenco(i).Substring(0, j)
End If
Next
elenco = Nothing
Return out
Catch ex As Exception
Throw ex
End Try
End Function
|
|
|
|
|
I want to corp an image iin VB 6.0 by giving the coordinates of the place I need to corp and want to save it to another place.
Any one knows how to do it.Please help
A,Miftha Idroos
Trainee Software Engineer.
HNB. Sri Lanka
|
|
|
|
|
Just .NET code but it may help:
<br />
Bitmap newone = new Bitmap(100,100);<br />
Graphics g4 = Graphics.FromImage(newone);<br />
System.Drawing.Rectangle dstRect = new System.Drawing.Rectangle(0, 0 ,100, 100);<br />
g4.DrawImage(screenGrab, dstRect, 30,40,100,100,System.Drawing.GraphicsUnit.Pixel);<br />
newone.Save("C:/thenewone.bmp");<br />
|
|
|
|
|
hi all,
i am using DBnull.value to insert Null value into the data base.
but it is giving me error as
"Object required". can anybody help me .....
thanx
raj
|
|
|
|
|
U confirm the table name i think the table which u r using is not in the db thats y it is giving such an error.
|
|
|
|
|
M Javed Khan wrote: U
M Javed Khan wrote: u r
M Javed Khan wrote: y
Not everyone on the forum is a native English speaker. Please, in the interests of clarity, type words fully rather than use abbreviations such as the above.
Heck! Even although English is my first language - I have difficulty in reading it.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
-- modified at 5:06 Friday 3rd February, 2006
|
|
|
|
|
You have to show a more specific error message and the code that causes the error. From what you have shown it is not even possible to tell if it's a compiler error or a runtime error.
---
b { font-weight: normal; }
|
|
|
|
|
hi
you should check your stored procedures.
and use like this
SqlCommand1.Parameters("@Value").Value = DBNull.Value
!alien!
|
|
|
|
|
How do I prevent the user from typing in the datagrid cells. what property of the datagrid needs to be set?
With Best Regards,
Mayur
|
|
|
|
|
|
Thnx a lot Javed.
With Best Regards,
Mayur
|
|
|
|
|
I've got a Pocket PC (iPaq 2215) running Windows Mobile 2003SE and I just downloaded VB 2005 Express. Will this develop Pocket PC apps? Anyone have an example Browser app for VB05X? I've also downloaded VC#2005X, VC++2005X and VJ#2005X, so if any of these would be better for Pocket PC app development, please let me know. I'm coming from a Delphi/MSAccess background.
Derek Benner
|
|
|
|
|
delphidab wrote: Will this develop Pocket PC apps?
Nope. The Express editions of Visual Studio don't support Mobile development projects. You'll have to get the Professional version of Visual Basic.NET or Visual Studio.NET.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi
i am doing my final year project in vb.net (i am using 2003 version). my project is a learning package which wil demonstrate ospf and eigrp algorithms.
now i can create my routers and endusers by clicking on the buttons at runtime (they are represented by image boxes) and drag and drop them. now i need to set up the links among routers and endusers. ( i want to make them work as in packet tracer software)
i have got some code working for rubber banding but the problem is after i link say 2 routers, i cant get through programming which 2 routers are linked and if i drag one router to a new place on the from, the linked line doesnt go with it, i mean it stays as it was drawn at the first time.
can anyone please help me?
Mahdi H Miraz
Final Year Student
Computer Networks
University of Wales
NEWI Plas Coch Campus
|
|
|
|
|
Create a class that will represent and draw the connector line. It should hold the references of the two objects it needs to connect by a line.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
while i am trying to connect data base using visual basic 6.0 ,i am getting error as "user defined type not defined" .
and in another case :
getting error as "Object required"
thanx
raj
|
|
|
|
|
Can u give the code which is causing probelm? will be help ful to solve ur problem
Regards
Javed
|
|
|
|
|
the code is around 150 -200 lines. can u suggest any idea in connection.
i think problem comming form that side only.
can u give me the process how can i connect ADODB.Connection.
is it enough to declare it as
Dim conn as ADODB.Connection
r any additional thing should i do...
thanx
raj
|
|
|
|
|
Use this
Dim conn As New ADODB.Connection
instead of
Dim conn as ADODB.Connection
|
|
|
|
|
thanx for reply...
again it is giving error as
" user defined type not defined."
thanx
raj
|
|
|
|
|
u can send me ur code by mail so that i can check it
muhammad.javed@yahoo.com
also u may add me in ur messanger
khanofpk@hotmail.com
becuase after looking at code we can see where it can go wrong
Regards
|
|
|
|
|
My ram is getting eaten. The garbage fills up and then empties once my RAM fills. What is wrong with my code?
Imports System.Drawing
Dim startX As Int16
Dim endX As Int16
Dim startY As Int16
Dim endY As Int16
Dim m_Drawing As Boolean
Dim EraserOn As Boolean
Dim MyPen As New Pen(Color.Black)
Dim m_Drawn As Bitmap
Dim pic1 As Bitmap
Dim m_Graphics As Graphics
Dim m_Graphics2 As Graphics
Private Sub lblPaint_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles lblPaint.Paint
RenderIt()
End Sub
Private Sub lblPaint_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lblPaint.MouseDown
m_Drawing = True
startX = e.X
startY = e.Y
End Sub
Private Sub lblPaint_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lblPaint.MouseUp
endX = e.X
endY = e.Y
If m_Drawing = False Then
lblPaint.Refresh()
End If
m_Drawing = False
End Sub
Private Sub lblPaint_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lblPaint.MouseMove
If m_Drawing Then
m_Graphics.DrawLine(MyPen, startX, startY, e.X, e.Y)
startX = e.X
startY = e.Y
m_Graphics2.DrawImage(m_Drawn, 0, 0)
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
pic1 = Win32Util.Win32Window.DesktopAsBitmap
lblPaint.Image = pic1
m_Drawn = New Bitmap(pic1.Width, pic1.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
m_Graphics = Graphics.FromImage(m_Drawn)
m_Graphics2 = lblPaint.CreateGraphics()
EraserOn = False
MyPen.Width = 4
End Sub
Private Sub RenderIt()
'Render Image then place Drawing on top
m_Graphics2.DrawImage(pic1, 0, 0)
m_Graphics2.DrawImage(m_Drawn, 0, 0)
End Sub
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
pic1 = Win32Util.Win32Window.DesktopAsBitmap
RenderIt()
End Sub
This code takes a screenshot and allows me to draw on the label (lblPaint) while the screenshot refreshes.
|
|
|
|
|
Well, for one, you're creating two graphics objects and using them "globally" in your form and never disposing them. This is a VERY BAD idea. Proper practice is to create a Graphics object, use it to draw on your surface, then dispose it. This code needs a SERIOUS "scrap it and rewrite" to get this to work properly.
I take it you're trying to draw "rubber band" line from the MouseDown coords to the MouseUp coords and have it stay painted when your done?
What's up with this timer?
What is this code supposed to be doing?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am trying to take a screenshot of what is behind the form when maximized. The timer just takes screenshots at an interval and continually adds them to the lblPaint. While the screenshots are being refreshed at the timer interval, I am able to draw a freehand line on the lblPaint.
Even still the screenshot won't capture anything behind the form. It captures the form as well.
At this point I am totally confused and I don't know what to do. Please help me
|
|
|
|
|
j_jd wrote: The timer just takes screenshots at an interval and continually adds them to the lblPaint.
That's one of your problems - you are creating too many Bitmap and Graphics objects which all take up memory.
You need to redesign the program and use some basic housekeeping code to clean up the objects you create.
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|