jaberwacky Posted January 8, 2014 Posted January 8, 2014 (edited) Hello. I want to find the value of this variable: LOCALE_NAME_MAX_LENGTH. So I went searching the net but can't find it. SO I thought I'd actually fire up my copy of Visual Studio Express. So I created a form that has a textbox and a button that when clicked will display some text in the textbox. Which works until I tell it to display the value of LOCALE_NAME_MAX_LENGTH. Does anyone know where I went wrong? Edit. Sorry. The errors are: Error 1 'If', 'ElseIf', 'Else', 'End If', 'Const', or 'Region' expected. Error 2 'LOCALE_NAME_MAX_LENGTH' is not declared. It may be inaccessible due to its protection level. And the code is: #include <Windows.h> Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click TextBox1.Text = LOCALE_NAME_MAX_LENGTH.ToString() End Sub End Class Tried putting the include inside the form1 class too. Edited January 8, 2014 by jaberwocky6669 Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
Richard Robertson Posted January 10, 2014 Posted January 10, 2014 VB.Net doesn't work even remotely like C++. Including a header file isn't valid in VB.Net. It's also worth noting that LOCALE_NAME_MAX_LENGTH isn't a variable. It's a preprocessor directive and is treated as the literal value it represents. You need to actually write a C/C++ application to use it in a program, or search the headers for the directive manually. jaberwacky 1
jaberwacky Posted January 10, 2014 Author Posted January 10, 2014 Oh gosh. The cringe. It hurts!!!!!! Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
Richard Robertson Posted January 11, 2014 Posted January 11, 2014 I'm not sure if you're complaining about having to use C/C++ or were disappointed in my answer.
jaberwacky Posted January 11, 2014 Author Posted January 11, 2014 Oh, I was embarrased for such a dumb question. Sorry for the confusion. I should have clarified. I don't mind having to use c++. I don't have experience with visual c++ and so I'm not sure how different it is though. I'll find out when I get there. Thank you for taking the time to answer my question! I did look up possible solutions but I'm pretty sure that I even found some "answers" which contradict yours. I think those were jokes played on noobs though. Thanks for not playing jokes on me. =) Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
Richard Robertson Posted January 12, 2014 Posted January 12, 2014 If you show me the links to these "answers" as you put it, I can clarify them for you. I can also help you look up that constant if you need help with that too.
jaberwacky Posted January 12, 2014 Author Posted January 12, 2014 I'm ok now, I forgot why I even needed that. Lemme see, ... oh because I was interested in adding some functions to the UDFs till I found out that yashied had already beaten me to them with _WinAPIEX. Thank you though, appreciate it! Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now