Multiassignment In VB Like In C-Style Languages?
Feb 22, 2010Is there a way to perform this in VB.NET like in the C-Style languages:
struct Thickness
{
double _Left;
double _Right;
[code]....
Is there a way to perform this in VB.NET like in the C-Style languages:
struct Thickness
{
double _Left;
double _Right;
[code]....
Is there a way to perform this in VB.NET like in the C-Style languages:
struct Thickness
{
double _Left;
double _Right;
[code].....
I'm an inquisitive .NET student without any commercial working knowledge and I have been puzzled by what exactlty are .NET languages meant for? Q1.If you look on job websites, .NET seems mainly used for web applications, not much for Windows applications? (My dream job is to develop standalone small Windows applications.)
[Code]...
visual basic.net is case insensitive so it allows the coder to write without caring or remembering the casing of variables. it also relieves from the 'undeclared variable' errors if you use the variable in another case than the one used in declaration. The fact that its line termination is a line feed makes it even more readable unlike C# or c++ that need good care in the casing and contineous war with following up with the {}, matching them and figuring out which is for which.my question is what are the advantages of c# over vb knowing that both get compiled to MSIL so there is almost no performance difference between the two languages?
View 1 Replieshow i can change the native scrollbar style in my application to my custom style. I can adopt a custom scrollbar to attain this purpose but this will not serve my purpose because i want this attribute in entire application. Like it the text in textbox gets longer than its bounds than the scrollbar appers are my custom bar not the formal ones
View 12 RepliesI set the cell style progromatically on a condition.. but when that condition is no longer met I want to go back to the grids.cell original (default) style property
if x=y then
row.Cells(column.Name.ToString).Style.ApplyStyle(mystyle)
else
[code].....
I am trying to make a style that only gets applied if the parent element of the element that the style refers to, has another specific style. Kind of like in CSS where you can do ".class1 .class2" to specify that the "class2" theme only applies if it is within an element with the class "class1". I do not wish to use any form of external DLLs or libraries for this task. I want to know if it's possible to implement on my own.
I've tried using MultiTriggers with no luck. I have a style that applies to all TextBlocks. I want the textblock to do the following: If the font-size of the textblock is 11 and the parent element's style is "PinnedSuggestion", set the foreground color to "#FF505050". If the font-size of the textblock is 11 and the parent element's style is "Suggestion", set the foreground color to "#FFCCCCCC". The conditions that I have tried to write to make this work, are as follows (the font-size condition is true, but the other one is not). The conditions are inside a style that applies to all textblocks in general.
[Code]...
I am creating an application and am very new to VB. I have 4 buttons on my form which is like my applications main menu. I would like that each of the buttons behaves in the following way when there is a mouse rollover: The Button back color is changed from the default to Red The Button text is changed to Blue, Bold, and increases in font size I would also like all the buttons to go back to their initial state when the mouse leaves.
Another thing, instead of me writing code for each of the buttons event handlers (Mouse Hovers, and Mouse Leaves) is there a way I can write this code once, maybe as a function and then always call it for any button that I create from here on so that any new buttons take on this behaviour.
how to get the current Style of the Windows Xp programmatically. At the program startup I need to get if Windows is running in XP Style or in Windows Classic Style, so I will set my buttons Flatstyle property to flat or standard.
View 6 RepliesBest way to have different languages?
View 4 Repliesi am trying to get the available languages installed in visitors pc's. The problem is that i don't want to get the languages from the internet browser.
View 1 RepliesI´ve been tryed to get more languages in my program.I´ve tryed application settings.
View 8 RepliesWhy use VB over other programming languages?
View 2 RepliesI'm building a website which will have a Spanish and Italian version.
In the past, when building a site which must be available in different languages, I've created a SQL Table like follows:
dbo.News
--------
ID int
EnglishTitle nvarchar(200)
SpanishTitle nvarchar(200)
[Code]....
However, I've found this really time consuming (especially if the client later asks for another language option as a second phase).
What is the best practice for doing something like this, allowing scope for extra languages?
I'm not sure if what I am trying to do is possible, but surprisingly VS2008 seems to let me copy a .cs file directly into my VB.NET project. I then thought that I may be able to use the class in this file directly from VB.NET. However, it doesn't see it when I try to reference it in. Is what I'm trying to do possible, or is VS2008 simply treating the C# file as a resource file or something?
View 3 RepliesSometimes, you see a ComboBox in Windows with languages or countries in it. Is there a component like that in VB.NET? Or can I get the list from Windows?
View 7 RepliesI am currently writing a program and I have all the windows in three languages. Is there any way of quickly changing through the languages? I mean, I can do it manually but the list has like 500+ languages and I was wondering if there was any keyboard shortcut to switch between the used languages, or any way to put a buttom on the toolbar.
View 4 RepliesI need to write a web application that should be available in several languages.
I can think of several way to do this, but I would like some advice on the best method.
1) put a table on the SQL server where each line as a unique ID and a column for the text for each language
2) Do the same as 1 but then use an XML file
3) Put for each language a table on the SQL server with only two columns (ID,text)
4) The same as 3 but in XML files
5) make a DLL with a collection class (read the choosen language from the database and place it in a collection, then use a FIND function)
6) make a DLL with a collection class for each language where the data comes from an XML file in the resource of the project.
Is there a way for me to create multiple projects using different languages under 1 solution in VS 2008? If so, how?
View 3 RepliesI somehow managed to make my company's website in 9 languages, using Visual Studio 2010 / VB / ASP.NET 4.0. I believe I'm using sessions. But you can tell for sure if you see the code provided below. I know this message is long, but I really need help.
It's a multilingual site, and I managed to put flags on the homepage. When I click a flag, the page's text changes to that language. When you click the French flag, it gets the information from the "FR" .resx resource file in my apps_GlobalResources folder. It stays on that language for the end-user's entire session. Great! Well, not so great.
The URL, for instance, about.aspx, remains about.aspx. Granted, the text changes to French, but I've been told that it's recommended to make it look like, if the client chooses French, for example, [URL] (For reference, if anybody is kind enough to delve into this issue, which may be a simple one, all of my files I've used in this are included below -- and they're kinda lengthy)
<asp:LinkButton ID="LinkButton6" runat="server"
CommandArgument="de" OnClick="RequestLanguageChange_Click"
class="flagbutton">
[code]....
I am currently creating a web service in vb.net and I would like to ask the community what is the best way to make this compatible for PHP users and other languages.An example of my code is as follows:
Public Shared Function GetBasketInfo(ByVal sessionid As String, ByRef ds As DataSet, ByVal attributes
As String) As DataRow
If String.IsNullOrEmpty(attributes) Then
Throw New ArgumentNullException("Please supply a manufacturer")[code].....
My question is will this method be compatible with PHP consumption.
visual basic.net is case insensitive so it allows the coder to write without caring or remembering the casing of variables. it also relieves from the 'undeclared variable' errors if you use the variable in another case than the one used in declaration. The fact that its line termination is a line feed makes it even more readable unlike C# or c++ that need good care in the casing and contineous war with following up with the {}, matching them and figuring out which is for which.
my question is what are the advantages of c# over vb knowing that both get compiled to MSIL so there is almost no performance difference between the two languages?
I am trying to allow the user to enter data in any foreign language, (Cyrillic, Arabic,etc.) by entering the data into a textbox.Unfortunatly when I change the language of the test machine it still fills in the US standard ASCII characters instead.
View 4 RepliesI've seen quite a few posts regarding changing cultures, localize cultures, etc... but I couldn't care less about all that auto-stuff.I'm developing this GUI to connect with one of our production machines that will be used by the ppl who will be servicing the machines. Which might well be anywhere around Europe and soon enough Japan and US. Therefore, it was asked already to have language options, cause the guy servicing is likely to be a local.
As I said, auto-stuff doesn't bother me, all I want is the option to go to File -> Preferences and change a drop-down box to whatever language the person fancy and put a My.Settings.Save() I'm planning to create a few simple xml files called "en", "fr", "sp", etc which will be something like: <Frm_Main.Label1>Text of the label</Frm_Main.Label1> The actual problem is: I know the coded strings will have to be manually set, but: Is there a way to cycle through all the UI items (labels, toolstripmenu, buttons, group boxes) to set those .text ?? I'm trying stuff like
[Code]...
Is there any way to convert to english words to any other languages as it typed.for example, if i type "sekar" in a text box it should be converted to "tamil" language.
View 3 Replieshow to launch forms across languages without compiling.
I have a solution with 2 projects. One is VB.NET and the other is C#. The solution will never be compiled. I am using it as a repository of examples on working with the DevXpress grid. I have a few VB.NET examples and one in C#. The demo runs the C# executable. I was wondering if there was a way to show the C# form from VB.NET in the same solution without going to the executable. This is how I am doing it now:
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Dim info As System.Diagnostics.ProcessStartInfo
[Code]....
I tried linking it but either I did something wrong, don't know how to access it or it doesn't work across languages and didn't generate an error.
P.S. If anyone else uses this grid I can post the code, it is mainly for working with combobox columns. I just don't think anyone here uses the grid.
I know VB.NET and i want to develop a program. Which i think later will be open-source if i fail to keep updating it. My question is : Is it possible to build open-source project by using .NET languages ? Or do i have to build open-source projects only using open source languages like Java,Ruby, Python etc ? ( I mean is there any restriction from microsoft on building open-source projects using their langauge and tools ?)
View 5 RepliesIs there any spell checker library for .NET which really supports Arabic script languages? I want to spell check the words in a rich text box in VB.net.
View 1 RepliesCan anyone provide an example of .NET scripting? Some dynamic languages support functions like eval() or compile() than let you compile and execute a string in run-time. VBCodeProvider seems to be a related namespace, but i can't find an example showing how to compile and execute code. Edit: I'm developing a ASP.NET site using VB.NET. Some behavior need to be dynamic and scripted.
View 8 RepliesThis question is more out of curiosity than a project requirement or a problem.I have a Non-CLS compliant code in one language (say C#), and I need to use it like that only in my current language (across projects, so making internal is not a choice), and at the same time want to allow other languages (say VB) to be able to call the conflicting implementations without generating compile time error.
For instance,
//C#
public class SecurityService
[code].....