Jump to content
Xtreme .Net Talk

snarfblam

Leaders
  • Posts

    2156
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by snarfblam

  1. I think that regex could be pretty handy here. Maybe someone with more regex experience could help you, because my regex experience is very limited. You might want to check it out in the object browser and MSDN.
  2. The "My" feature is only available in VB .NET 2005, hence these features are only available in version 2 of the .Net framework. Keep this in mind.
  3. My best app ever? Hmm... Since I program for hobby and I have a terrible habit of not finishing my programs I can't include some of my most promising work. My best completed app ever was a ROM editor for an NES game. Hmm... Me? A geek? Nah!
  4. I don't know if this is a property of the OpenFileDialog in .Net, but in the ActiveX version there is an property that is something like ErrorOnCancel to give you an option to throw an error when the user hits cancel.
  5. I recommend you look into a VB .Net tutorial. [Edit]I mean to pick up syntax, not to learn how to program.[/edit]
  6. That is news to me. I thought that GDI+ was part of the .Net Framework, whereas GDI was a part of Windows. As a matter of fact, I remember hearing about updates that would occur in GDI+ in version 2 of the framework.
  7. Yes. A GIF file specifies how long to show each frame and how many times to cycle through the animation. If you are the author of the GIF, search your program for these settings. If not then you might be able to open the GIF in a program such as ImageReady or a GIF editor and change these settings, provided that this does not infringe upon any copyright or license.
  8. The cartoon about stealing bandwith is the wrong image. Copy the link location and paste it into the address bar, then hit enter. I did that and got a cartoonish animated egg. I, as well, don't understand the question. They are still two very different images. Are you asking how to cartoon-ize an image?
  9. If you take a close look at some c# code, you will see that it can generally be converted to VB pretty easily. Knowing a little C++ (or C#) will help alot. //C# public class Line { public Point StartPoint; public Point EndPoint; public int PenWidth; public void DrawLine(Graphics g,Color c) { Pen p=new Pen(c,PenWidth); g.DrawLine(p,StartPoint,EndPoint); p.Dispose(); } } 'VB Public Class Line Public StartPoint As Point Public EndPoint As Point Public PenWidth As Integer Public Sub DrawLine(ByVal g As Graphics, ByVal c As Color) Dim p As New Pen(c, PenWidth) g.DrawLine(p, StartPoint, EndPoint) p.Dispose() End Sub End Class //C# private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { foreach(Line l in Lines) l.DrawLine(e.Graphics,Color.Black); } 'VB Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint For Each l As Line In Lines l.DrawLine(e.Graphics, Color.Black) Next End Sub I'm not going to translate everything, not to be difficult, but because I don't have time and that isn't what these forums are for. Maybe someone else feels like being nicer.
  10. There is an article about this in MSDN.
  11. What have you tried? You are keeping track of where the lines are, right? If your lines are a single pixel wide, do you have to click exactly on the line? Or close enough to it? Do you know the distance formula?
  12. If you have searched the object browser or MSDN you would discover that there are no sound file related classes in the framework, period. For some crazy reason, Microsoft did not anticipate that people might want to play sounds. What you need is the Windows API. There are different API viewers (you can find them with google) or you can just search Google for Windows APIs related to sound. And just a note, as suggested in my sig, this kind of info is generally easily available in either the object browser, MSDN, or Google.
  13. Code would really help. It is hard to explain why bizarre things happen when one thinks he's doing everything correctly and doesn't post any code.
  14. I think what is being asked is how to produce the .exe, since "Make <Project>.exe" is missing from the file menu. Every time you build or run your program the compiled executable in placed in the "bin" folder within your project folder. Simply browse to that folder and there is your executable. Just make sure that the build you distribute is a release build.
  15. I don't know much of anything about asp, but since dtmDate is clearly declared and assigned an object the only other reference in that line that could be null would be txtReqDate. Is the MyBase.Load event fired before the controls are created? If so then that would explain a NullReferenceException, and if not, I would be awefully confused.
  16. I just accidentally discovered that an event declared with parameters (VB6 style) as opposed to with a delegate will implicity declare a delegate, which, while it does not appear in the class view or intellisense, can be used and does not cause a compiler error. The name given to the delegate is eventnameEventHandler. Class TestClass 'Declare Event Public Event TestEvent(Parameters As Types) 'This delegate type is not explicitly defined but will not cause any errors Public Dim MyDelegateVariable As TestEvent[u]EventHandler[/u] End Class Thought I would add that to the thread since it seems quite relevant. Under the hood both event declarations are actually the same except that the VB6 way implicity declares your delegate for you.
  17. Your method (the second one) or declaring events will work just fine, but declaring a delegate type means that other parts of the program can pass around a function pointer (i.e. delegate) that points to a handler. Perhaps the method you are using exists for VB6 code compatability. I don't know. But it works just fine.
  18. By "your previous post" (as opposed to "one of your previous posts"), I was referring to your most recent post... Anyways, I copied it directly, compiled it without changing it, took five screen shots, lost the contents of my clipboard, deleted two random images, ran the program again, and it filled in the blanks that I made by deleting the files. My best guess is that the bug exists elsewhere in your code.
  19. I copied and pasted the code in your previous post, and it worked like a charm. Also, unless I am missing something, couldn't you store the number you left off at in the registry or in a config file? And just a note: I noticed that you are taking screen shots by simulating a Print-Screen, which overwrites the clipboard. I recommend using BitBlt to copy from the desktop hDC to an hDC created by a graphics object.
  20. I have to agree, that is a broad question and it is hard to give a specific answer. There are different solutions to interfaces for large or complex programs. What it sounds like you need is an "Explorer" style interface with the list view of icons as mentioned by bri189a, and possibly a treeview on the left to show directory structure. Give it a whirl, and when you run in a specific problem, I'll be glad to help.
  21. Well, you asked the question, but I learned something. Hmm... Reflection often escapes my attention. When I think of run-time, I think of the compiled code like you would have in C++ where all that metadata simply doesn't exist.
×
×
  • Create New...