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
D

dazinith

@dazinith
About
Posts
312
Topics
104
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Formatting or Encoding a multiline textbox?
    D dazinith

    i figured out a way to do it.. not sure if its the right way, but it seems to work for what i need it for..

    string strTemp = myTextBox.Text;
    string strCorrect = strTemp.Replace("\n", "<br>");

    that will make it go through the text and replace all the end of line characters with <br> hope that helps! still a newb.. cut me some slack :P -dz

    ASP.NET question

  • Formatting or Encoding a multiline textbox?
    D dazinith

    If a user enters data into a multiline textbox (like the one im typing in now) how can i store the line breaks? in other words, if i just use myTextBox.Text it is all one long runon, even if i have a few blank lines like this: i am storing this textbox, then displaying it.. i want the line breaks to exist as they did when the user entered the text.. not a long runon.. do you know what i mean? is it something simple? thanks for the tips. still a newb.. cut me some slack :P -dz

    ASP.NET question

  • Grrr.. Tell me you dont use wordwrap!?
    D dazinith

    are there any online standards that might list information about using multiple lines instead of wordwrap? my co-worker thinks im just harping on him.. some ppl are just so stuborn! still a newb.. cut me some slack :P -dz

    The Back Room question lounge

  • Grrr.. Tell me you dont use wordwrap!?
    D dazinith

    good god you had me rollin on the floor!:laugh::laugh: still a newb.. cut me some slack :P -dz

    The Back Room question lounge

  • Grrr.. Tell me you dont use wordwrap!?
    D dazinith

    thanks for the suggestion, i will look into it.. and no im not his project manager, but he prolly needs one :) still a newb.. cut me some slack :P -dz

    The Back Room question lounge

  • Grrr.. Tell me you dont use wordwrap!?
    D dazinith

    good point.. thats what i normally do.. if its a ways past the limit then ill break it up a bit.. the auto-indent is really useful for that.. thanks for your 2 cents.. i just explained it how you did and i think i might be making progress :) still a newb.. cut me some slack :P -dz

    The Back Room question lounge

  • Grrr.. Tell me you dont use wordwrap!?
    D dazinith

    yeah you can turn on wordwrap.. just most ppl dont still a newb.. cut me some slack :P -dz

    The Back Room question lounge

  • Grrr.. Tell me you dont use wordwrap!?
    D dazinith

    you know, when a line is so long it wraps it around to the next line.. commonly used in reading text files.. still a newb.. cut me some slack :P -dz

    The Back Room question lounge

  • Grrr.. Tell me you dont use wordwrap!?
    D dazinith

    Okay, i may not be the best coder in the world, but i have taken alot of courses and have some experience, etc.. but this guy i work with has only recently begun coding and has had no formal training.. and he uses wordwrap!? does anyone use wordwrap when coding? his idention is impossible to read! are there any notable coders on here who like wordwrap when coding?! its not really a programming question.. altho it kinda is.. hope its off topic enough :) still a newb.. cut me some slack :P -dz

    The Back Room question lounge

  • C# Application Programming
    D dazinith

    i couldnt follow most of your question, but maybe this will help.. you should set focus to the control (textbox, etc.) that you want to have the initial focus.. create an OnLoad() handler for your mainform, and after the panel is displayed call:

    this.myPanel.Focus();

    or in your OnLoad() of the panel call

    this.myTextBox.Focus();

    still a newb.. cut me some slack :P -dz

    C# question csharp tutorial

  • delay or producing a gap
    D dazinith

    Thread.Sleep(1500);

    will cause a 1.5 second pause before going to the next line of code.. still a newb.. cut me some slack :P -dz

    C# help csharp c++ winforms com

  • Creating Tab Forms
    D dazinith

    i am not sure about any tabbed form articles, youll have to search.. but they are built into windows.forms.. they are listed in your toolbox as 'TabControl'.. you should be able to use it pretty easy.. and here is the cursor question

    Cursor.Current = Cursors.WaitCursor;
    // do whatever
    Cursor.Current = Cursors.Default

    still a newb.. cut me some slack :P -dz

    C# question tutorial learning

  • mouse position relative to the whole screen?
    D dazinith

    i am using a mouse move message handler which is passing in System.Windows.Forms.MouseEventArgs e.. the problem is that e.X and e.Y are both relative to the current control which is calling the message handler.. how can i get the mouse position relative to the entire screen, not the control thats calling it? something like clienttorect or something? thanks! still a newb.. cut me some slack :P -dz

    C# question help

  • Dialog Event? Refresh attempt.
    D dazinith

    once you come back from the dialog you need to call whatever function you have which populates your combobox with values from your database.. something like:

    private void buttNew_Click(object sender, System.EventArgs e)
    {
    frmCreateProblemReport cpr = new frmCreateProblemReport(this.conns);
    if (cpr.ShowDialog() == DialogResult.OK)
    PopulateComboBox();
    }

    just make sure that since you are populating the combobox multiple times that the PopulateComboBox() function begins with:

    cmbPRNumber.Items.Clear()

    just because you call a dialog and you know what you want it to do with the data entered doesnt mean your other form will instantly reload everything.. you have to tell it to.. hope that helps.. still a newb.. cut me some slack :P -dz

    C# database question

  • Welcome dialog when app starts?
    D dazinith

    my guess is that if you just called Focus() it would get focus back Form1.Focus(); thats my guess :) still a newb.. cut me some slack :P -dz

    C# csharp json question

  • where did my toolbox form controlls go???
    D dazinith

    the toolbox has several sections in it including: Data Dialog Editor Components Windows Forms General if you are in the General section all you will see is 'Pointer'.. also make sure you have a dialog selected to edit like another user pointed out. still a newb.. cut me some slack :P -dz

    C# csharp tutorial question

  • Welcome dialog when app starts?
    D dazinith

    ah.. i was wondering why i had to refresh the form to make it show.. i guess i can see how having another thread could help them both.. especially if you wanted your loading form to have some sort of animation or something.. btw, i wasnt offended, i honestly wanted to know the purpose :) still a newb.. cut me some slack :P -dz

    C# csharp json question

  • Welcome dialog when app starts?
    D dazinith

    if you look back at my code you'll see that the Thread.Sleep(1500) is just to pause for a second.. i know nothing is going to happen during that time.. right above that is where i load all of my stuff.. i just pause so that the splash screen is showed for at least a second, it serves no other purpose and can be removed. this is all in my constructor for my main form.. what is the benefit of creating a thread just to show and close the dialog when you could just show and hide the dialog around the section of code that does your loading?

    AboutBox myAboutBox = new AboutBox();
    myAboutBox.Show();
    myAboutBox.Refresh();
    // **************** SPLASH SCREEN UP *********************

    // do all of your loading here <--- this is where i do all my loading..

    // sleep for a second and a half so it at least shows for a second.
    Thread.Sleep(1500); // <---this can be removed, its not necessary, i just do it

    //// Required for Windows Form Designer support//
    InitializeComponent();

    myAboutBox.Hide();
    myAboutBox.Dispose();
    // **************** SPLASH SCREEN DOWN *******************

    still a newb.. cut me some slack :P -dz

    C# csharp json question

  • Welcome dialog when app starts?
    D dazinith

    here is what im using in my apps:

    AboutBox myAboutBox = new AboutBox();
    myAboutBox.Show();
    myAboutBox.Refresh();
    // **************** SPLASH SCREEN UP *********************

    // do all of your loading here

    Thread.Sleep(1500); // sleep for a second and a half so it at least shows for a second.

    //
    // Required for Windows Form Designer support
    //
    InitializeComponent();

    myAboutBox.Hide();
    myAboutBox.Dispose();
    // **************** SPLASH SCREEN DOWN *******************

    i find that you need to call the Refresh() before doing anything cpu intensive or it might not show cause its too busy processing other stuff.. still a newb.. cut me some slack :P -dz

    C# csharp json question

  • How to tell if something is selected in my listbox?
    D dazinith

    doh, should have thought of that one :) thanks a ton! still a newb.. cut me some slack :P -dz

    C# question tutorial
  • Login

  • Don't have an account? Register

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