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

Software Development Network >> Hussain Saffar's Q&A profile

Hussain Saffar

Member List

sluggy
Ted.
pat_seo
crash33
Frank2808
jomo
dolot
elixic
webflier
nglow
xr280xr
canadian_coder
Eric Patchen
modtran
Ceej100
omtslug
noobzilla
GeeMann
leonardoreyes
MeanMisterE
Only Title

Hussain Saffar's Q&A profile

  • Visual Basic vbDesign Help

    I have heard that using the smallest datatype in a program does not necessarily save space in memory, as memory is optimised to work in blocks of a certain size, possibly VB Long. Is this correct, or is it best to use the smallest datatype that will safely hold the data required. One important piece of advice, which I can confirm from experience, is: Always use a large enough data type to allow for future growth. You might expect that a variable to hold sales figures would never need to contain more than 99 million, but allow for even more, as it may need to hold, for example, a company-wide summary of sales for the past twenty years, and suddenly the program will crash if the data type is too small. Smaller is usually better to ...Show All

  • SQL Server Format / Alignment

    Does anyone else have this issue When making a report with VS2005, things get spaced out wierd and dropped down when deployed to the web I can't get things like images to position properly. Does it have anything to do with the fact that I am using a Matrix For example, I create an image and embed it, I have it all the way to the left of the form and when deployed it is more towards the middle of the page Very frustrating, just wondering if anyone has any tips/solutions. I figured out a way around it in case anyone has the same problem. Keep the Matrix in the body and create a header and footer to put all the other stuff in. Everything is fine now. ...Show All

  • Windows Forms How Launch .Net win forms application from VB6.0 by passing runtime parameters over net work?

    We have an existing vb application which is invoked from Network shared folder. Now we build a new .Net win forms application which takes runtime parameters as command arguments and get invoked from this vb application. When we try to invoke we are getting errors Can any help me out in deploying the new .net code Thanks in advance. You didn't say what error you're getting, but I think you're just seeing the common security issue of initiating .NET code from an untrusted location. http://www.vbdotnetforums.com/showthread.php t=1224 ...Show All

  • Visual Studio 2008 (Pre-release) WCF and MarshalByRefObject

    Hi, We're porting a project from .NET Remoting to WCF. We're facing a problem. Our .NET Remoting Service has a method witch returns an instance of a class that inherits from MarshalByRefObject. In remoting this approach works and subsequent methods invoked in the returned class are executed in the server. How should we do it in WCF. As is, we get an exception regarding an invalid contract. Regards Pedro Gomes I had a similar scenario. The short of it is, you can't return remote interfaces as part of your operation contract in WCF. I solved this by setting up the old MarshalByRefObject as a new WCF service and then I wrote a custom implementation of IInstanceProvider that scans the message ...Show All

  • Visual Basic How to use a custom class?

    I have just created a new class: Public Class ColunaM80 Public Quantidade As Integer = 1 Public Altura As Integer = 0 Public Chapa As String = "14" Public Corte As Integer = 200 Public Material As String = "# COS CIVIL" Public Acabamento As String = "PINTADO" Private p_chapa As Double Private i_M80 As Double ReadOnly Property Peso() As Double Get Peso = Quantidade * PesoChapa * Corte * Altura End Get End Property End Class This class was written in the same project I trying to use it, and when I write something like: Dim Col01 As ColunaM80 Col01. it doesn't shows up the pr ...Show All

  • Visual C++ C2440: '=' : cannot convert from 'const char [45]' to 'LPCWSTR'

    I am creating a simple Win32 form with a button for File Open dialog. OPENFILENAME ofn; [snip] ofn.lpstrFilter = "Lua Files (*.lua)\0*.lua\0All Files (*.*)\0*.*\0" ; This fails. c:\documents and settings\patrick\my documents\visual studio 2005\projects\craft_gold\craft_gold\craft_gold.cpp(228) : error C2440: '=' : cannot convert from 'const char [45]' to 'LPCWSTR' In a sample application with same headers the function compiles and it works. If I try to create a TCHAR with value "Lua Files (*.lua)\0*.lua\0All Files (*.*)\0*.*\0" , I get the same error. Removing Unicode with #undef UNICODE makes no difference. How can I get this to work Thanks in advance. ...Show All

  • SQL Server how to combine text data rows into single row?

    H i !!!! Need some quick help on SQL.....DTS packages. I’ve loaded data from text files into a table which is in the following format..... Seq_No Row_No Data 1 1 ABC 2 2 DEF 3 3 GHI 4 4 JKL 5 1 MNO 6 2 PQR 7 3 STU 8 4 VWX Every four lines correspond to one single logical record. So, all the data in every 4 rows have to be combined into one big string which’ll then be loaded into one col of another temporary table .....stru ...Show All

  • Visual Studio endless loop while debugging in Visual Studio 2005

    Problem with debugging exceptions in Visual Studio 2005 When we are running our winform application and an exception occurs, Visual Studio 2005 breaks in debug mode. Of course this is normal, but somehow we end up in some kind of endless loop. This behavior occurs when we make a call from our client to our server using remoting hosted in the "ASP.NET development server". Client side we catch exceptions this way: AppDomain .CurrentDomain.UnhandledException + = ... and Application .ThreadException += ... What happens is that VS breaks and displays a yellow line on the line catching the exception, and then we hit F10 to continue step by step and all of a sudden automatically the call to the server ...Show All

  • SQL Server Merge Replication not replicating updates

    I have an issue that is only occurring in a production environment. The architecture is filtered merge replication between two SQL Server 2000 SP4 databases. The publisher is standard edition and the subscriber is personal edition. The issue is that is I update certain rows on the subscriber the data is not replicated to the publisher. Inserts and deletes seem to replicate correctly. The issue is specific to certain rows in some tables. If I update other rows the updates replicate correctly. The subscription has been re-initialized once and it did not fix the issue. The replication process indicates that there was not data to merge and the subscriber updates remain and are at that point different form the publisher row values af ...Show All

  • .NET Development How to prevent a cookie from being sent

    I want to prevent a certain cookie from being posted from the client on each request. My app has 2 cookies. One is used in FormsAuthentification and is required throughout the lifetime of the app, the other is just used for one form, a login form, on this form I use the cookie to pick up the user details only if they have ticked a "remember me" box. When they tick the box the cookie is created and sent down to the client. The problem is all future Requests attach this cookie too, even though I only require it on the login page.. Is there any way to prevent this cookie from being posted with every request and response HttpRequest is used mostly to implement the Request property of HttpApplication and HttpContext in ASP.NET ...Show All

  • .NET Development Coding in Source Code versus DLL

    Greetings, I am not sure if the is the correct place for this topic (appears to be), but I was wondering if anyone would like to describe whether or not there is a drawback in terms of run-time speed for accessing objects through a dll, a opposed to having it coded in the source files for a project. More specifically, is there a run-time speed drawback for coding classes into a dynamically linked library If so, is it significant slow down I understand the obvious reusabilty benifit of a dll, but this is strictly based on performance. The key reason for asking this is I find accessing objects that are compiled in a dll help enforce solid OO practices. The project I am currently developing must slices that must run at optimal speeds. Plea ...Show All

  • Visual Studio 2008 (Pre-release) Creating Animated GIF files in WPF

    Hi, I just posted a short article on my blog describing how to create an animated GIF file from snapshots of WPF FrameworkElement objects. I have to add that the code isn't complete, and that's partly why I post here. I'm using RenderTargetBitmap and GifBitmapEncoder objects to get this to work, but the final .gif file has a flaw. When displayed (at least in IE7), the prior frame isn't erased before the next frame is rendered. The concept I present is very useful (in my opinion ). For instance, this approach can be used for showcasing WPF animations to viewers who don't have .NET 3.0 runtime installed. It would be great if anyone has suggestions for how to improve on the code, and solve the animation flaw. Thanks, ...Show All

  • .NET Development Code Access Security

    Hello All. I'm starting work on a Windows Forms application -- still in the design stages -- and I'm at the point of laying out the security considerations. The anticipated deployment scenarios are: 1) Distribute the .msi package via Web or removable media 2a) Deploy to a single client machine, or 2b) Deploy to a LAN, either client/server or peer-to-peer. My security question pertains to the LAN deployment scenario. Now, I'm making the assumption that a standard user on a LAN will very likely be running under the "LocalIntranet" permission set, which forbids calls to unmanaged code. However, the Application.Exit() method requires permission to call unmanaged code. Now, as I see it, I can do one of several th ...Show All

  • Smart Device Development Positioning the on-screen Keyboard

    Hi all, I would like to be able to position the on-screen keyboard that is provided through my Smart Device. If I try to use the following... inputPanel1.Bounds.Location = new Point(0, 159); I get an error saying its not a variable. Yet, when I mouseover Location, it states that I can get or set the location. Is this not possible Thanks Tryst The Bounds property on InputPanel only exposes the "getter" method. You cannot position it where you want. The comment you see on mouse-over is a generic comment for the Rectangle structure. Try creating your own: Rectangle rc = new Rectangle(); rc.Location = new Point(0,0); Mous over Location above and you will get the same tooltip. The read-only-ness of the Bounds proper ...Show All

  • Windows Forms Controls are falling off due to Vista's thicker window borders

    I'm having some trouble with my controls under Windows Vista. Due to the thicker borders on Aero themed windows, my control's sizing and alignment code is no longer working correctly. Items are falling off to the right hand side.   What can I do to stop this above happening I did where applicable and possible, alot of that is table based, but I wasn't expecting the window to start randomly adjusting its size by its self. Is there something maybe to do with the use if the Width item Does it include the window border ...Show All

©2008 Software Development Network