|
The first step is to determine whether your target Operating System versions have Hindi support. The second step is probably to decide whether you just want Hindi output, i.e. Hindi text on the screen or do you want Hindi input, the user enters Hindi text into the application, as well. The second requires more technology than the first. Then you'll probably want to read up on some of the technologies and standard you'll need. Assuming you're using only up to date desktop Windows i.e. XP or Vista you'll probably want to take a look at UNICODE www.unicode.org and then at Microsoft's documentation for UNICODE support in the Win32 API, like DrawText, and possibly at the TSF (Text Services Framework) and at IMEs (Input Method Editors) if you want Hindi input capability.
Once you've got a handle on all this then you can do your design. Just be glad you aren't working on WinCE and trying to deal with 16 languages including Chinese and Korean.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
|
This is an ASP.NET question. You did the right thing when you asked the question there, please don't cross post.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks wanst sure where to put it.
|
|
|
|
|
GDMFSOB wrote: wanst sure where to put it.
So to be absolutely sure to get it wrong, you posted it in both places...
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Hi people,
Does anyone know how to transfer files from one computer to another (not on the same network). I understand that in VB.NET you have the FTP libraries incorporated in the back end, but I'm not entirely sure on how to use them. I've tried this but it doesn't work, yet!
Dim uri As New Uri("file://C:\Documents and Settings\mhomsey\My Documents\Visual Studio 2005\Projects\CareerOneUploader\CareerOneUploader\bin\Debug\GENERATED_XML\Careersmehrmyc20080207.xml")
Dim reader As TextReader = File.OpenText(xmlFileName)
Dim xml As String = reader.ReadToEnd()
If (uri.Scheme = uri.UriSchemeFile) Then
Dim request As FileWebRequest = FileWebRequest.Create(uri)
Dim response As FileWebRequest = request.GetResponse()
Dim reader As New StreamReader(response.GetResponse())
Dim tmp As String = reader.ReadToEnd()
response.close()
End If
The code isn't finished but I just want to be able to send a file from this computer, to another remote computer. Does anyone have the same code?
Thanks very much in advance and I appreciate your help.
Michael
|
|
|
|
|
Well, to send a file via FTP, an FTP server needs to be set up somewhere.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi there i am trying to create a volume control for my mp3 player threw vb.net but seems that i can't find threw the internet i tried to check on here but i don't seem to see any can anyone help me here
Thank you
|
|
|
|
|
What do you want exactly ? A program to set the volume on your computer ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i want a volume control that allows me to mute the mastervolume and control the volume without useing sndvol32.exe its threw vb.net
got any thing that will help
|
|
|
|
|
Never mind about it i created one of my own thanks anyway
|
|
|
|
|
vb.net /framework 1.1
i am printing a string in printpage-event like this:
e.graphics.drawstring(mystring, myfont, mybrush, myrectangleF, new stringformat()) most times the string is so long that it doesn't fit into myrectangleF. how can i find out how many characters of mystring have been already printed into this rectangleF?
|
|
|
|
|
I think the only way to do this, is using a monospace font
like for instance 'Courier New'. Here every character uses
the same pixel width & height, so that you can predict your
Rectangle using the stringlength.
But probably you don't want to use a monospace font?
|
|
|
|
|
no, i don't want to use monospace font.
|
|
|
|
|
What you need to do is use the Graphics object method: MeasureString() to know what the width/height is of your text.
You can specify the maximum width you want the text to extend to and the method will adjust the height accordingly.
Hope it helps!
Richard
may your code be error free.
(okay, maybe two lines.)
|
|
|
|
|
thanks richard. but i think i can't solve my problem like this.
sure, i could easily find out the height of my complete text ( i alreday did that), bit i thinks that doesn't help.
let me explain, what i want to do:
in my app i need to print data:
name & address & some other information (no problem so far)
some description (which varies in length between nothing at all to some pages (taken from a memo-column in my underlying database)
for drawing this description i use the space (as rectangleF), that is left on the page after printing the other stuff like name/address/and so on.
but if the description is longer than the space still available, i have to find out which part of the description did already fit on the page, and what part of that string is left to print on the following page/pages.
i can't figure out a possibility to come to a result with graphics.measurestring. maybe i need to strip down the text line by line, but i tried this earlier and didn't like it at all.
|
|
|
|
|
I see what your getting at now. I did some digging and found that an overload on MeasureString() will output the characters fitted, which should be just what you need!
I've create an example on how to use this feature. Originally I was going to write all of the code in a button handler but it got a little messy. I ended up writing a light wieght class called "StringGenerator" that you can customize. To try this sample, perform the following steps:
1. Create a new class called "StringGenerator" and insert the code below marked: // <<<< StringGenerator Code >>>>>>
1. create a blank form and set it to be the startup form
2. add a button with it's position set to: x=5,y=5
3. double click on the button to generate an event handler.
4. Insert the code snippet below:
'begin code snippet
Dim g As Graphics = Me.CreateGraphics()
Dim sf As StringFormat = New StringFormat()
Dim intY As Integer = 20
Dim originalText As String = "This is very boring text but I don't look at what the text says, I just look at what results the text will bring."
Dim stringG As New MyClasses.StringGenerator( _
originalText, g, Me.Font, New RectangleF(80, intY, 60, 50), sf)
stringG.DrawCurrentString()
While (stringG.HasMoreCharsToDraw)
intY += 60 'in this sample, 60 creates a 10 px padding
stringG.SetNewBounds(New RectangleF(80, intY, 60, 50))
stringG.DrawCurrentString()
End While
'cleanup
g.Dispose()
sf.Dispose()
'End code snippet
Note:This code is still very primitive but it will definitely get you started. If you step through the code, you won't see any output. Remove all the breakpoints to see the dynamically generated graphics. Let me know how it turns out!
' <<<< StringGenerator Code >>>>>>
'insert into -> EMPTY <- class file!
Namespace MyClasses
Public Class StringGenerator
Dim g As Graphics
Dim rectF As RectangleF
Dim sf As StringFormat
Dim fnt As Font
Dim chars() As Char
Dim startIndex As Int32
Dim charsFitted As Int32
Dim linesFilled As Int32
Dim strDisplayText As String
Dim strCurText As String
Dim blnHasMoreChars As Boolean
Public blnClipToNearestWord As Boolean = True
Public Sub New(ByVal text As String, ByRef graphics As Graphics, ByRef font As Font, ByRef rectStartingBounds As RectangleF, ByRef stringFormat As StringFormat)
chars = text.ToCharArray()
rectF = rectStartingBounds
strCurText = text
g = graphics
fnt = font
'set blnHasMoreChars to an initial value of true;
blnHasMoreChars = True
End Sub
Public Sub DrawCurrentString()
MeasureMyCharacters()
'you can write your own custom code here, such as
'allowing a different color input. Don't allow a
'different font because it will mess you measurements up!
g.DrawRectangle(Pens.Red, Rectangle.Round(rectF))
g.DrawString(strDisplayText, fnt, Brushes.Black, rectF, sf)
End Sub
Public Sub SetNewBounds(ByVal rectFBounds As RectangleF)
rectF = rectFBounds
End Sub
Private Sub MeasureMyCharacters()
'This method takes 'strCurText' and measures it with the
'bounds supplied. MeasureString() returns a SizeF object
'but we are only interested in the output generated by the
' 'charsFitted' variable.
g.MeasureString(strCurText, fnt, rectF.Size, sf, charsFitted, linesFilled)
'If amount of chars fitted in rectF is less than
'the number of characters remaining to fit...
If (charsFitted < strCurText.Length - 1) Then
'do we want to clip to the nearest word?
If (blnClipToNearestWord) Then
'we will now loop backwards to find the first
'occurrence of a character separation: " "
For i As Integer = charsFitted + startIndex To 0 Step -1
If chars(i) = " " Then 'is the char a space?
'reduce the amount of characters fitted
'to the first word occurrence
charsFitted = (i - startIndex) + 1
i = -1 'terminate the loop
End If
Next
End If
blnHasMoreChars = True
Else
blnHasMoreChars = False
End If
'create the display contents
strDisplayText = New String(chars, startIndex, (charsFitted))
startIndex = (charsFitted + startIndex)
'assign strCurText the chars remaining to print
strCurText = New String(chars, startIndex, (chars.Length - startIndex))
End Sub
Public Function HasMoreCharsToDraw() As Boolean
HasMoreCharsToDraw = blnHasMoreChars
End Function
End Class
End Namespace
may your code be error free.
(okay, maybe two lines.)
modified on Thursday, February 7, 2008 5:20 PM
|
|
|
|
|
sorry that i come back with an answer that late. have been off for the last days.
thanks for the string generator code (and special thanks for converting it to vb.net - i just wanted to start to do it myself, when i spotted your message modification).
i integrated it to my printing routine, and it worked great. only very little modifications where necessary to make it suit to my needs.
thanks a lot.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Glad to help. Maybe one day you'll pull me out of a fix!
If you could rent a programmer a hour and a half for a dollar and a half, how much would he charge for 10 hours?
|
|
|
|
|
I want to know how to get the files byte codes encrypt them and also able to decrypt
I intent to use a simple encryption algo the XOR operation
But i dun even know how to do it where do i store the files values to and how do i make sure the file gets encrypted.
|
|
|
|
|
Quit re-posting this crap all over the forums. You have gotten answeres in your previous posts. Look at the links provided. You can also use Google to find examples on how to do it. As a developer you need to learn to do research on your own.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
I keep asking questions till they get answered. Bub!!!
|
|
|
|
|
Way to wait 7 minutes between duplicate posts.
duo!@# wrote: I keep asking questions till they get answered. Bub!!!
You mean that you keep asking questions until someone does the work for you. You have been given many suitable suggestions that would get you started on the path of doing it yourself. However, you are too freaking lazy to do it on your own. Part of being a developer is being able to do research, and then applying what you learned to your project. You however, are just asking questions until someone does it for you. Lazy ass.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
In my post did i ask for someone to type out the code for me.Hmmm... let me see NO!!!. Your a real dumb guy. Of course no ones gonna do the code for me. I just asked for simple guide lines to me help out. And one more thing "what u think is not what u think" Bub!!!...
And quite interpreting my posts wrongly. If u can't help buzz off.
|
|
|
|
|
duo!@# wrote: n my post did i ask for someone to type out the code for me.
In your first thread about this question, you give specific instructions on where the code should go and what it should do, but no effort on your side to write any of it.
duo!@# wrote: I just asked for simple guide lines to me help out.
Asking the same question over and over, disregardning the suggestions that you actually get, is not a method that is likely to succeed.
duo!@# wrote: If u can't help buzz off.
Rudeness is a method that is even less likely to work.
Experience is the sum of all the mistakes you have done.
|
|
|
|