Jump to content
Xtreme .Net Talk

aewarnick

Avatar/Signature
  • Posts

    1052
  • Joined

  • Last visited

Everything posted by aewarnick

  1. Here is the issue: I created my own listbox that requres an initialization variable be sent to it. The designer does not automatically put that in, so I have to edit the initialization in InitializeComponent for this listbox. I pass a vaiable to it when it is created: MyListBox lb=new MyListBox(4); The problem is that when I go back to the designer it restores the initialization to the way it was- thus, really messing thing up and making me angry. Is the any way to tell the designer to put certain code in the initialization of a variable? Or maybe a way to tell the designer not to modify that variable? Or another idea?
  2. Invalidate() may work.
  3. "then call Show() not Visible" Sorry, forgot that Show makes Visible true. It is just easier. Thanks for reminding me compturon. Look into the Process class. Lot's of posts here about it. Do a search.
  4. System.Threading namespace create a new thread for either the other process or the gif. You may have to play the gif on your own without using the picturebox and use your own control, implementing the new thread there.
  5. Form frmMediaPlayer=new frmMediaPlayer(); frmMediaPlayer.Show();I don't know what VB would be but there is how I would do it in C#. It is very similar in VB. If you just look around the code you will see examples.
  6. Mike Bailey, I disagree. I think C# is easier to learn. It just seems more logical to me and the best part- it's much less wordy.
  7. First you have to create an instance of frmMediaPlayer and then call Show() not Visible.
  8. Seems like a bug to me. I did do that. But I didn't use it because it will stay on top of all windows. What I ended up having to do is executing the code that the main form ran in the waitform instead. That fixed the problem. And in the waitform itself the thread works great! Thanks dynamic.
  9. I'm having the same kind of problem. void SaveWbmpList() { waitFormThread=new Thread(new ThreadStart(waitFormShow)); waitFormThread.Start(); a.Files.WriteBinary(thisDir+"\\Data", this.wbmpList); } void waitFormShow() { WaitForm wf=new WaitForm(); wf.ShowDialog(this); wf.BringToFront(); }The WaitForm is a Form I am using to display while a file is being serialized to disk. The problem is that it never stays in front of the program while saving. And when it does come to the front, it never shows the whole form and never runs the code in the form! I have a progress bar on it hooked to a timer. Also, at the times it comes to the front, when it is done saving, it does not stay in the front. Even when in the WaitForm code I have for each time the timer ticks: void incrTimer_Tick(object s, EventArgs e) { this.BringToFront(); this.Focus(); this.progressBar1.Increment(1); }
  10. This is a good forum. You are welcome here. Don't be shy...
  11. try using the Invalidate() sub of the listbox to repopulate it. On your activating the Form1 issue. There are a couple ways of doing it. In Form2's constructor require a Form be sent to it. public Form2(Form f) { form1Ref= f; //form1Ref is a global variable. } Then in Form2's Closed event use form1Ref.Focus(); OR When you create Form2 set it's Owner property to Form1 (this for C#, me for VB). Then in Form2's Closed event use Owner.Focus(); OR You could just use the Activated event of Form1. The problem with that is it will be called every time the Form is activated.
  12. That sounds like C++.net, but I hope you are right for my sake!
  13. As far as I know, C# is just like VB.net except syntax. Maybe you mean C++.net.
  14. Thanks Nerseus! I have been looking for something like this for a long time!
  15. I think I had the same error when I tried to do the same kind of thing and I gave up. Maybe you will break through!
  16. There are many threads about this same thing on this forum. You must create a new Bitmap and then get a graphics obejct from the Bitmap. Not the picturebox.
  17. Ok, that fixed it, but BlueVelvet was my favorite. Please let me know when the bug is fixed.
  18. When I want to view my subscribed threads and a search list I can only view the first page. When I click the arrow or a number it just goes to the first page again???
  19. I have looked all over for what we want and found nothing that worked. If you find something, please, let me know.
  20. You can create a Graphics object FROM an image. Then use it to draw ON the image. Then you can save the image.
  21. What kind of error is this? A runtime error or a compile error?
  22. I don't think you will get any takers here on this topic. Look into The set of classes called CxImage. It is c++ but but if you can get someone to compile it into a dll for you, it is free. I have not yet persued making the dll, or else I would post it.
  23. You don't need that mask stuff in .net. Use the MakeTransparent(Color c) method of the Bitmap.
  24. I think it would give a null reference exception. But you can check each parameter before it is used in the method: if(bitmap != null && imgOutPut != null) { if(imgOutPut.Width > 0 && imgOutPut.Height > 0) { do code } }
  25. Try putting the Image.FromFile in it's own Bitmap variable. Bitmap b= (Bitmap)Image.FromFile(fileName); imgOutPut = new Bitmap(b, s.Width, s.Height);
×
×
  • Create New...