|
Choose an easier task and do that first, buy a book and work through it.
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 )
|
|
|
|
|
Christian Graus wrote: buy a book and work through it
Illegally download a book and work through that.
------------------------------------
"Children today are tyrants. They contradict their parents, gobble their food and tyrannize their teachers. I despair for the future."
Socrates 400BC
|
|
|
|
|
When making connections ensure that you put the database on the Bin folder, then under the properties of the database ensure that you make changes to copy as new or other options in changes of the database.hope it help
|
|
|
|
|
Does anyone know how to get the raw HDBC handle from a VB ODBC SQL server connection.
I have written a c++ dll that reads an encrypted password, decrypts it and then does an sp_SetAppRole on the database handle to switch roles, but I need to extend this model to some VB applications.
I prefer the decryption to occur in the dll so the VB programmer cannot see the decrypted password in the debugger (yes, advanced developers could step through the assembler).
Ideally I can continue to use the same dll and pass the VB database handle to the dll but I cannot find how to get the raw database handle in VB. It must be there somewhere?
Thanks
Stephen Woods
Reserve Bank of Australia
Sydney NSW Australia
|
|
|
|
|
It's there, but not exposed anywhere. AFAIKT, there's no way to get to it.
|
|
|
|
|
Dear ALL
CAN I use RTMP in my uni. project of "video conference desktop application in vb dot net"
please guide me .
Thank you very much
|
|
|
|
|
Sure, if you like.
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 )
|
|
|
|
|
Dear ALL
CAN I use RTMP in my uni. project of "video conference desktop application in vb dot net"
my guide me ???
|
|
|
|
|
Hi,
I am completely new to .NET 3.5.I came across a code in vb.net which I am not able to understand. Below is the code
<flags()>
Public Enum ModemStatusBits
ClearToSendOn = &H10
DataSetReadyOn = &H20
End Enum
<structlayout(layoutkind.sequential,pack:>
Private Structure DCB
Public DCBlength As Integer
Public BaudRate As Integer
Public Bits1 As Integer
End Structure
<dllimport("kernel32.dll")> Private Shared Function WaitForSingleObject( _
ByVal hHandle As Integer, ByVal dwMilliseconds As Integer) As Integer
End Function
here what does he mean by putting something in <> before enum,struct,Function
Thanks in advance
|
|
|
|
|
These are called attributes, this not something very new , the code above seems to use a native windows API (Windows API can be considered as functions provided by OS , to be able to program the OS), This Windows API are present in the dll files Kernel32.dll , GDI32.dll, etc , so in above code we are using attribute "<dllimport("kernel32.dll")>" to tell the compiler that we want to use a windows function WaitForSingleObject() which is present in Kernel32.dll , in the same way we want the compiler to allocate the memory in sequential order hence use an attribute <structlayout(layoutkind.sequential,pack:> (the reason for this sequential allocation is a different topic , let me know if you want details regarding the reason , for now I will skip it )
Hope this make things clear, let me know if you need further information
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|
Hi Bharat
Thanks a lot for replying so soon. I want to know in detail about this feature attributes.How to use that and what are the advantages.
If you dont mind can you give a url or some tutorial describing about this.
My mail id is poornachandarv_004@hotmail.com
Thanks a lot
|
|
|
|
|
|
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()
|
|
|
|