|
|
Ya that is true the best way to learn is MSDN documents , also use the intellisense in Visual Studios , it would be too hard to mention about all attributes , but if you have specific doubts , may be i can help
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|
this is the code i used to draw Rubberband selection on panel..when i draw rubberband selection it's hiding the Shape controls..
please give me the idea..
Thanks
Public Class Form2
Dim Rect As Rectangle
Private Sub Panel1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseDown
Rect.Location = e.Location
End Sub
Private Sub Panel1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove
If e.Button = MouseButtons.Left Then Rect.Size = New Size(e.X - Rect.X, e.Y - Rect.Y)
Panel1.Invalidate()
End Sub
Private Sub Panel1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseUp
Rect.X = -1
Rect.Y = -1
Rect.Width = -1
Rect.Height = -1
End Sub
Private Sub Panel1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint
Dim L, T, W, H As Integer
L = Rect.X
T = Rect.Y
W = Rect.Width
H = Rect.Height
If W < 0 Then
L += W : W = -W
End If
If H < 0 Then
T += H : H = -H
End If
Dim p As New Pen(Color.Black)
p.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot
e.Graphics.DrawRectangle(p, New Rectangle(L, T, W, H))
End Sub
End Class
|
|
|
|
|
THe only thing I can think of that could cause this, is if the Shape Controls are not contained by your panel. It is possible for controls hosted by the form to appear on top of a panel, which is also hosted by the form. Are you sure that the shapes are on the panel?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
i placed after only i test it..it's not working..other you test it the whole code is there just u copy the code and take one panel and take shape controls test it..
Thanks
|
|
|
|
|
Please do a test for me, then let me know what happens.
Run your application, then reasonably slowly, move the mouse pointer over your panel. Do not press any mouse buttons. just reasonable slowly move the mouse across the form.
What happens?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I am trying to create a game in vb that will send data to another computer via the local network. Im lost as to where to start on the data transfer. Anyone have a suggestions as to what transfer would be fast enough for this? UDP,TCP,sockets? Using vb 2003 btw, so winsock is not available as far as i know...
|
|
|
|
|
Your are developing a game and hence , you need a reliable connection (you need to know if you are connected or not , etc ) , would say Use a TCP connection , also u are right there is Winsock control in .net but there is a library stronger than it , it is under the Namespace System.Net , use it , also if you are developing a game may be your are using directx , it also has a component called as direct play , which can be used for communication , i case you are using directx
Let me know if you need more info
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|
I have a problem here with receiving data from the serial COM port. The i received is not in full, example if i suppose to received "password" but u only display pass. I know it is something wrong with my buffer but in my code i did not specified my buffer. have anyone encounter similar problem?? How can i set the buffer size of my data received?
|
|
|
|
|
Hi,
there are latencies (time delays) everywhere: in the target device, in the driver, in intermediate buffers. As a result you typically can't expect to get a DataReceived event and Read() an entire message; instead you may well read half a message, or even more than one message.
There are two easy situations:
1. if messages are far apart (or you have to issue a command before a single message can come), then it suffices to incorporate a delay in between the DataReceived event and the Read() operation. The delay needs to exceed the normal transmission time for the given message length (This method creates a bandwidth limitation).
2. if data is text and each message/line ends on a fixed delimiter (see NewLine property), you can forgo the DataReceived event; instead use a separate thread that calls ReadLine() to get an entire line of text.
In all other cases, you must organize your software yourself such that it knows how to collect bytes and extract messages from them.
|
|
|
|
|
Actually i not sure if the complete output is shown. As i can only see part of it and the other part of it is missing. My buffer is 15 letters and it should be more den enough to fill the output. So if between the data received and read i do a sleep, will it works?
|
|
|
|
|
Subjugate wrote: will it works?
with a larger buffer and more delay, it may or may not receive more data.
If it is binary data, make sure to use a binary Read, not a text-oriented ReadLine which stops at the first CR, LF, NULL.
If it is text data, you might try and receive the data with a terminal emulator (e.g. HyperTerminal) so you can see what gets received.
|
|
|
|
|
i already tried using hyper terminal before using my application. i know what is the result i am expecting but somehow when i used my application, the result i got is not complete. I tried changing some of the code and i test it again and it works and shown the complete result but when i test it the second time rd it fails again. I will show u might data received code below and see if u can help to see whether there is anything wrong with it.
If port.bytesToRead > 0 then
checkforillegalcrossthreadcalls = false
Dimbytetoread as integer
bytetoread = port.bytestoread
Dim array as byte() = new byte(bytetoread - 1)()
Dim linedata as string
port.read(bytearray, 0, bytetoread)
linedata = converttostring(bytearray)
txtcommand.text = linedata
port.close()
|
|
|
|
|
Hi,
your code is no good; it probably would not compile, it certainly will not work
If port.bytesToRead > 0 then
checkforillegalcrossthreadcalls = false <<<<<<< never do this, it is BAD
Dimbytetoread as integer
bytetoread = port.bytestoread
Dim array as byte() = new byte(bytetoread - 1)()
Dim linedata as string
port.read(bytearray, 0, bytetoread) <<<<<<< bytearray or array???
linedata = converttostring(bytearray) <<<<<<< use Encoding.ASCII.GetString
txtcommand.text = linedata <<<<<<< use txtcommand.InvokeRequired pattern
port.close()
|
|
|
|
|
Thanks for all the comment. i know that it is bad to use checkforillegalcrossthreadcalls = false but this is really the last resort as i still cant understand multi-threading. Next, port.read(bytearray, 0, bytetoread), it is bytearray and a few line above should be Dim bytearray as byte.. Sorry for the typo error. Noted for the encoding.ASCII.getstring. thanks for the advise. For the 2nd last line i don't get u.. Care to explain??
|
|
|
|
|
I need a component which can build sql queries and supports drag&drop while building them also highlights the syntax.
I tried to google with these keywords "SQL Query Designer, Analyzer, Builder" but no luck.
|
|
|
|
|
We use these guys - the paid version has a MUCH better SQL parsers. ActvieQuery[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You can try to use Ms Access, it allow you to do drag and drop for tables, while you can still view the SQL syntax,
|
|
|
|
|
hi..
if u r using sql server u have t facility to make query. t thing u hav to do is to select t tables link t tables and pick t fields. t query is ready
Rgrds
Ageesh
|
|
|
|
|
I have tried googling this, but cannot easily find what I require, so I am enquiring of the intelligentsia...
Does anyone know of a website that will give a tutorial on creating, filling, accessing, updating and getting a report from MySQL using VB?
Thanks in advance.
------------------------------------
"Children today are tyrants. They contradict their parents, gobble their food and tyrannize their teachers. I despair for the future."
Socrates 400BC
|
|
|
|
|
Dave,
Not sure what you are trying to achieve, and I have no experience of MySQL so I maybe talking out of my ****, but I'm pretty sure you need to use the System.Data.OleDb namespace. Other than that everything should be the same as if you were using the System.Data.SqlClient namespace.
The only other difference to be aware of is that some SQL Commands are and syntax differ from MS SQL and MySQL.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
VB.NET makes it really easy to get started. What you want to do is build yourself a table adapter and hook some of the GUI controls to it. The only thing that makes MySQL different from any other database is the specifics of the connection string. Once your connected, you really are insulated from the database; you shouldn't care whether it is Oracle, SQL-2005 or MySQL. This is a good thing.
Check this article out from MSDN ...
[^]
|
|
|
|
|
Hi
I have a form, and in this form I have a web browser control, which displays word documents as HTML. This application I have developed runs on my intranet, but what I like to know is, if I hold down the left button of my mouse, and drag it over some text, how do I access the text that has been selected?
This has been baffling me for days, I have tried form events - mouse down and mouse up, but these don't get fired when I run it in debug.
I don't know what I am doing wrong here, but would someone, please, please, tell me what to do? I am really stuck!!!
Thanks
|
|
|
|
|
The browser is not getting the events, Word is. I'm not sure how you get around that, the way you're doing things.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Since you're running Word in a web browser, there are no events to get. There is no way to get at the text that is selected in Word.
|
|
|
|