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
M

maksim310

@maksim310
About
Posts
10
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • STA Error
    M maksim310

    I looked into the error details and it came out with this: System.InvalidOperationException was unhandled by user code Message="An error occurred creating the form. See Exception.InnerException for details. The error is: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it." Source="ScienceProgram_v2" StackTrace: at ScienceProgram_v2.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190 at ScienceProgram_v2.My.MyProject.MyForms.get_mainForm() at ScienceProgram_v2.startExperimentClass.STATUSupdate_MainForm() in G:\ProgrammingFolder\ScienceProgram\ScienceProgram_v2\neededClasses\startExperimentClass.vb:line 1229 at ScienceProgram_v2.startExperimentClass.endExperiment(Boolean& experimentCanceled) in G:\ProgrammingFolder\ScienceProgram\ScienceProgram_v2\neededClasses\startExperimentClass.vb:line 1190 at ScienceProgram_v2.startExperimentClass.sendCommands() in G:\ProgrammingFolder\ScienceProgram\ScienceProgram_v2\neededClasses\startExperimentClass.vb:line 1115 at ScienceProgram_v2.startExperimentClass.repeatingTimer_elapsed(Object source, ElapsedEventArgs e) in G:\ProgrammingFolder\ScienceProgram\ScienceProgram_v2\neededClasses\startExperimentClass.vb:line 1094 at System.Timers.Timer.MyTimerCallback(Object state) InnerException: System.Threading.ThreadStateException Message="Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it." Source="System.Windows.Forms" StackTrace: at System.Windows.Forms.ComboBox.set_AutoCompleteSource(AutoCompleteSource value) at ScienceProgram_v2.mainForm.InitializeComponent() in G:\ProgrammingFolder\ScienceProgram\ScienceProgram_v2\mainForm.Designer.vb:line 843 at ScienceProgram_v2.mainForm..ctor() InnerException: Maybe something here? The only DLLs that I use are the Krypton Toolkit and the DevExpress Xtra editors. Everything else is standard Microsfot stuff. -Max

    modified on Monday, July 14, 2008 4:07 AM

    Visual Basic com help announcement

  • STA Error
    M maksim310

    Hi, I have a main startup form called MainForm and I declared an instance of a class that launches a timers.timer that needs to update the MainForm controls (textboxes, progressBars,...) so I created the following delegate in MainForm: Public Delegate Sub updateMainForm(ByRef neededChannel As Integer) and the following call from the Timers.Timer.Elapsed event: mainForm.Invoke(New mainForm.updateMainForm(AddressOf mainForm.determineIfKeepInAllOrIndividualChannel), New Object() {currentSTATE.CHANNEL}) and I get this error: An error occurred creating the form. See Exception.InnerException for details. The error is: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. I looked into the error and they recommended putting a <STATThread>_ in the Main function but I don't have a main function. If there is a better way to communicate with the MainForm from the Elapsed event then that is fine as well. I'm looking into starting the Timer from a BackgroundThread and keep it alive with Monitor so that I can utilize both ProgressChanged and WorkCompleted, but there must be a simpler way.

    Visual Basic com help announcement

  • First programming language for high school students?
    M maksim310

    Ahh, who cares if it's off topic. We all know he'll go with VB.NET to teach his son. High school kids have the attention span of a hummingbirds on espresso. You start explaining pointers and memory management to him and he'll just decide this is useless and go back to hitting on that hottie in his homeroom. I think giving him a task of building something on ASP.NET, like a social network, will be the best solution. That is actually the biggest problem in programming is that without a project it's just memorization. I learned programming essentially from scratch when at 16 I got an internship at a lab and they said: "build this however you want" and I just went one step at a time with VB.NET.

    The Lounge c++ question

  • First programming language for high school students?
    M maksim310

    You just gotta intriduce yourself not like: "Hi, I'm Mike. I design workflow models using WF on .NET Framework 3.5" But more like: "Hey baby, I just made an application that can make sure your Gucci shoes get to your apartment on time. I gotta go take care of a meeting, kick some ass, show them who the boss is. But give me your number and I'll hit you up later today." Side note #1: DO NOT WEAR short sleeve button down shirts. Side note #2: DO NOT WEAR military style boots, chicks don't dig that stuff. Side note #3: DO NOT TALK ABOUT .NET -Good Luck *and girls on CP, show some love. :rose:

    The Lounge c++ question

  • First programming language for high school students?
    M maksim310

    COnsidering I'm 20 and learned my first computer language in high school by taking a community college class. I think VB.NET is the way to go. I eventually took courses in C, C++, and C# and think VB.NET is the best. I've worked (and still work) in research and corporate and realized that knwoing the .NET framework is very very important. Your son will enjoy the idea of easily building a user interface and the intelliSense will help him in learning. Plus, chicks dig guys who know .NET. -Max

    The Lounge c++ question

  • Progress Window for long mainThread operation, Windows Forms
    M maksim310

    Only 15 or so rows will be seen at once, but the Data Grid View will be displaying all 5000 rows and the user will be scrolling looking for certain patterns. This is a scientific program where users will be generating copious amounts of color-coded rows and will need to detect patterns as they scroll. THe only other way I can think of is to paint them as they scrool by, but that might be too slow as well as constantly hang up the GUI. -Max

    Visual Basic winforms

  • Progress Window for long mainThread operation, Windows Forms
    M maksim310

    So what's the best way to do this then? I'm going to be coloring 5000 data grid view rows different colors, I need to show the user the progress.

    Visual Basic winforms

  • Progress Window for long mainThread operation, Windows Forms
    M maksim310

    Hi, My application requires a long process of going through selected rows in the DataGridView and calculating things, this must be done on the main GUI thread. The user needs to be able to cancel this process but otherwise not have any interaction with the main GUI. I need a popup Progress Window (progressBar, label,cancelButton...) that will tell the user how much of the process is done and give them a chance to cancel. I think I need to create a new thread that will launch a progress window, the progress window will launch a process located on the main thread, and the main thread will comunicate back to the progress window how things are going. I've lookedd for many tutorials but they've all focused on running work on background threads using public variables. Also, I am still very new to programming and this is m first real application. I ask you explain things in as much detail as possible. Thank you!

    Visual Basic winforms

  • Local databse
    M maksim310

    How would it work with ym clients, do they need to install a database software? I want something that is embedded into my aplication that won't require the user to do anything more than install the application.

    Database csharp database oracle sysadmin

  • Local databse
    M maksim310

    Hi, I am writing a program in VB.NET (VS2005 Pro) that essentially simulates an neurology experiment. This program's data shoould consiste of 8 independent tables, each having 13 columns and up to 100,000 rows in each table. To make it simpler, all data will be in string format. Other requirments: 1. The tables needs to be sortable like a dictioanry where 1 column will act as a key. 2. The user needs to be able to see the data in a tabular format. 3. The data must be held on the user's local machine, not a server and not remotley. 4. Needs to easily be readable by Excel, doesn't matter how. It can convert to an XML file and then somehow be automatically converted to xls. I am thinking of using a databse becasue I would like to eventually create a login screen to link previous experiment values to a user, but that is not essential. I used dynamic multi-dimensiaonal arrays but find it difficult to work with, and extremley difficult to sort. I was looking at the idea of using an XML database which will probbaly solve any issues of excel compatability as well as provide support for displaying the information on a website sometime in the future. I can't figure out how this all works. Can anyone recommend a way to display a large amounts of generated data on a local computer, and almo make it save-able. I also like Oracle's 10g Express thing, but don't know if it would work for my specific problem becasue the cusotmer support people at Oracle don't speak English very well. Thank You, Maksim UCLA, Neurology

    Database csharp database oracle sysadmin
  • Login

  • Don't have an account? Register

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