HariAdu's Q&A profile
Windows Forms Why the WebBrowser vertical scrollbar is always shown?
Hello, I'm wondering if I can hide it when there's no big contents that require a scrollbar. Is that possible Thanks. Hello everyone, This property is useful when the content is short. If you go from short contents to longe one, you wont able to see some contents if I set scrollbars disable. Is there any way to show the as I need (e.g. show the scrollbars when the contents is too long and hide it when it is short.) Thanks ...Show All
Windows Forms DataGrid Locks Up When Scroll Bar Should be Shown
I am working with C# and .Net 1.1 (VS 2003). I have a DataGrid docked to fill on a dialog. I then dynamically populate the table that is the source for the DataGrid one element at a time. It seems like when the visible portion of the DataGrid fills up and a scroll bar or two should be displayed the dialog freezes. The dialog still processes some commands. I can scale it up or down but it just gets filled with white space. No other actions are available to the dialog or internal DataGrid. If I cover up the dialog then show it again it is still has stuff visible and is not totally white. So my question is: What can be done to prevent the dialog from freezing or locking up This is what I think is happening. You are receiving the me ...Show All
SQL Server How to update a column in input dataset by SQL Query?
I'm bothered by an issue of updating a column in input dataset from a update query. It looks like SSIS has a very poor function on this. Example, I have an input dataset of name, salary, dept_no, and I have another table called departments which has fields of dept_no, Dept_name, basic_salary now I want to update salary column in input dataset with basic_salary if it's salary is smaller than the basic_salary. update #tmp set salary = basic_salary where #tmp.salary <departments.basic_salary and #tmp.dept_no = departments.dept_no how could I impletement this in SSIS package I tried with lookup, modify scripts by enabling memory restriction. It doesn't say any error when I save the package, but I never get pass debu ...Show All
.NET Development UnmanagedType.SafeArray and ILDASM
Hi! For example, the following C# code public static void StaticMethodExample([ MarshalAsAttribute ( UnmanagedType .I4)] int size, [ MarshalAs ( UnmanagedType .SafeArray, SafeArraySubType = VarEnum .VT_UNKNOWN, MarshalTypeRef = typeof (System.Reflection. Assembly ))] System.Reflection. Assembly [] val) { } compiled successfully. But if this code to disassemble (by ILDASM), MSIL code looks so: .method public hidebysig static void StaticMethodExample(int32 marshal( int32) size, class [mscorlib]System.ValueType[] marshal( safearray iunknown) val) cil managed { // Code size 2 (0x2) .maxstack 8 IL_0000: nop IL_0001: ret } // end of method StaticClassExample::StaticMethodExample ...Show All
Visual Basic What's the difference
Ok folks, so I've got a program that runs code that has a FOTRAN dll that (thank god) I finally have working, for the most part. At least it does when I pass it the path/name of a file that I've created using notepad. Buuuut, that's not gonna cut it when it comes down to it. What I've done is created a GUI that creates an input file for FORTRAN and all it does is write a line of text for each input in FORTRAN. But when this VB written file,written using streamwriter or FileSystem.AppendText (I wondered if there might be a problem with the streamwriter making hidden characters but no), is passed to my FORTRAN dll and the methods native to the FORTRAN code attempt to consume the data, I run into an interesting problem ...Show All
Visual C# Best practise to kill process (when there are several with same name)
Hi, When starting an application I need to make sure that there are no old processes from earlier instances of the program still on the computer (comparing StartTime for the processes do the trick). I have two solutions that works fine, but since the one that I think is more neat uses GetCurrentProcess() I need advice. The first one looks like: Process[] procs; procs = Process.GetProcessesByName("testPgm"); if (procs.Length > 1) { for (int x = 1; x < procs.Length; x++) { if (procs[0].StartTime > procs[x].StartTime) { procs[x].Kill(); } else { procs[0].Kill(); procs[0]=loisExes[x]; } ...Show All
SQL Server Passing Parent configurations to child
Hi All, How can I pass configurations from Parent Packages to a child package I am using Execute package task to execute a child package but am unable to configure a variable to pass configurations to a child package. Thanks Not sure what you mean by this. What exactly do you mean by "pass a configuration". A configuration is defined in a single package and cannot be shared by other packages. The external resource that is used by a configuration CAN be used by as many packages as you want. note the subtle difference here. -Jamie ...Show All
Visual C++ Associating an HotKey
I'm working on a program to take screen shots. What I want to do is to make my program respond when the key "Print Screen" is pressed, even if my program doesn't have the focus. I searched the Internet for hours but didn't managed this, probably because I'm a newbie in C++. Can anybody help me I'll greatly appreciate it! Thanks What I want to do is to make my program respond when the key "Print Screen" is pressed, even if my program doesn't have the focus. Your proram must have focus to process this message. You can do it in combination of WM_KEYDOWN and VK_PRINT. ...Show All
Visual C# Odd results after Console.read() input
In the following little "learning" program of mine, I am making a simple class constructor program. The place I am having problems is with Console.Read(). If you run this program and go into debug, and once you come upon the conosle.read() the variable selection takes on some funky results. Selection is first initialized at 0, but as soon as you input for selection the number jumps way up. When I type in 1 at the menu, the variable takes on 49, 2 takes on 50, and 3 takes on 51. Obviously I am very new to this, and i'm guessing I am doing something wrong with Console.Read() but I don't know. class Menu { public void MenuOptions() { int selection = 0; while (selection != 3) { Console.WriteLine( ...Show All
Software Development for Windows Vista Killing Fast User Switching in Vista32
I have security applications that will not function using FUS. In XP there was an Option in the control panel to kill FUS. How do you kill it in Vista32 I'm not sure there is a way to turn off FUS in Vista. I'm sure someone more familiar could verify that. That being said, turning off FUS might not fix your problem. We have an app that doesn't play nicely with FUS, so advise our users to turn it off in XP (fortunately most of them are on a domain which automatically disables FUS on XP). One of the causes of this is the new session that gets created when a the second user logs on. In XP the first user lives in session 0 along with all of the services. In Vista however, session 0 is reserved for the services and the first user l ...Show All
Visual C# C# Book Recommendations
This sticky here will be used for people to post their C# book recommendations. It will help us keep the forum a bit cleaner than making several topics about book recommendations and also helps everything to be in 1 "spot" and alot of people can see the book recommendations that you have given everyone else in this topic. So please, feel free to post your book recommendations here for developing in C#! :-) If possible, include any links where the person would be able to obtain the book from, and it's ISBN number which would be a big help to everyone! I would recommend "Professional C# 2005" by by Christian Nagel et al. (Wrox Press). This is an excellent book for novice to intermediate developers. ...Show All
Gadgets CheckBox list and user settings
Hi! I would like create a gadget with a listbox, a user can check some items and in the further user acceses I should know the items selected (by each users) for run particular URL ... How can I do this Bye Sounds like you need to use the preference methods (getPreference, setPreference, deletePreference) on the Module class . These allow you to save and retrieve a bit of data per gadget, so you could save the state of your listbox and reload that the next time the gadget runs. More info can be found in the SDK . ...Show All
Visual C# Problem with bindable attribute in custom control
I have a class (BindTestClass) that inherits from ComboBox and has a public string as a property of the class (BindableString). This string is bindable, so I can bind it in design time to a datasource. public class BindTestClass: ComboBox { private string _bindableString; [Bindable(true)] public string BindableString { get { return _bindableString; } set { if (value != _bindableString) _bindableString = value; } } } This is used as a control inside a form that has some text boxes binded to the same data source, but to different fields. All the controls in the form use a binding source as datasource, and the binding source has the actual dataset and datamember declared on it. When I hit save, the fi ...Show All
.NET Development Relative Assembly Location
I have a program "x.exe" that has an assembly "y.dll", and I would like to have the assembly in a folder called "bin" that is under the relative path of the program "x.exe". How can I tell the vb.net project that I want to have the assembly in the "bin" folder and not the applicaion's folder After some research; I found it out: Make sure your program has a "app.config" file. Edit the app.config file and place in the below text: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <probing privatePath="common\bin"/> </assemblyBinding> </runtime> My ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Supported gamepads (Spacewar)
Hi, Is just the XBOX360 game pad supported, or should other pads also work. I've tried connecting my old MS Sidewinder Plug and play pad, which is working in other programs, but not here. Is there something I need to set up And (if other pads are not supported in spacewar), is this a limitation of the spacewar demo that can be coded around for windows based games Chris Herensuge wrote: Is there any easy option to play Spacewar with the keyboard . This is my first day with XNA Game Studio Express. Please search the forums before posting, this has been answered many times this morning http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=682463&SiteID=1 ...Show All
