hadjici2's Q&A profile
Visual C++ First Execution Only...
Hi, I've been trying to tell my new program to check for a specific condition (whether it is the first execution or not), but I'm having quite a bit of trouble. In fact, it's driving me insane. I spent almost all of last night trying to get this right, but it simply will not work the way I want it to. I've asked a huge number of people for help on message boards across the net, and nobody has been willing to help me fix it. So this is my last chance. PLEASE help me. Anyways, here's what I have so far, see if you can fix it and point out what I'm doing wrong: Prototype : int Config (int firstrun); Cut from main() : int firstrun; Config(firstrun); int temp1 = 1; int temp2 = 0; if (firstrun == temp1) { cou ...Show All
Visual Studio Express Editions Not able to select more than one name in drop down a Listbox
Using the CTRL key or the Shift key I cannot select more than one line....Be grateful for any suggestions Mike In the listbox you must set the selection mode property... Me . ListBox1 . SelectionMode = SelectionMode . MultiSimple Me . ListBox1 . SelectionMode = SelectionMode . MultiExtended For a dropdown Combobox...only one item is selectable ...Show All
Visual C++ c2228 and another question
hi, i have a bunch of c2228 errors in my code now that states left of '.RXbyte' must have class/struct/union the part of code it points to is as follows: m_bSendECG = false ; m_cRS232.TXbyte(0x00); m_cRS232.RXbyte(&Byte); m_cRS232.TXbyte(0x12); m_cRS232.RXbyte(&Byte); m_cRS232.Clear(); m_iBufferPos = 0; im not sure how to fix it. im sure its obvious by now that i didnt write most of this code. im a noob and most of this code is way over my head. im trying to understand it as i correct it. its part of a big project with many files inter-linked with one another. i apologize if my questions are very basic and i hope you will bear with me. thanks in advance. ...Show All
Visual Studio Express Editions .rc templates
hello, dose any body know how to create a new .rc template or down load one casue i want to add an icon to my programm but havent a clue how! btu i have been told that i need to use a rc file, so if some one can help me out it would be great thanx, jt hello Re: .rc templates please look at work with resource file in MSDN. If there is any question or the issue is not resolved, please feel free to mark the thread as not resolved and we will look into it again. thanks rico ...Show All
Game Technologies: DirectX, XNA, XACT, etc. ERROR
Hi I have had an error and it says, "This installation package could not be opened. Contact the application vendor to verify that this is a valid windows installer package". Could someone please help me out with I would really appreciate it, and this occurred when I tried to install the VS_setup file in the XNA build folder/50727.42/vs_setup. It keeps giving me the same error. Hi yes I've got it installed thank u very much for your help, now where do I get the Mechcommander 2 from i looked at the dvd abd it says install and I did that but nothing happened ...Show All
Windows Forms Different size on ToolstripMenuItems
Is it possible to mix toolstripmenuitems of different heights in a toolstripmenu Now, if I have a menuitem with text on 3 rows, the other items with only one row will try to align the text relative to the center of the 3-row-height. I've tried everything but nothing works. Look at this picture: http://erik.er.funpic.org/temp/strangetoolstrip.png Here i have an item with a picture that resizes the height of the item to about 100px. The second item will get 100px height automaticly and also centers the text verticaly ( even if i've changed text-align to top-left! is this a bug or does text-alignment do something else ). On the third item i've manually changed autosize to false and height to 20px. But there is no text there, i ...Show All
.NET Development Cross Thread Problem with SerialPort DataReceived Event
I am writing a custom Ref Class with C++ 2005 to control a measurement instrument via Serial Port. My class inherets System::IO::Ports::SerialPort. I also define events inside my class to generate action on specific RS232 messaages. My problem is as follows: Inside the datareceived event handler, I raise events based on messages reveived. However, when my class is instantiated on a windows form, if the event handler defined on the form changes properties of a textbox control, the sytem generates "System.InvalidOperation Exception" and goes on to describe that a different thread tried to access the control. I can solve the problem by setting the CheckForIllegalCrossThreadCalls property of the Windows Form to false. ...Show All
Visual Studio 2008 (Pre-release) Dynamicly changing the staticresource to use on a control.
I'm making a listview that consists of an icon to the left and some text to the right. I have an enum of possible icontypes, the look of every icontype is defined in a resourcedictionary like this: < Rectangle x:Key = " file " Fill = " Red " Width = " 20 " Height = " 20 " /> < Image x:Key = " folder " Width = " 20 " Height = " 20 " Source = " hoho.png " /> To use one of these items i have an iconcontainer that i use like this: < IconContainer Type = " {StaticResource folder} " / > Is it possible to change folder in the snippet above to something dynamic. When i add an o ...Show All
Visual Studio 2008 (Pre-release) Is it possible to show video from MemoryStream not from Uri?
We need to show video from memory stream, but MediaElement support only Uri as Source How can I solve this problem Should I write own control that inherete some base class such as it realized in MediaElement control Or maybe new release of WPF will support different types of source for MediaElement You're right, currently there is no native way to show video from a memory stream. If you have a standalone WPF app (not an XBAP), you may be able to workaround by saving the stream to a temporary file and referencing that. In future, we'd like to make this scenario possible. I haven't done this myself but you could explore custom protocol handler support in the Windows Media foundation. Perhaps there' ...Show All
SQL Server escape characters
Hi, I need to insert this command into a table, but I can't because. insert XXX set column1 = isnull ( Title , '' ) + case when ( case when title is null then 1 else 0 end ) = 1 then '' else ' ' end + isnull ( Last_name , '' ) + case when ( case when First_name is null then 1 else 0 end ) = 1 then '' else ' ' end + isnull ( First_name , '' ) + case when ( case when Middle_initial is null then 1 else 0 end )= 1 then '' else ' ' + isnull ( Middle_initial , '' ) END I don't know how to use escape sequence, I need insert just once thanks Alessandro, You could do something like this instead: ...Show All
Smart Device Development How to restart itself...?
Hello I want to write an autoupdater program. I will push the new version of the program to SQL Server. When the program starts,it will check for updates. If there's an update,it will download it and run it.After the installation of the .cab file finishes, it will restart itself. Everything seems okay else restarting the application...The program is a single instance program,so I can not do "start one more instance and close the current instance" because the program is single instance program. How can a program stop itself and start itself again,under these conditions Thanks in advance. The problem is easily solvable if you add another application (updater) which would actually execute an update, start main a ...Show All
SQL Server Non windows clients
What about non windows clients (mac, linux etc) Can they access Reporting Services with personal permissions/settings as long as they are given a windows account on the RS-machine/domain Or... do I have to implement custom security in order to give access to non-windows users Regards Andreas At its simplest, the clients can be given access the Report Manager. You can configure the Report Manager for basic authentication and browser would prompt the user for credentials. Once the user enters the credentials of the local Windows account, she will be given access to the Report Server based on the permissions this account has to the report catalog. ...Show All
Visual Studio 2008 (Pre-release) Selector.IsSelected in RC1
I have an ItemContainerStyle on a ListView witch has a trigger on Selector.IsSelected, but it seems to have no effect in RC1 Best regards, Thomas Andersen I agree, I would like to change the template as the last resort. there are many places where changing a simple property is not possible because of the way the controls are templated. I thought something like this would work, but it is not. this approach was working before, If I remember correctly < Style x:Key = " st1 " TargetType = " {x:Type ListViewItem} " > < Style.Resources > < SolidColorBrush x:Key = " {x:Static SystemColors.ControlBrushKey} " > #FFFF0000 </ SolidColorBrus ...Show All
Community Chat Windows Vista Gaming Performance
I just read over on Neowin that gaming performance in Vista will be 10-15% slower in Vista. Can someone tell me whether or not this is true Thanks! - James I know you can tune down your vista settings in the control panel. Also, I have run WoW, Guild Wars and AoM with no problem on my dual core. I am going to make a program that allows me to turn of AERO and all the other non needed resources when gaming. Or I will just make an account on my computer that doesn't have those enabled. Greetz, Tyrael ...Show All
Game Technologies: DirectX, XNA, XACT, etc. metronome using directSound or directMusic
hey. i want to code a program that includes a metronome using c++ and directSound and/or directMusic. this metronome should raise an event periodically, it should be as precise as possible and i need to change the tempo at runtime. now what i need is something like the StartTimer (UINT TimerDuration) onTimer(UINT nIDEvent) killTimer() functions in VC++ but with a higher resolution than milli-seconds and with a way to affect the duration between the timer events at runtime, as mentioned above, thus without having to stop and restart the timer... is there a way to use directSound / directMusic in order to achieve this perhaps sth with IReferenceClock:: AdvisePeriodic or does this problem not really have anything to do with ...Show All
