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
D

Danny Blanchard

@Danny Blanchard
About
Posts
18
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • The Culture Of Life
    D Danny Blanchard

    I couldn't have said it better myself. I watch the news when I can and what shocks me the most is not what the reporters present but how they present it. This case is a family matter, regardless of the outcome. Daniel E. Blanchard

    The Back Room html com question

  • Club a penguin
    D Danny Blanchard

    My best was 843, but my girlfriend got 1143.8 Daniel E. Blanchard

    The Back Room com

  • It's stuck in my head!!!
    D Danny Blanchard

    http://www.albinoblacksheep.com/flash/badgers.php Daniel E. Blanchard

    The Back Room php com adobe help

  • What's up with User Controls?
    D Danny Blanchard

    I had a coworker with the same problem. His solution was to reinstall visual studio which did the trick for him. Daniel E. Blanchard

    C# winforms com tutorial question

  • Silly question, if Iraq is disarmed why are they firing Scuds?
    D Danny Blanchard

    I am by no means a fan of GWB, but I do think that 12 years is a long time to wait for a country to disarm itself. Keep in mind that you are talking about a known dictator(SH) that has in the past ordered the deaths of literally hundreds of thousands of innocent people, many of which were his own countrymen. If you ask me, I think that GWB regrets that he couldn't have done something sooner for those people. I like to think of myself as a peacefull person, but I'd like to believe that in a situation of mass oppression of innocent people taking place before all our eyes, I would at least have the courage to do what I know in my heart is right. There, that's my 2 cents worth Daniel E. Blanchard

    The Back Room question

  • What am I doing wrong with Public?
    D Danny Blanchard

    David Williams wrote: The Public keyword in the Dim statement declares elements to be accessible from anywhere within the same project That's true if the element is global, but you forgot about how scope works. An element declared within a class is not global, but if declared as public can be accessed outside of the class. In order to do that you must reference the class. For example: You have a global variable declared in your project: Public Var1 As Integer 'Global, accessable anywhere in the program Then you have a class that can use that variable: Public Class TestClass1 Public Var2 As Integer 'Accessable from outside the class Private Var3 As Integer 'Accessable only in the class Public Sub MyProc() Dim Var4 As Integer 'Accessable only in this method Var4 = Var3 'This is OK because Var3 can be accessed anywhere in the class End Sub Private Sub MyProc2() Dim Var5 As Integer 'Accessable only in this method Var5 = Var1 'This is OK because Var1 can be accessed from anywhere. End Sub End Class If you have a global instance of that class: Public TestClassObj as TestClass1 Then you can access public data inside that class: Public Class TestClass2 Private Var6 As Integer Public Sub DoSomething() Var6 = TestClass1Obj.Var2 'This is OK because TestClass2 has indentified where Var2 can be found End Sub End Class So, the VB doc you mentioned was correct, but you have be carefull where you declare your elements and always mind program scope. Daniel E. Blanchard

    Visual Basic question

  • What am I doing wrong with Public?
    D Danny Blanchard

    well, i and j are in different classes so they cannot see each other. now, if your instance of Form1 is global, then you can access i through it like this. Global instance of Form1: Public MyForm1 as Form1 Access instance of Form1 in class Form2: Public Class Form2 ... Private Sub Form2_Load(... Dim j As Integer j = MyForm1.i End Sub End Class Daniel E. Blanchard

    Visual Basic question

  • Selct from Multiple Access mdb's
    D Danny Blanchard

    Well, if you're using ADO.NET, then all you have to do is change the connection string in your OleDBConnection object. Just let the user select whichever one they want, modify your connection string, and assumining that your databases are all the same that should be all you need to do. Hope that helps! Daniel E. Blanchard

    Visual Basic database question

  • Accessing an Imagelist in VB.NET
    D Danny Blanchard

    Should look like this: MyPictureBox.Image = MyImageList.Images.Item(Index) Hope that helps!! Daniel E. Blanchard

    Visual Basic csharp database tutorial

  • Where was The Shrub when...
    D Danny Blanchard

    Mike Mullikin wrote: the Electoral College has been around for 200 years and whining about it after the fact is childish I'd like to point out that just because a policy has been around for hundreds of years does not mean that it is the best way. Take, for example, slavery or the death penalty, or about half a million other laws in the history of the world. Not that I have too many quarrels with the Electorial College, but there's always room for improvement. Daniel E. Blanchard

    The Back Room html business question

  • about 'new form'
    D Danny Blanchard

    And your question is? Daniel E. Blanchard

    C# question

  • why can not find particular reference in the project/Add reference
    D Danny Blanchard

    henrykao wrote: yes. I did search on the COM tab If you want your project to be able to access "Managed DirectX", then you'll have to search for Microsoft.DirectX.< DirectX Component > under the .NET tab. henrykao wrote: only have directX for VB, not DirectX for c#. Those libraries under the COM tab are for Visual Basic 6, but you can use them with VB.NET or C# ( both VB.NET and C# both would require an Interop dll which would be created by visual studio once you add the reference ) henrykao wrote: the label of downloaded component is C#,but why the code and API of that is c++? Unfortunatly, 95% of the documentation you download from Microsoft for DirectX will be in c++, but if you search hard enough you will find some VB documentation inside the C++ help files (especially for DirectShow). On the plus side, the directx objects for C++ and VB are similar and work basically the same way. The C# code is in the SDK directory in the samples folder. Hope that's of some help to you. Daniel E. Blanchard

    C# csharp graphics game-dev tutorial question

  • No long able to debug
    D Danny Blanchard

    I think your running the program in Release mode. Switch it back to Debug mode and it should hit the breakpoints. Daniel E. Blanchard

    C# debugging help question

  • CreateProcess( ) :o)
    D Danny Blanchard

    My mistake, you beat me to it. Daniel E. Blanchard

    C / C++ / MFC help question

  • CreateProcess( ) :o)
    D Danny Blanchard

    Instead of using CreateProcess(), maybe you should use ShellExecute to launch your other applications. CString filepath = "C:\\temp.exe"; HINSTANCE err = ShellExecute(NULL, _T("open"), filepath , NULL, NULL, SW_SHOW); It should look something like that, but my C++ has been getting a little rusty lately. Hope that helps. Daniel E. Blanchard

    C / C++ / MFC help question

  • Error while loading document object reference not set to an instance of an object
    D Danny Blanchard

    Are you using any ActiveX controls? I've had similar problems when I load up my projects on machines that don't have all the required ActiveX controls for my program. The consequence is that Visual Studio won't know how to display the control in design mode, and therefore you get a nice blank page with some useless message on it. If you are using ActiveX controls, you can check under References in the Solution Explorer to see if you are missing any references on the machine. If this is the case, try reinstalling the ActiveX control and that might fix it for you. If this is not the case, then perhaps you should post the error message you've been getting to give us all an idea of what's going on. Hope this helps. Daniel E. Blanchard

    Visual Basic help design

  • 2Questions: Application icon and username
    D Danny Blanchard

    1. There should be an Icon property for your form that you can access in the Designer view. Use that to find whatever icon you want displayed in the title bar for that particular form. I think you have to do this for each form you want the icon displayed in (unless anyone knows a better way). 2. Use System.Environment.UserName property to find the current user name. Hope that helps. Daniel E. Blanchard

    C# question csharp

  • Deploying an app w/ DB connectivity
    D Danny Blanchard

    Like you, I've written a couple programs that access a database. In order to do this with ADO.NET(which is what I use), you must set up a connection string inside your OleDBConnection object. The connection string gives(among other things) a path to your database file. When you add a OleDBDataAdapter object to your form, a wizard pops up to help you set up your connection. For example, when I set up a data adapter to my Access database, the designer adds this line of code to my program: this.oleDbConnection1.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0; Password="""";User ID=Admin;Data Source= **Path to your file here** ;Mode=Share Deny None;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"; I know that looks like a bunch of jibberish, but what you can do is before you open a connection to your database, modify your connection string to reflect where your database is. Because you don't know where the user will choose to install your program, you can use the System.Environment.CurrentDirectory property to locate where your application is running from and (assuming your database's location is based on the location of the app) append your database's path and name. My code to do this looks like this: string CurrentDir = System.Environment.CurrentDirectory; CurrentDir += "\\DB\\database.mdb"; this.oleDbConnection1.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0; Password="""";User ID=Admin;Data Source="; this.oleDbConnection1.ConnectionString += CurrentDir; this.oleDbConnection1.ConnectionString += @";Mode=Share Deny None;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"; I hope that helps. Dani

    C# database help beta-testing tutorial question
  • Login

  • Don't have an account? Register

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