User Profile

Collapse

Profile Sidebar

Collapse
ventsislav
ventsislav
Last Activity: Aug 31 '09, 06:36 AM
Joined: Mar 14 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ventsislav
    started a topic state of an object

    state of an object

    How can I easily serialize (and deserial.) the items in a combo box?

    Code:
        class Program
        {
            static void Main(string[] args)
            {
                Form1 f = new Form1();
    
                f.comboBox1.Items.Add(new object[] {"Item1", "Item2"});
    
                XmlSerializer XmlSerial = new XmlSerializer(f.comboBox1.Items.GetType());
    
                XmlSerial.Serialize(Console.Out,
    ...
    See more | Go to post
    Last edited by numberwhun; Jul 28 '09, 05:00 AM. Reason: Please use code tags

  • ventsislav
    replied to Control access
    I fixed it. Made it static and called it from F2 with Form1.. Thanks!
    See more | Go to post

    Leave a comment:


  • ventsislav
    started a topic Control access

    Control access

    I want to transfer items from the combo boxes (those in F2 are public) in Form2 to those in Form1. Why' s not working like this?

    Form2

    Code:
    public partial class Form2 : Form
    {
        Form1 form1 = new Form1();
    
        ...
    
        private void button1_Click(object sender, EventArgs e)
        {
            form1.comboBox1.Items.Add(this.comboBox1.SelectedItem.ToString());
    ...
    See more | Go to post

  • ventsislav
    started a topic AxWMPLib

    AxWMPLib

    I use this code to repeat my background sound, but it can' t find AxWMPLib._WMPOC XEvents_PlaySta teChangeEvent and tells me:
    "Error 1 No overload for 'BackgroundMusi c_PlayStateChan ge' matches delegate 'WMPLib._WMPOCX Events_PlayStat eChangeEventHan dler' C:\Users\Ventsi slav\Documents\ Visual Studio 2008\Projects\W MGame\WMGame\Ga me.cs 87 13 WMGame
    "

    What reference I have to insert to find this AxWMPLib, because my...
    See more | Go to post

  • ventsislav
    replied to Background Music and Button Sound
    SoundPlayer supports only 1 instance and with threads the problem stands still. Any other ideas?
    See more | Go to post

    Leave a comment:


  • ventsislav
    started a topic Background Music and Button Sound

    Background Music and Button Sound

    I want to have a background music to my simple app and a buton which plays another sound, but when I press the button the sound from it interrupts the background sound. I tried with SoundPlayer and the native PlaySound function but the results were the same. Any ideas how to have a background music and a button sound without using DirectSound? Can you provide me some snippets?
    See more | Go to post

  • ventsislav
    started a topic ToolTip question

    ToolTip question

    How can I make, when I click on a CheckButton a ToolTip to be displayed and when the tick is gone, the baloon too? Some Show/Hide function of the tooltip...
    See more | Go to post

  • ventsislav
    replied to Remove chars from string
    Yes, I know exactly what' s the string like, and that the last 2 chars are needless. But yet thanks!
    See more | Go to post

    Leave a comment:


  • ventsislav
    replied to Remove chars from string
    I did it like this: str = str.Remove(str. Length - 2, 2);
    See more | Go to post

    Leave a comment:


  • ventsislav
    started a topic Remove chars from string

    Remove chars from string

    Hi! I have str = "abv, ". How can I remove the comma and th space at the end faster?
    See more | Go to post

  • ventsislav
    replied to Create a table in *.mdb
    No, no, the loops are only for constructing the name of the table from multiple choices in the comboboxes. I' ll get this combox1.Items.C ount. Thanks!
    See more | Go to post

    Leave a comment:


  • ventsislav
    replied to Create a table in *.mdb
    Ok, it 's like this. I have a form like that below, and assemble the following code.
    So I understood it, but what I need to do, to make a table in the file created?



    Code:
    FileInfo MyFile;
    SqlConnectionStringBuilder ConStrBuilder = new SqlConnectionStringBuilder();
    static SqlConnection Con = new SqlConnection();
    SqlCommand Cmd;
    SqlDataReader DataReader;
    
    ...
    ...
    See more | Go to post

    Leave a comment:


  • ventsislav
    replied to Create a table in *.mdb
    OK. I have an empy *.mdb. Then in the code I have:

    SqlConnection con = new SqlConnection;
    SqlCommand cmd = con.CreateConne ction();

    Then what I do with these? I mean if I want to create table called 1A in the mdb how these help me?
    See more | Go to post

    Leave a comment:


  • ventsislav
    started a topic Create a table in *.mdb

    Create a table in *.mdb

    Hi! Ok, I have existing *.mdb with nothing within. How can I create an empty table with a name "1A", for example? I heard about some connections... I don' t know.
    See more | Go to post

  • ventsislav
    started a topic folder in the project

    folder in the project

    How can I save file in the dir "Data", which I add to the project earlier. My project' s called Sol1, so here' s the code I' m using:

    Code:
    private void OK_Click(object sender, EventArgs e)
        {
            RegFile = new FileInfo("Sol1.Data." + MyCombo.SelectedItem.ToString() + ".mdb");
    
            for (int i = 0; i < 23; i++)
            {
                if (RegFile.Exists
    ...
    See more | Go to post

  • ventsislav
    started a topic endless array

    endless array

    How can I make an endless array of PictureBox, because I don' t know how many objects will be made in runtime?

    Thanks.
    See more | Go to post
No activity results to display
Show More
Working...