Jump to content

hey guys i recently installed the tiral version of visual studio on my laptop to start coding again before univeristy and when i ran the program i created to test it i was meet with a blank pop up. there are no errors on the build and everything seems to in in working order

 

Capture 1.PNG

Capture 2.PNG

Capture.PNG

Link to comment
https://linustechtips.com/topic/833760-blank-screen-when-solutuion-is-run/
Share on other sites

Link to post
Share on other sites

1) can you show us the source code?

2) how is what you are seeing different than what you expected?

3) what have you tried so far?

Gaming build:

CPU: i7-7700k (5.0ghz, 1.312v)

GPU(s): Asus Strix 1080ti OC (~2063mhz)

Memory: 32GB (4x8) DDR4 G.Skill TridentZ RGB 3000mhz

Motherboard: Asus Prime z270-AR

PSU: Seasonic Prime Titanium 850W

Cooler: Custom water loop (420mm rad + 360mm rad)

Case: Be quiet! Dark base pro 900 (silver)
Primary storage: Samsung 960 evo m.2 SSD (500gb)

Secondary storage: Samsung 850 evo SSD (250gb)

 

Server build:

OS: Ubuntu server 16.04 LTS (though will probably upgrade to 17.04 for better ryzen support)

CPU: Ryzen R7 1700x

Memory: Ballistix Sport LT 16GB

Motherboard: Asrock B350 m4 pro

PSU: Corsair CX550M

Cooler: Cooler master hyper 212 evo

Storage: 2TB WD Red x1, 128gb OCZ SSD for OS

Case: HAF 932 adv

 

Link to post
Share on other sites

5 hours ago, JimmyJimJam said:

hey guys i recently installed the tiral version of visual studio on my laptop to start coding again before univeristy and when i ran the program i created to test it i was meet with a blank pop up. there are no errors on the build and everything seems to in in working order

 

From the top of my head I can assume that you're missing InitializeComponent() call in your constructor.

Try, fail, learn, repeat...

Link to post
Share on other sites

  • 2 weeks later...
On 12/09/2017 at 6:48 AM, zwirek2201 said:
On 12/09/2017 at 5:21 AM, reniat said:

1) can you show us the source code?

2) how is what you are seeing different than what you expected?

3) what have you tried so far?

From the top of my head I can assume that you're missing InitializeComponent() call in your constructor.

public partial class Frm_speech : Form
    {
        SpeechRecognitionEngine recEngine = new SpeechRecognitionEngine();
        
        public void form1()
        {
            InitializeComponent();
        }

        private void btn_enable_Click(object sender, EventArgs e)
        {
            recEngine.RecognizeAsync(RecognizeMode.Multiple);
            btn_disable.Enabled = true;
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            Choices commands = new Choices();
            commands.Add(new String[] { "say hello", "print my name" });
            GrammarBuilder gBuilder = new GrammarBuilder();
            gBuilder.Append(commands);
            Grammar grammar = new Grammar(gBuilder);

            recEngine.LoadGrammarAsync(grammar);
            recEngine.SetInputToDefaultAudioDevice();
            recEngine.SpeechRecognized += RecEngine_SpeechRecognized;


        }

        private void RecEngine_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
        {
            switch (e.Result.Text)
            {
                case "say hello":
                    MessageBox.Show("Hello Jamie. How are you?");

                    break;
                case "print my name":
                    richTextBox1.Text += "/nJamie";

                    break;

            }
        }

        private void btn_disable_Click(object sender, EventArgs e)
        {
            recEngine.RecognizeAsyncStop();
            btn_enable.Enabled = false;
        }
    }
}
 sorry for taking so long to get back to you two, this is the code im using at the minute.  

Link to post
Share on other sites

1 hour ago, Tech N Gamer said:

First, why are you using Visual Studio in Trial Form, you know there's a community version that's free, right? I'll provide a link here (Links to the download page).

Second, what language is this taking place in, by the looks of things it looks like C#, I just want to verify so that way I know what to look for. I want to know the language so that why I can better understand what's going on. Also, I know your using .NET, but that's not a language.

Third, can you please use the code tags? Example:


[code]
System.out.println("Hello World")
[/code]

 

Im currently using the visual studio 2017 and i now have a linence for it thought my university. 

 

im using c#  for the programming.

Link to post
Share on other sites

15 hours ago, Tech N Gamer said:

Okay, so what I've been thinking is that it might be a layering issue. I don't know since I don't have all the files and it seems that the code you posted doesn't seem to have an issue.

do you know any way of correcting it?

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×