|
|
hello
i have a form in vb.net and i want to change the text of the controls in other language using xml but i have a problem:after i changed the text in controls the size of the controls is not the same.
thanks
|
|
|
|
|
The controls are resizing themselves because that's their default behavior. Click on each control and, in the Properites window, look for the AutoSize property and change it to False.
The problem with this is that you run the risk of the controls new text exceeding the size of the control, cutting off portions of the text.
For more information on how it's normally done, see this[^] on MSDN.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I have an app with several dialogs, that I have disabled the controlbox. Works fine on my development machine. However when I installed at a customer site, I found that the dialogs did not show properly - the lower 25% of the dialogs were 'cut off'. I checked the screen resolution, all machines have XP.
All the other windows show fine, just the ones without the controlbox are the problem.
|
|
|
|
|
Hi,
Perhaps you are facing the same problem I once encountered, when part of the controls on my form just fell outside the edge of the form on a certain PC, but not on any other.
On the problem PC, please check: Display Properties > Settings > Advanced > General > Display > DPI Setting.
In my case this was set to larger than Normal size (96 DPI) . If this is the case for you too, just set it back to normal, and try your app.
Good luck,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
I discovered a common thread in the two windows that had probelms: I set controlbox to false.
Once I set the controlbox to true, the entire window was visible!
Thanks for the input.
|
|
|
|
|
Here is my function. It opens XML file and reads a value that associated with a key. However, it is giving me "Invalid Operation" error. I couldn't figure out where the hack error is. XML file is residing under my currentdirectory where the application is. If you tell me the solution, I would really appreciate it.
Private Function GetConfigParameter(ByVal MyKey As String) As String
Dim XmlDocument As New XmlDocument
Dim XmlNode As XmlNode = Nothing
XmlDocument.Load(Environment.CurrentDirectory & "\app.con")
XmlNode = XmlDocument.DocumentElement.SelectSingleNode_("//configuration/AppDefaultValues/add[@key=""" & MyKey & """]")
GetConfigParameter = XmlNode.Attributes.GetNamedItem("value").Value
XmlDocument = Nothing
End Function
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
You can start by NOT naming your variables the same as class names, for example:
Dim XmlDocument As New XmlDocument
is a bad idea. This is because you can give yourself a headache wondering why the compiler is complaining about Static and Instance members, when your code looks correct.
Change the names to something less confusing...
Private Function GetConfigParameter(ByVal MyKey As String) As String
Dim doc As New XmlDocument
Dim node As XmlNode
' It's a bad idea to use CurrentDirectory, simply because the current directory
' can change during the execution of your app.
doc.Load( Path.Combine(Application.StartupPath, "app.con") )
node = doc.DocumentElement.SelectSingleNode("//configuration/AppDefaultValues/add[@key=""" & MyKey & """]")
Return node.Attributes.GetNamedItem("value").Value
End Function
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks Dave I will look at it...
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Hello,
Is it possible to use the GridView Component in VB.NET?
If yes how can I add it to my project?
Thank you,
Eric H.
|
|
|
|
|
Which version of VB.NET (.NET Framework) are you using? GridView showed up in the .NET Framework 2.0, and it should be in the ToolBox. You add it to your Web Form just like any other control.
Anything further and you'll have to provide more detail as to what the exact problem is.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am using VB.NET (Framework 2.0)
The problem is this component is a web component. Therefore, I don't see it in the toolbox list. I tried to add it as a part of the toolbox but I didn't success.
Eric H.
|
|
|
|
|
If your writing a Windows Forms app, then it wont show in the ToolBox. GridView only works in an ASP.NET app. It's in the ToolBox under the Data tab ... or did I miss something in your posts??
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
You understand write, I am writing a windows form application.
What can I use instead GridView?
Have you got some example to use the instead component?
Thank you much
Eric H.
|
|
|
|
|
ayeleteric wrote: You understand write, I am writing a windows form application.
This is the first time you mentioned that.
ayeleteric wrote: What can I use instead GridView?
Windows Forms uses the DataGridView. Again, under the Data tab in the ToolBox.
ayeleteric wrote: Have you got some example to use the instead component?
The Web has thousands of them. All you have to do is Google for "VB.NET DataGridView tutorial".
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
My problem is to open design view of report so that end user can design report acording to his choice...
is it possible to open design view of rdlc or crystal report at runtime to give control to end user.
sweety
|
|
|
|
|
the string contains some value eg. a,b,c,d,e
I want to replace 'a' to 'f'. can we do it and if yes please guide me as how to doit?
thanx
Taher
|
|
|
|
|
Use the Replace method of the String class, see [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
You can't actually change a string. The Replace method returns a *new* string with the values changed.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
How can we get data or characters which is present on image.Actually i have captcha images in .JPEG extension and from that images i have to remove noise, extract the characters and then i have to convert the extracted characters in to string.So please give some idea how to proceed further.
|
|
|
|
|
There's a reason why it's noisy and distorted. It's so that you CAN'T use automation to get those characters!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hai Dave,
The image is noisy because, the image is a captcha image as you know there will be noise in captcha image.I have captcha images with JPEG extension, i have to remove noise from captcha image and after that i have to extract characters from captcha image.
please give reply it would be help full for me.........
regards,
Balu.
|
|
|
|
|
What did I just get done telling you?? You CAN'T DO THAT because CAPTCHA was designed specifically to defeat what you're trying to do!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave i understood what u have suggested me.
ok removing noise is difficult, but give some idea how can i extract data from captcha image.Give reply if u have idea about extracting data from image.
Regards,
Balu.
|
|
|
|
|
What part of "YOU CAN'T DO THAT" don't you understand?
The text in those images is deliberatly wavy a filled with noise so that no OCR software can read it. You can't get the text in a CAPTCHA image because there's no technology out there that can read it!
That's the whole point behind CAPTCHA!! It's a test to determine if a machine is trying to access a website or if its a human doing it. The machines will always fail this test because there's no way they can make out the text in the image.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|