Software Development Network Logo
  • .NET Development
  • Microsoft ISV
  • Visual Basic
  • Smart Devicet
  • Visual C++
  • SharePoint Products
  • VS Team System
  • Windows Forms
  • Visual FoxPro
  • IE Development
  • SQL Server
  • Visual Studio
  • Game Technologies
  • Windows Vista
  • Audio and Video

Software Development Network >> RichLeyshon's Q&A profile

RichLeyshon

Member List

Keren S
Steph74
JR-J
Aleksandr Tokarev
Rob Bowman
Jorge125
battlestar 2007
Harry Pfleger
AlexCr
IGiberson
zzattack
Mikkel Haugstrup
qwv
Fawadb
Allah Is Here
Peter Torr - MSFT
Jayyde
Jim Dunn
Kevin Dente
Ram v
Only Title

RichLeyshon's Q&A profile

  • Visual C# static methods in a nested class

    If I have a static method, I can access that method without instancing the class, as in int answer = ClassName.StaticMethod(a, b); However, if the class is nested, it seems I must use an instance of the outer class to access the static method as in OuterClass marker = new OuterClass(); int answer = marker.InnerClass.StaticMethod(a, b) The outer class in the case I'm thinking of is not much more than a placeholder, intuitively what I want to write is int answer = OuterClass.InnerClass.StaticMethod(a, b); Is this possible Thanks PhilD Hi, Its very much possible. I have given a code snippet. Please go through it. public class OuterClass { public static ...Show All

  • Visual Basic SetWindowsHookEx Always returns Zero

    I am using VS 2005 8.0 I do not know why the following code is always returning zero for the SetWindowsHookEx. I have unchecked the "Enable the visual studio hosting process" in the projects debug properties but it always passes the If _mouseHook.Equals(0) condition and the Hook is not initiated. Can anyone tell me why Below is all the code on the form. Thanks. Imports System.Runtime.InteropServices Public Class Form1 Inherits System.Windows.Forms.Form Private _mouseHook As Int32 = 0 Private _mouseHookProc As CallBack Private _appThreadID As Int32 Private Const WH_MOUSE As Int32 = 7 Private Delegate Function CallBack( ByVal nCode As Int32, ByVal wParam As ...Show All

  • SQL Server SQL Server 2005 - Replication - Snapshot Failing

    I have a "merge" publication created, with only Procedures, Views and Functions. (Note I have other merge publications that replicate the tables from the same database). I keep getting the same error (see -below) on various procedures. I cannot find anything wrong with the procedures themselves. I also checked the offending procedure by removing it from the publication and compiling it in the database...it works fine. None of my other publications (all tables) encounter this error. * I have 3 others. My version of SQL is 9.00.1399.06 Here is the message I am getting. Any help would be greatly appreciated. Note I changed the proc name due to client restrictions. Message: StartIndex cannot be less than zero. Par ...Show All

  • Visual C# Threading a method that has parameters...

    Hello, I would like to know if there is any option to call a function with parameters in a seperate thread I currently have a work around using public varibles inside my function. That way I am able to create a thread and run the function in seperate thread. Pls give me some suggestions or example code. Thanks, Sathish Alternatively you can do the following (which I personally prefer since it uses a thread from the ThreadPool). private delegate void DoWorkDelegate ( string param1, double param2);   private void method() {      DoWorkDelegate del = new DoWorkDelegate(doWork);      del.BeginInvoke ("s", 1.0, new ...Show All

  • .NET Development Reading data from networkstream

    I normally read data like this, in a new thread on a while true condition while ( true ) {    byte [] someData = new byte [Int16.MaxValue]; //ok so thats overkill!    int theDataRead = 0;    theDataRead = this.theNetworkStream.Read(someData, 0, someData.Length);    while (this.theNetworkStream.DataAvailable)    {       theDataRead += this.theNetworkStream.Read(someData, theDataRead, someData.Length - theDataRead);    }    if (theDataRead > 0)    {       this.theDataManager.DoHandleData(someData, theDataRead);    } }     question is, am I doing it correctly or is there no n ...Show All

  • SQL Server Performance exists vs in

    Which one is better or worst Select * from table1 where col1 in ( subselect ) -- in or Select * from tabl1 where exists ( subselect ) -- exists cheers, There is no difference performance wise. SQL Server (from 2000 onwards) will mostly generate the same execution plan. You can observe this by comparing queries like above. However, you should watch out for the NOT IN vs NOT EXISTS type of queries. In case of NULL values in the column you are comparing using NOT IN, you will get wrong results. So it is best to use EXISTS for checking for presence of rows and NOT EXISTS for the opposite. This way there will be no confusion as to what you should use when and you will always get the best results & performance. Use ...Show All

  • Visual Basic Resize windowform1

    hi, i am new to VB.net(Windows application) how to dynamically increase/decrease control size when form size is increased/decreased by user i tried using tablelayoutpanel/Anchor/docking.i find it using very diffcult to use.(I think i dont know how to use it ) is there material available in online about how to use tablelayoutpanel/anchor/docking Thanks in advance Hi thanks for code i need to set this for all the controls in my form it is not working when i clicked the maximize button of the form working when i resize the form thro mouse. ...Show All

  • Game Technologies: DirectX, XNA, XACT, etc. Direct X10 and Vista - Compatibility

    Simple question, will Direct X10 only be compatible with Vista Everything comes down to money, but people invest heaps of many into to MS and sure they give you good software, but then they only support it for about 3-4 years and make you pay heaps more money for another piece of software. ...Show All

  • SQL Server Executing Dynamic SQL larger than 8000 characters

    Can anyone tell me if there is a way to get around the 8000 character limit for executing dynamic SQL statements   I have tried everything I can think of to get around this limitation but I can not figure out a way around this.  Here are a few of the things that I have tried that have not worked Using VARCHAR(MAX) instead on VARCHAR(8000) Using NVARCHAR(MAX) instead of NVARCHAR(4000) Using nTEXT (BLOBs are not support for variables) Executing the statement via .NET using the SqlCommand.CommandText (it accepts a data type of String which is limited to 8000 characters) I can't believe this is sooo hard to figure out.  I know somebody has run into this before.  All help would be greatly appreci ...Show All

  • Game Technologies: DirectX, XNA, XACT, etc. Optimizing Multi-Rendering of the Same Model

    If i need to draw multiple game units ( ex: spaceships) in a scene ( they all have the same model ) whats the best way to do it Lets say the spaceship model has 4 sub meshs ( engines, wings, weapons, something else ) Currently I render each model by calling a function like this for each ship: Effect eff; Model model; eff.Parameters["blah"].SetValue["someValue"]; foreach(ModelMesh mesh in model.Meshes) { eff.Begin(); foreach(Effectpass pass in eff.CurrentTechnique.Passes) { pass.Begin(); foreach(ModelMeshPart part in mesh) { // set the texture for this part // draw the part } pass.End(); } eff.End(); } Currently if there are 500 same ...Show All

  • Visual Studio Team System Error 2738 running tfpt.msi v1.2

    1.Uninstalled the old Process Template Editor. 2.Installed the DSL Tools. 3.Installation of Power Tools 1.2 gives "Internal Error 2738" and finishes saying 'wizard interrupted', 'run setup later'. Can anyone provide details of that error i have tried both fixes mentioned for error code 2738. microsoft is no help at all. anyone else have a solution. maybe dropping vista and restoring xp is the answer. ...Show All

  • Windows Forms Help! datetimepicker nt setting value correct. int32 for datetime

    It is simple form where a bindingsource is datetime sql 2000 database field. When dataadapter.Update is send the program errors at says int32 for datatimefield. Where I should look for errrors ...Show All

  • Internet Explorer Development ActviceX content security setup and signing for tursted authentication.

    Hello guys, I made a HTML page using VS runtime. This is stored in my local HDD, not or online use. Since I am using ActiveX, IE7 keeps pop-up those warning window everytime I refereshed my page. I already use the "Allow active content to run in local computer." to disable the block yellow bar thingy. But I got this pop-up window and I have to click yes all the time. How do I disable the pop-up window, and still maintain secure online browsing Also, is there anyway for me to authenticate my HTML page to be trusted Thank you. ...Show All

  • .NET Development updating in details view

    hello, I am using vs2005 and have some data in details view binded to the access database. I have a edit button which takes to the editmode where i have cancel and update buttons. After aditing the data how do i update the data back to database by clicking the update button. As far as my knowledge goes we use "onItemUpdating " method. Can anyone please help me with the code for updating. thank you, Ashish ...Show All

  • Visual Studio 2008 (Pre-release) DLINQ - "Column referenced is not in scope: "

    Hi Guys, I get this error when ever I walk over a table in the object model with out projecting it and then perform a select. IE This query works. var myQuery = from student in Data .Students                          where student.ID == studentID                          select new                          {             ...Show All

©2008 Software Development Network