Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

BuckBrown

@BuckBrown
About
Posts
231
Topics
98
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How do you restrict textBox entry?
    B BuckBrown

    Fine Mike, you win. I wont bother picking your brain anymore. I dont understand why you insist on being such an asshole.

    Managed C++/CLI question csharp c++ visual-studio

  • How do you restrict textBox entry?
    B BuckBrown

    Yes, I've read that documentation and as usual when it comes to Microsoft they assume you are a WINDOWS programmer (worst operating system ever invented). Notice how they don't show you how to do it they just tell you to do it. That being aside, I AM using an event handler for when the keys are pressed (that is how I can recognize when the (+) and (-) keys are pressed with Keys::Add and Keys::Subtract), the question is how do you keep it out of the textBox->Text String? I guess I just have to let the character get added to the text string and then search the text string for the character I just typed and then delete it from the string. Buck

    Managed C++/CLI question csharp c++ visual-studio

  • How do you restrict textBox entry?
    B BuckBrown

    Hi, I'm using Visual Studio 2005 C++/CLI. This should be an easy one. I have a textBox that has some number in it. When I press the (+) or (-) key on the far right keypad I can use ::Keys::Add and Keys::Subtract to recognize that those keys had been pressed and I can increment and decrement the number, and then put number.ToString() back in the textBox but the "+" or "-" character gets added to the textBox (and I don't want that). How do I restrict the characters that can be added to a textBox->Text String^? Thanks, Buck

    Managed C++/CLI question csharp c++ visual-studio

  • What is the proper way to add a form to an existing class?
    B BuckBrown

    Hi Mike, Just so you know, I first learned programming using assembly on a state of the art Intel 8085 and our operating system was CP/M (that's what it was called before Microsoft bought it and renamed it MS-DOS). Over the years I have been forced to learn various programming languages on Data General, VAX, UNIX, and MS-DOS boxes, but all of the OO stuff was invented long after I got out of college. So the fact that I'm an over 50 microelectronics engineer with a EE degree and not a new Computer Science graduate, I can state with confidence that with the exception of Object Oriented Design Principles I've never heard of any of those terms before (nor whatever MVC means). You even mention a "presentation layer". I have never heard anyone use that term before. IO, User Interface, GUI sure, but "presentation layer"? I don't understand what you mean by "you don't tightly couple a class with the presentation layer". Visual Studio's forms designer seems to make things very tightly coupled. Anyways, if you could dumb down your responses for me that would be cool. Thanks, Old Buck And my applications always work and do what they were designed to do.

    Managed C++/CLI design question csharp c++ visual-studio

  • What is the proper way to add a form to an existing class?
    B BuckBrown

    Hi. I'm using Visual Studio C++/CLI. I have a well developed class that now has a need to have a user interface for it. Normally I will determine if I need a form associated with a class when I create the class, so the class is created as a System::Windows::Forms::Form. But now I have a class that I did not think would need a form associated with it so it was defined as a simple C++ ref class. What is the proper way to add a form to the class? Should I create a new UI Forms based class and cut and paste everything in my existing class into it? Or is there a simple way to instantiate a new form as a method of the existing class? Thanks, Buck

    Managed C++/CLI design question csharp c++ visual-studio

  • Why is BinaryWriter() is inserting unwanted bytes?
    B BuckBrown

    Hi, I'm using Visual Studio 2005 C++/CLI. I have a requirement that needs to write some ASCII to a file followed by binary data. I set up a BinaryWriter(FileStream) and everything is okay except that there is a byte preceding the String^ variables denoting the number of characters to follow. I do not want these "extra" bytes in the file. Is there a way to surpress these bytes from being written to the file? Thanks, Buck

    Managed C++/CLI csharp c++ visual-studio question

  • Can I use FOR EACH on an array of structures?
    B BuckBrown

    Hi, I'm using Visual Studio 2005 C++/CLI. I would like to access an array of structures using the for each construct. Is this possible? Buck

    Managed C++/CLI csharp c++ visual-studio data-structures question

  • Landscape property does not appear to work.
    B BuckBrown

    Answer to my own question. It is this->printDocument->DefaultPageSettings->Landscape = true before calling the printDialog->ShowDialog();

    Managed C++/CLI csharp c++ visual-studio graphics sysadmin

  • Landscape property does not appear to work.
    B BuckBrown

    Hi. I'm using Visual Studio 2005 C++/CLI. I have setup my application to print a document (basically the screen). I had to set the e-Graphics->PageScale = 0.85 to get the screen to fit the page, but I need to have every page be of Landscape orientation. I have tried this->printDocument->PrinterSettings->DefaultPageSettings->Landscape = true and this->printDialog->PrinterSettings->DefaultPageSettings->Landscape = true (and some slight variations) but the document is always printed as set in the print dialog (which defaults to Landscape - Portrait). Is it because there are more than one printer on our network? Do I have to read the array list of InstalledPrinters and determine which one I am using and change the orientation that way? Thanks, Buck

    Managed C++/CLI csharp c++ visual-studio graphics sysadmin

  • How do you reset StreamReader? There is no seek function.
    B BuckBrown

    Thanks Robert, Yes, that works. The key here is the sr->DiscardBufferedData() otherwise the sr->BaseStream->Seek() function does nothing. Buck

    Managed C++/CLI csharp c++ visual-studio data-structures question

  • How do you reset StreamReader? There is no seek function.
    B BuckBrown

    Hi. I'm using Visual Studio 2005 C++/CLI. I have a file that has its contents read into an array, one line of the file per element of the array. There may be 10 elements to read or 10,000 elements to read. I would like to define the array size dynamically by reading each line of the file, counting until all the lines are read. Then I want to go back to the begining of the stream but there is no Seek() function. I tried streamReader->Close() and then another streamReader = gcnew StramReader(fileStream) but that doesn't work. Can I reset the streamReader back to the beginning? Thanks Buck

    Managed C++/CLI csharp c++ visual-studio data-structures question

  • Can you suspend the OnPaint function?
    B BuckBrown

    Thanks, I must b have a flaw in my flow. I tried using a flag to no avail. I will try again.

    Managed C++/CLI csharp c++ visual-studio help question

  • Can you suspend the OnPaint function?
    B BuckBrown

    Hi, I'm using Visual Studio 2005 C++/CLI. I have a Paint() function in my Form1 that has code to paint the screen in a block nested in an if statement. System::Void Form1_Paint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e) { if(myObject) { code to display screen } } This works fine when the constructor for myObject is called and an OpenFileDialog is used to read a file that can finish building the object. Since the Paint() function is called continuously, the code to display the screen is not executed when myObject is undefined, but when myObject is finished being instantiated then the display code executes. My problem is when I select "Cancel" in the OpenFileDialog I can stop building the myObject but the constructor completes (thus becoming NOT undefined) and the code to display the screen executes and tries to paint a bunch of undefined stuff and bombs the app. I've tried using a variable myObject->bValid in the above if statement but then the app bombs because the object reference was not set to an instance of an object. Is there a way to suspend the Paint() function so that I can do all of my preliminary stuff and then say "okay, start painting."? Thanks Buck

    Managed C++/CLI csharp c++ visual-studio help question

  • Can you use Forms Designer to index controls?
    B BuckBrown

    Hi, I'm using Visual Studio 2005 C++/CLI. I have a data entry Form that has 50 TextBox controls. The Forms Designer gives these controls the names textBox1, textBox2,.....textBox50. When I check to make sure none of the fields are null I have to write code for each of the 50 controls. It would be nice if I could loop through textBox(n) controls. Is there any way to do this? Thanks Buck

    Managed C++/CLI csharp c++ database visual-studio question

  • How do you change the Build Action property of an icon?
    B BuckBrown

    My full version number is 8.0.50727.42. I bet it does not match yours. Have a great Memorial Day weekend.

    Managed C++/CLI visual-studio csharp c++ hardware help

  • How do you change the Build Action property of an icon?
    B BuckBrown

    I tried switching to solution because I have added the icon file to the project a half dozen times now. There simply is no Build Action property to be found.

    Managed C++/CLI visual-studio csharp c++ hardware help

  • How do you change the Build Action property of an icon?
    B BuckBrown

    The previous post was when I was within the project and I AM CHOOSING ICON FILE. If I highlight the Solution and select 'Add New Item' an 'Add New Item - Solution Items' dialog box appears and I can select 'Icon File' and add it to the 'Solution Items' folder. Right clicking on this icon file and selecting Properties now displays a PropertyGrid that has 5 properties listed... (name), Active Config, Description, Path, and Startup Project, but NO Build Action.

    Managed C++/CLI visual-studio csharp c++ hardware help

  • How do you change the Build Action property of an icon?
    B BuckBrown

    Hi Mike, I'm also using VS 2005 Professional. I read your reply as "Click on Project, Click on Add, Click on New Item". If I click on Project the menu has 'Add Class', 'Add New Item', and 'Add Existing Item'. If I click on 'Add New Item' I get an 'Add New Item' dialog Box that has 'Categories:' and 'Templates:'. Under 'Categories:' I select 'Resource' where an 'Icon File (.ico)' template shows in the 'Templates:' window. I can select that and add it and it appears in the Solution Explorer in the Resources folder. In the Solution Explorer if I right click on the icon file and select Properties from the context menu I don't get a PropertyGrid, I get an icon.ico Property Pages dialog box that list 'Configuation Properties' and 'Custom Build Setup' in a tree structure (much like when I go to Solution/Properties or Project/Properties). This is so typical for me to have the odd flavor of a Microsoft product. What say you? Buck

    Managed C++/CLI visual-studio csharp c++ hardware help

  • How do you change the Build Action property of an icon?
    B BuckBrown

    Hi, I am using Visual Studio 2005 8.0 C++/CLI. I am getting a strange error when I try to set the Icon property of a Form. I can change the Icon property and compile but when I run the app it bombs on the line... this->Icon = (cli::safe_cast(resources->GetObject(L"$this.Icon"))); I have read in forums that I need to change the Build Action property of the icon file to Embedded but I cant find any Build Action property. It seems my VS 2005 is different than other versions. Does anyone know the correct procedure to get this icon embedded into my solution/project? Thanks, Buck

    Managed C++/CLI visual-studio csharp c++ hardware help

  • Copied solution will nor recognize application icon
    B BuckBrown

    Just to let you know, I have figured out a seven step process that I can use to consistantly be able to copy and rename entire solutions but that isn't what I need to do to correct this icon problem that give me an error on the line... this->Icon = (cli::safe_cast(resources->GetObject(L"$this.Icon"))); There was a Microsoft .NET article "http://msdn.microsoft.com/en-us/library/ms950960.aspx" talking about this very subject and another forum had a solution for this problem. The solution is to add the icon as a resource and then select the incon file's Build Action property and change it to Embedded. My problem now (as it always is with Microsoft) is that my VS 2005 does not have the same Forms or properties as these examples and the icon file I imported does not have a Build Action property. I will post again as a Build Action problem. Sorry, it would have been nice to provide you with a link to the MS article but I don't know how to do that. Thanks

    Managed C++/CLI question csharp c++ visual-studio announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups