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
J

Jose Fco Bonnin

@Jose Fco Bonnin
About
Posts
25
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Process Owner and Parent
    J Jose Fco Bonnin

    If WMI is an option for your tool you can get all that information from it. Just take a look to the class "Win32_Process". I remember some nice articles about WMI in codeproject. If you don't find them let me know.

    C# tutorial

  • Custom Panel
    J Jose Fco Bonnin

    You can create a new class A inheriting from Panel adding the next lines of code. After that all the classes inheriting from A will have again the design view. [Designer(typeof(System.Windows.Forms.Design.DocumentDesigner),typeof(System.ComponentModel.Design.IRootDesigner))] public class A : System.Windows.Forms.Panel { .... } ... public yourpanel : A { .... }

    C# csharp visual-studio design performance help

  • STRING MANIPULATION
    J Jose Fco Bonnin

    if you use @"\d+" and your string is "aaaa1" the result will be true.

    C# tutorial

  • how to avoid references
    J Jose Fco Bonnin

    I type mismatched the last line should be "anInterface.Method();" instead of "IAnInterface.Method();" it was evident but .....

    C# tutorial question

  • Images, SQL and C# -PLEASE HELP
    J Jose Fco Bonnin

    You can convert it to a byte[] before send to the server and then store it directly. public StorePhoto(byte[] photoContent) { ....... SqlParameter param1 = new SqlParameter("@photo",SqlDbType.Image); param1.Direction = ParameterDirection.Input; param1.Value = photoContent; ....... }

    C# database graphics help csharp sysadmin

  • STRING MANIPULATION
    J Jose Fco Bonnin

    What about using regular expressions? Something like: public bool IsNaturalNumber(string sValue) { return (Regex.IsMatch(sValue, @"0*[1-9][0-9]*") && !Regex.IsMatch(sValue,@"[^0-9]")); }

    C# tutorial

  • how to avoid references
    J Jose Fco Bonnin

    You can use reflection to load an assembly. Assembly a = Assembly.LoadFrom("your.dll"); Type t = a.GetType("namespace.classname"); MethodInfo m = t.GetMethod("method"); object o = Activator.CreateInstance(t); object result = m.Invoke(o,new object[]{parameters}); If you want to avoid call methods in this way, you can also create an interface with all the necessary information about the dll and when you call CreateInstance just cast to it. For instance: public interface IAnInterface { void Method(); } ....... IAnInterface anInterface = (IAnInterface)o.CreateInstance(atype); IAnInterface.Method();

    C# tutorial question

  • Properties Page
    J Jose Fco Bonnin

    Hi, I'm creating an application that uses the windows media encoder SDK. I would like to show the properties/configuration pages of the input devices like wmenc.exe does. This dialog is custom for every device installed but I'm sure that there is an standard way to show it. Any idea/suggestion will be apreciated. Thanks

    C# workspace

  • Welcome dialog when app starts?
    J Jose Fco Bonnin

    I'm sorry if I'm offended you I didn't want to criticize your code. What I'm saying is if that guy wants to show a form during the load of the real application, in my opinion is better to show it in a different thread because it guarantees that the form will be shown and you will not get a blank screen because the application is busy doing other things. But of course you can also use tricks like Refresh() or Application.DoEvents() doesn't matter.

    C# csharp json question

  • Welcome dialog when app starts?
    J Jose Fco Bonnin

    If you do a Thread.Sleep the rest of the application will not be loaded. Why don't you try something like that public class Form1 : System.Windows.Forms.Form { .... Form2 frm= new Form2(); public Form1() { Thread thread = new Thread(new ThreadStart(StartForm2)); thread.Start(); // Do your stuff frm.Close(); } private void StartForm2() { if (frm != null) frm.ShowDialog(); } .... }

    C# csharp json question

  • How To Add Carriage Return Char To a String, Anyone?
    J Jose Fco Bonnin

    Try with Environment.NewLine

    C# tutorial question

  • can i embed internet explorer in my application?
    J Jose Fco Bonnin

    Yes, you can do it in some ways, the easiest one is customizing the toolbox and adding from the COM Components tab, the "Microsoft Web Browser" (\system32\shdocvw.dll), then you just need to drag it to your form. To get more information about how to use it check this link http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/webbrowser/browser\_control\_node\_entry.asp

    C# tutorial question

  • DataGrid - C# Windows Forms - How to not Allow a 'new' record added to end of grid
    J Jose Fco Bonnin

    You need to set it in the data view ((DataView)((CurrencyManager)this.BindingContext[dataGrid1.DataSource,dataGrid1.DataMember]).List).AllowNew = false;

    C# csharp css winforms security help

  • how to receive html element events
    J Jose Fco Bonnin

    Take a look to this article http://www.devhood.com/tutorials/tutorial\_details.aspx?tutorial\_id=312

    C# question csharp html tutorial

  • Node searching in TreeView
    J Jose Fco Bonnin

    Here are a little approach ... public TreeNode Search(TreeNodeCollection col) { // Create an enumerator for the collection. IEnumerator myEnumerator = col.GetEnumerator(); TreeNode node = null; while(myEnumerator.MoveNext()) { System.Console.Out.WriteLine(((TreeNode)myEnumerator.Current).Text + ": "+ ((TreeNode)myEnumerator.Current).FullPath); if ( ((TreeNode)myEnumerator.Current).FullPath == textBox1.Text) // Make the right comparision return ((TreeNode)myEnumerator.Current); else { node = Search( ((TreeNode)myEnumerator.Current).Nodes ); } } return node; } private void button1_Click(object sender, System.EventArgs e) { TreeNode node = Search(treeView1.Nodes); if (node!=null) { treeView1.SelectedNode = node; treeView1.Select(); } } I hope that it helps. Greetings, Jose.

    C# help question algorithms data-structures tutorial

  • Save a File from Variant
    J Jose Fco Bonnin

    Hello, I have an ATL object which loads a JPEG from database in a VARIANT now I need to save the variant to a file on disk. Any idea? Thanks.

    C / C++ / MFC c++ database question

  • VARIANT and Byte Arrays
    J Jose Fco Bonnin

    Hello to everybody. I'm making a COM object which receive a VARIANT type, I recover this value from database in an ASP page as a Byte Array (it's a bitmap), the COM object must draw something over this bitmap and send again to the ASP page. My problem comes because I need extract the data from the VARIANT in a CLongBinary* but I haven't idea how can I do it. Can you help me? Thanks.

    COM help question database com graphics

  • Only one application instance
    J Jose Fco Bonnin

    Hi, I would like to check if there is running any instance of my application, in order to set the focus on it if the user try to start a new one. Any idea? Thank you.

    C# question

  • Customize message from datagrid
    J Jose Fco Bonnin

    Hello, I've a datagrid with a dataset wich I get from a WebService. When I insert, update, etc there are some messages that I want customize (null value not allowed, duplicate key, etc). This messages are created "locally" before to send modifications to the database, but I don't know how to catch it before show it in order to customize. Any idea or suggestion? Thank you.

    C# database tutorial question announcement

  • Calling a C++ DLL from C#
    J Jose Fco Bonnin

    The first thing that I've made was read the article, It's a good article where I found how to avoid the problem of load the dll and the method but my actual problem is that I can load and detect the method but this don't return nothing. I don't know what it's happening.

    C# c++ csharp 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