ChoclatB0y's Q&A profile
Windows Forms Bubble events to parent control
Hello, Does anyone know if there is an easy way to pass events to a parent from child controls I have a base user control and i have overridden the OnMouseUp, OnMouseDown and OnMouseMove event handlers to drag the control across the screen. I want to be able to sub-class this base user control and add child controls to it. The problem is that&nbs ...Show All
Visual Studio Express Editions How to code for reading a data from select statement?
In my database, I have a table. I want to select the largest number of sequence (an atribute of table) . Here are the codes by C#: int t_integer; SqlDataSource dtinput = new SqlDataSource (); dtinput.ConnectionString = ConfigurationManager .ConnectionStrings[ "connectionString" ].ToString(); dtinput.SelectCommand = "SELECT [sequence] from [input] WHERE [sequence] = MAX" ; After SELECT statement, I need t_integer equal the largest number of sequence that is queryed by select statement. t_integer = ---->> the mark should be something including value of sequence t_integer = t ...Show All
SQL Server Encryption Best-Practices
Please forgive me if I have overlooked a thread that answers this question, but I assure you that I have looked. I would really appreciate a guide of sorts that would tell me the correct steps to take to properly secure a column in my database. I don't need specifics on how to do each step, I either have those already or can find them myself. In fact, I have already successfully encrypted and decrypted some data. I just want to make sure that I create the right keys and certificates and that I follow best-practices as far as backups and stuff is concerned. Thanks, Todd Sparks Here are some suggestions: - if you will need to ...Show All
Windows Forms copyright
Hi I wonder how I could write a copyright character in a messagebox as text Thanks Moorstream Thanx for all the answers... Of course I mean Word :) /Moorstream ...Show All
Smart Device Development Windows service
Hi! Does anyone know how to create a windows service in windows mobile using the compact framwork (C#). I wish to have an application run at boot time and then just display a little icon on the main desktop screen to show the application is running.. Im going crazy here! is this possible at all Thanks in advance! Lawrence If you are looking for something like windows services, then the main way on the device is to use Services.exe http://blogs.msdn.com/cenet/archive/2004/12/03/274661.aspx However, this is a native, C++ only option. That said, what you want to do is ...Show All
.NET Development Pulling images from Microsoft Access
Hi peeps. Iam completely new to all this. I belong in a macromedia world of flash. lol. But I though I would come see what all the fuss is about and downloaded myself a copy of visual web developer. It looks a really nice program and really powerful. I have probably thrown my self in at the deep end a little as I have nooo idea how anything else works. But I have been looking at pulling data from an access database in to a data list. The connection seems to work fine when I looked at a debugged webpage of it, I can see records are being pulled in. however I have set up a column in my access database as ole object and then used i ...Show All
Windows Forms Retrieve data from listbox
hi, here i have one listBox1 and populated it (using listBox1.Items.Add()) with data from two columns (name and email address) inside a datagridview. There are about hundreds rows of data and the listbox is meant for displaying whatever user has selected inside DGV. Now, with a click of a button, I want only data from one column (email address) to be inside a textbox, separated by commas. My code cannot call up all email addresses inside the listbox1. It only returns the correct number of items inside listbox1 but keep on repeating same value. Fyi, i set listBox1.ValueMember = emailaddress; here are some lines from my c ...Show All
Visual C++ Passing an array of structs
Hi all, I'm sure this is quite a simple one, but as a beginner i just can't work it out. Any help would be much appreciated. I have a main form Form1, which includes classes in headers called staticData.h and dynamicData.h Within staticData.h, i have a struct called city: struct city { public : int cityID; char cityName[22]; char countryID[2]; char countryName[20]; double lng, lat; int annualDemand; int populationrank; bool shown; }; When i initialise form 1, in form1.cpp, i declare a global array of city structs (City) #include "stdafx.h" #include "staticData.h" #include "dynamicData.h" #include ...Show All
Windows Forms how do u change the appearance of the windows and buttons
how do u change the appearance of the windows and buttons from Windows classic style to the Windows XP kind. I have XP and it wont let me change, like there's no choice to put it back HELP ME!!!! PLEASE do you have a manifest file if you dont, hear is what to do: 1 go to the bin folder of yur application 2 create a new text ...Show All
.NET Development Missing indexing methods for SortedDictionary?
I have a fairly standard data structure need: a sorted collection with fast insert, delete that can be accessed efficiently by key and by index. The SortedList has O(n) insertion so the closest is the SortedDictionary but it has no means of indexing. Why not This should be the difference over a standard Dictionary that you can easily perform operations like head and tail. I would expect the method RemoveAt, GetAt etc like the SortedList. The SortedDictioary.ValueCollection seems next to useless. You can foreach it but not index it. Am I missing something thanks in advance, Duncan No, you're not missing ...Show All
Windows Forms FileSystemWatcher
Has anyone used FileSystemWatcher to monitor a folder on a Novell 5.1 drive It works great on my local drive but does not monitor a Novell drive. Thanks, Bill FileSystemWatcher works because windows fires specific events when a file is accessed, modified, ect. These events do not get fired on the Novell Drive. If its not critical to have&nb ...Show All
Visual C# convert help
I have a dll with a method that reads from a pdf file. It needs a byte array parameter. I read from another pdf and i get a string (or a char array). Now i want to convert from string to byte array. I tried Encoding.UTF7/8/ASCII/Unicode.getBytes(string) but they don't work properly (\n\r not converted) I also tried to convert char by char in byte but i have also a perthousand ( %o ) that creates problem Help! Thx A char in .NET is 2 bytes. A string is essentially an array of chars. If you're reading binary data you should always use byte, not char/string; your data will most likely get mangled. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 3D Shapes with C#
I am working o a c# application which needs to draw Solid Blocks, Spheres and Cylinders in 3D just like a CAD Program. Basically, I want to draw something like this: http://www.orbisnap.com/vrtdesc/matlab.jpg What 3D engine do you recommend for doing this Also, what software do you recommend for making 3D Shapes Thanks a bunch. Jess I'll entertain you with the same answer I sent you in email. Though interestingly enough you were called "'Syed Ijaz'" in the email... For simple blocks, spheres and cylinders DirectX has Mesh.Box, .Sphere and .Cylinder to generate ...Show All
Windows Forms Drag & Drop Reorder of Row
I tried the Drag & Drog reorder of row as shown in the DGV FAQ Doc, but it doesn't work. Selected row was removed but no new row being added at destination. Anyone know the reason Thanks, Is the grid databound The sample in the FAQ only works for unbound grid. -mark DataGridView Program Manager Microsoft This post is provided "as-is" ...Show All
Visual C++ Setting include directory for cl.exe?
Does anyone know how to set the include directory for cl.exe for vicual c++ 2005 express I've been searching Google for a solution to no avail. Please help me. You can use the /I compiler option to to point to any directory to include ( http://msdn.microsoft.com/library/default.asp url=/library/en-us/vccore/html/_core_.2f.i.asp ) Also, take a look at http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx in case you want to use the PSDK headers and libraries. Thanks, Ayman Shoukry VC++ Team ...Show All
