|
You can actually create a new 1bit bitmap and draw your 24bit image onto it, if you want to see what sort of conversion you get by default. However, Dave has given you a link if you wanted to control the threshold yourself.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I wanted to make a little VB.Net app to detect the caller phone number
(I'm talking about a windows application)
any way I tried some of articles in this site it helped a little bit
,but the problem that the Caller Phone Number doesn't show up
I thought there is something missing the code....
so I tried a "Demo" of an application just to test it,
and what happed to my code happed to that app
Caller Phone Number doesn't show up
ok here is the deal
I heard from some one on the internet
(I'm so so so sorry that I can't find him any more)
I heard that not all "Modems" are able to detect the caller phone number
so ......
if any one know something about this please tell me
if some one knows what kind of modem I should use (what type and its company)
thanks in advance
|
|
|
|
|
That is correct: not all modems have CallerID functionality.
A Google search revealed this page[^] which seems to contain reviews of modems that do support Caller ID.
Good luck.
|
|
|
|
|
Hi Everyone:
I have two questions:
1. I saw a trick using the Matrix class that will shift the Y-axis origin (0,0) from the top left hand corner to the bottom left hand corner. Can anyone provide the code for this? I can’t remember where I first saw it.
2. After I reset the Origins I would like to draw a grid pattern on the form. I would like the grid pattern to be adjustable. Does anyone know where I can find an example of this for VB.NET?
Thanks in advance,
Quecumber256
|
|
|
|
|
1. The origin is not moved on the form. It's moved (mathematically) when your object is being drawn. The transformation alters the coordinates of the drawn object, not the coordinates of the drawing surface.
You can see an example of this here[^]. This particular example just moves the origin down and to the right 50 pixels. Look into the other methods exposed by the Transform class to move and orient the origin how you want.
2. This is a simple loop, For...Step...Next . The Step value is your "adjustibility". For exmaple, drawing line every other pixel would be:
For I As Integer = 0 to 500 Step 2
....
Next
|
|
|
|
|
Hi Dave,
Thanks for the response. While I was waiting on an answer I continued to search the web and found the code using a Matrix to swap the y-axis to the bottom-left corner on the screen.
Unfortunately, solving this problem lead directly into another. The new problem is:
I'm playing around with a GDI+ application using VB.NET. I have written a small Windows application that will allow me to place a rectangle at the screen's origin (top-left corner of the screen). After the rectangle is placed I can point to it with my mouse and by holding down the left button move the selected rectangle elsewhere on the screen.
This only works when the Y-Axis' location is at the top-left hand corner. I used a matrix transformation to reset the Y-Axis' origin to the bottom left hand corner. This time when I draw a rectangle it is placed at the bottom-left hand corner, but when I place my mouse on this rectangle it will not highlight saying this rectangle has been selected.
The strange thing is: If I move the mouse back to the top-left corner where the default origin is the rectangle at the botton-left corner will highlight and when I press the left mouse button and move the mouse down the selected rectangle moves up. This is not how I want it to work. I have the project if you need it to see exactly want is happening.
I wrote this for another discussion group, but I thought you would be interested in the problem that cropped up when I reset the origin to the bottom-left corner of the screen.
Thanks,
Quecumber256
|
|
|
|
|
Like I said before, the transformation applies ONLY to the DRAWING of that particular object. It does NOT apply to mouse coordinates, nor does it apply to "hit testing" mouse coordinates in objects, nor does it apply to locating controls on the screen. As far as Windows is concerned, the object is right where it's supposed to be, in the top-left corner of the screen.
|
|
|
|
|
|
How can i get a list of properties name from a class in a array? ("one", "two", "three")
Public Class Numbers
Public Property one
End Property
Public Property two
End Property
Public Property three
End Property
End Class
Iv'e been sitting searching 4 hours... can't figure it out... plz help.. thanks in advance
H3rman
|
|
|
|
|
Hi,
have a look at System.Type.GetProperties
|
|
|
|
|
i would like to ask if anyone have any example of tcplistener and tcpclient both as stand alone application to pass me? As i can only find file that combine them together online. I need to test them out on 2 seperate pc before i can progress in my project. Thanks for the help.
|
|
|
|
|
|
But is there a different between a chatting application and a sending of data application? Because what i looking for is send of data.
|
|
|
|
|
Text is data, you are sending bytes of information from a client to a server which is destributed to all connected clients.
I think it is exactly what you are looking for. If it isn't, google[^] will still help you better then anyone here can/will.
|
|
|
|
|
|
Sorry to disturb again.. For the link u pass me.. Is it possible for the server to reply to the client? Because for the current project it is not possible.
|
|
|
|
|
Using delegates and events it is possible
|
|
|
|
|
But there isn't any code inside the server that allow reply right? So can u advise where can i go and find the reply source code and construct a delegate?
|
|
|
|
|
I don't understand what you mean, "that allow reply". The server code has events inside it to notify the clients of new messages, and to update their view. Everything should be inside there and you're not going to get any much better as an example then that.
|
|
|
|
|
Ya i know what u mean. Create a delegate and when a event is raise run the delegate right? But for the server part i didnt notice any code which allows reply. Can u tell me which part of the code do a reply? They do not have any stream.write on the server side..
|
|
|
|
|
Dude, did you even READ[^] the bloody website? It says, and I quote
http://vb.net-informations.com/communications/vb.net_chat_server.htm wrote: When a Chat Client connected to Server , the Server create a new Thread for communication . Here we implement a Class handleClient for handling Client as a separate Thread . The Class handleClient has a function doChat() is handling the communication between the Server side Client Socket and the incoming Client Socket.
READ it and analyze the code better. Look at the broadcast method to see how it sends a message to users that a new connection has been established. If you can't figure it out with all that's layed out in front of you then you won't be able to do it at all.
|
|
|
|
|
I already edited on the code i have and the server do reply to its client but somehow the reply was not the expect result. Somehow the 1st request and reply are correct but the 2nd request and reply onward the application skip the 1st 2 letter of wat i type. I dont understand which part have i gone wrong. I have posted my code, pls advise on my mistake. Thanks a lot.
Private Sub doChat()
Dim infiniteCounter As Integer
Dim requestCount As Integer
Dim bytesFrom(10024) As Byte
Dim dataFromClient, DataToClient As String
Dim sendBytes As [Byte]()
Dim serverResponse As String
Dim rCount As String
requestCount = 0
For infiniteCounter = 1 To 2
infiniteCounter = 1
Try
requestCount = requestCount + 1
Dim networkStream As NetworkStream = _
clientSocket.GetStream()
networkStream.Read(bytesFrom, 0, CInt(clientSocket.ReceiveBufferSize))
dataFromClient = System.Text.Encoding.ASCII.GetString(bytesFrom)
dataFromClient = _
dataFromClient.Substring(0, dataFromClient.IndexOf("$"))
msg("From client - " + clNo + " : " + dataFromClient)
rCount = Convert.ToString(requestCount)
serverResponse = "ok"
sendBytes = System.Text.Encoding.ASCII.GetBytes(serverResponse)
networkStream.Write(bytesFrom, 0, serverResponse.Length)
msg("From Server - " + serverResponse)
DataToClient = networkStream.Read(sendBytes, 0, sendBytes.Length)
broadcast(dataFromClient, clNo, True)
broadcast(serverResponse, "Server", True)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
Next
End Sub
|
|
|
|
|
Sorry Can't help you, I don't have the time to audit your code right now. Debug it and you'll find the error.
|
|
|
|
|
In a VB.NET application I have changed the roaming property of an user setting from false to true.
If I run the application the setting is now written (through my.settings.save) to the roaming user.config, but if I restart the application the setting is still being read from the local user.config !
Only if I delete the entry (manually) from the local user.config, then the setting is being read from the roaming user.config.
Somewhere in MSDN I read that if there were duplicate settings in local and roaming, the roaming one should override the local; in my case this seems only true for the writing of the setting.
Is this "bug" Microsoft's or mine ?
|
|
|
|
|
I'm looking for an example of how to obtain the two colors used in the gradient to the left (where the icons are) in the .NET style menus. I've tried to figure this out using the APIs for uxtheme.dll, but as I'm quite new to this it doesn't make much sense to me.
|
|
|
|