kageg's Q&A profile
Visual C++ How do VC++ set the Size and 'Topmost' of a console window?
I looked up MSDN and found the API function ' SetConsoleWindowInfo ' ,which can resize,according to MSDN, the size and position of a console window, however,I tried it and found it doesn't work at all.I don't understand why the API doesn't work on my PC(IDE: VC++ 6.0 OS:WinXP SP2). Some books says the API function, SetWindowPos ,can changes Z order of a child, pop-up, or top-level window.I want to set the console window as the topmost window,so I use the API function ,but I don't know how to get the handle of a console window,I tried to get a console handle by the sentence, consoleHnd = GetStdHandle(STD_OUTPUT_HANDLE); Unfortunately,I got the following error message: error: argument of type "HANDLE" is incompatible ...Show All
Visual C++ Bitmap on TabPage
Hello all, I have a test.bmp file and I added it in resources by importing..I see it as app.rc\bitmap\test On Tabpage I created a picturebox and try to add as this->pictureBox1->Image=gcnew Bitmap(this->GetType(),"test.bmp"); It says resource cannot be found in the class.. How to access it and display it on tabpage Thanks in advance Use this function in Bitmap class public : static Bitmap ^ FromResource ( IntPtr hinstance , String^ bitmapName ) to obtain it from Window native resources by resource key name. this->pictureBox1->Image = Bitmap::FromResources(NULL, "test.bmp"); ...Show All
Visual Basic Split Question
I need splitting a file for get any info I wrote this Code: Dim number As Integer = 0 Dim ParamSeparator() As Char = { "G" , "I" , "F" , "8" , "9" , "a" } Dim gif As String = File.ReadAllText(OpenFileDialog1.FileName) Dim i As Integer = 0 For Each files As String In gif.Split(ParamSeparator) If files.Length > 0 Then ListBox1.Items.Add(i & " " & files.Length + 6 & " 0" ) i = i + files.Length + 6 number = number + 1 End If Next TextBox1.Text = number And it work but i have a problem with " ParamSeparator". My problem is that if i have a file with this Text: GIF89a11 G GIF89a32 The G doesn't go counted be ...Show All
Visual Studio cusomize colors - multiple-bar charts
Hi, I was wondering if there is a way to customize colors in charts for Crystal Reports scaled with .NET2005. The information I am displaying is of this kind: 2001 (q1, q2, q3, q4 ), 2002 (q1,q2,q3,q4) where all the q's are the bars/columns clustered according to their years. CR displays the reports with colors auto chosen. Now, is there a way for me to define the colors for each of this bar other than the default I will appreciate your help. Abhijit. Hi .... sorry by the question, is related with charts using CrytsalReports fpr VS.NET anyone knows if i can change a chart value by code i need set the scale for a bar chart ..depending of some values sometime, the max value is 10 , and other times the max value can be 100 i would ...Show All
Visual Studio Express Editions Need help with new application
Hello, I put together a small desktop cms application for a clients website. I am as it is just a novice programmer and have run into a problem. The application run great in debug and when I use the exe from bin/release it also works great. They do what they are suposed to do. When I try to use the published version, it will not work. At first it would not even open. It opens now, but still does not work. After trying it on my clients machine, the puplished version did not work at all. I even tried a copy of the bin/release version. With out any avail... Please I need help. Here is a link to download the source: http://julannadesigns.com/download/CMS.zip If some could please tell me what I did wrong. Why it will not work at ...Show All
Visual Studio 2008 (Pre-release) Linq to Entities and Linq to SQL
I've just about finished reading the ADO.NET Entity Framework Overview document and have been playing with Linq, Xlinq, Dlinq (apologies for no political correctness in what these are all called now). One thing i don't quite get is why the distinction between ADO.Net entities (Linq to Entities) and Linq to SQL - other than for historical reasons. Now i think i grasp the intentions and purposes of both (disclaimer : i haven't read all the docs about dLinq quite yet!), but why they are defined as being different is a little confusing for me. Would Linq to SQL not be regarded as conceptual "Linq to Entity" - that is ADO.Net entity over a single table In other words, although they operate on a slightly different basis, should I ...Show All
Visual Studio Express Editions concerning media player
renee where do I post pause button code Private Sub btpause_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btpause.Click tmr.Stop() If WMP.playState = WMPPlayState.wmppsPlaying Then WMP.Ctlcontrols.pause() btpause.Text = "paused" btpause.ForeColor = Color.Aqua Else tmr.Start() If WMP.playState = WMPPlayState.wmppsPaused Then WMP.Ctlcontrols.play() btpause.Text = "pause" btpause.ForeColor = Color.Beige End If End If End Sub how is this... these two lines must be copied into the btplay and btstop events and any other events that might be triggered whilst the btpause button is in paused mode b ...Show All
SQL Server How to access data in a SQL Command in the OLE DB Destination editor
Instead of blindly inserting all my data from a previous task into a table using "Table" as the Data Access Mode in the OLEDB Destination editor. I would like to join this output with a reference table and insert only qualifying rows. Question is "how do I access the data from previous task so that I can do a meaningful equijoin" I know I have to use the "SQL Command" data access mode, but what next Thanks. chiraj If you are using an OLE DB Source compoennt then you can sort the data in there which means you can get rid of the SORT component which is a serious performance hit. You'll still have to set IsSorted=TRUE on the output of the OLE DB Source - but h ...Show All
Visual Basic VB2005EE PRINTING LANDSCAPE
I dont mind printing one page at a time; but how do u print landscape. The provided tools dont work: PrintDoc.PrinterSettings.DefaultPageSettings.Landscape = True Could someone help Regards, Ehmer Ehmer, 'When you click the Print button, the propgram makes a new PrintDocument object and calls its Print method. Private WithEvents m_PrintDocument As PrintDocument Private m_NextPage As Integer Private Sub btnPrint_Click( ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnPrint.Click ' Start with page 1. m_NextPage = 1 ' Make a PrintDocument and print. m_PrintDocument = New PrintDocument m_PrintDocument. ...Show All
.NET Development GetBytes() issue - attemting to load into a MemoryStream object
Hi all, I have a column in my database that is of type image (bytes) and what to load this data into a System.IO.MemoryStream object but can't seem to find out how to do it. Hopefully, someone out there would have had experience of doing this and can show me the way. I have the following code... System.IO.MemoryStream stream = new System.IO.MemoryStream(objSqlCeDataReader.GetBytes(0, 0, null, 0, int.MaxValue)); ...which I know is wrong as I think this call to GetBytes() only returns the size/length of the total bytes as I am passing in a null buffer (3rd param). How can I do the database call and pass it into the MemoryStream object in one scoop Thanks Hi, Take a look at this article for sample code: http://www.codeproject.com/cs/da ...Show All
Visual Basic Retrieve User AD GUID
I am creating several VB.net apps that store and retrieve records to and from SQL 2005. With some of this data I need to track who created/edited the data. I know how to retrieve the users login name, but I need a more unique ID since over time someone else might get the same login name with user accounts created and deleted over time. Is there a simple property simular to system.enviroment.username that will expose the users GUID or do I need to use a control like Directory Searcher you maybe talking about the SID. You can get the SID of an account using WMI add a reference to System.Management and import the namespaces, System.Management and System.Management.Instrumentation. Then try this: Dim se ...Show All
Visual Studio Express Editions memeory allocation issues
Hi, i was trying with this peace of code...in visual c++ char *str = new char [100]; delete [] str; printf ( "%u\n" , str ); char *test = new char [100]; printf ( "%u" , test ); out put was 3574064 3566512 and with the below code char *str = new char [100]; delete [] str; //printf ( "%u\n" , str ); commented this line char *test = new char [100]; printf ( "%u" , test ); out put was 3574064 why its happending like this please throw some light on this isssue I can't reproduce this. That's not unexpected, you're probing the operation of the CRT's heap manager. It uses a fancy algorithm that tries to minimize th ...Show All
Visual Studio Team System SDM Directory resource
Hi, I'm trying to create custom SDM Resource which represents a set of required for installation on "ImageServer" images. The model of resource contains FileSystem:Directory resource, but when I go to Resource settings tool window, I cannot see any Directory properties. What is a purpose of the Directory and File resource Why it is not allowed to add file to the directory, according to SDM model definition ( < Property Name = " SupportsUserCreation " Value = " false " /> ) Evgeny Popov Hi Evgeny, The following sdm model demonstrates how to extend existing Directory and File resources to create new set of Directory and File resources that can be added ...Show All
Smart Device Development VB Connect to the Categories dialog
Is it possible to interact with the built in dialogs in poom I want to be able to select, add/delete categories from my app. To closely integrate my app with the Pocket PC interface this behave will be prefered. In WM 5.0 I can add custom properties to poom, is this possible in PPC 2003 This forum is intended to deal with issues directly related to the .NET Compact Framework. It appears that this question can better be answered by someone on one of the newsgroups for Windows Mobile or Windows CE. In order to get a quicker and more accurate response, please consider reposting this question to one of the following newsgroups: Windows Mobile API : microsoft.public.pocketpc.de ...Show All
Windows Search Technologies WDS 3.0 Beta 2- Cannot index pdf file contents
Hello, I found this bug a while ago. I tried everything, install, uninstall pdf ifilters, etc..... WDS Beta 2 simply cant index pdf contents. Are anyone aware of this issue Thanks, Marcus I assume that this is still a problem with Vista RC2 Search as well. We cannot get the indexer to cover PDF file content. Is there any word on availability timeframe ...Show All
