Thanks Paul. Fritzables.
Fritzables
Posts
-
Show Databases ? -
Show Databases ?Hi All, I am trying to display a list of databases in SQL Server 2005. When I used to use MySQL I used a SHOW DATABASE which returned a list of databases. With SQL Server 2005 this command is not accepted. Can I perform the same list in SQL Server ? Fritzables.
-
Help needed with LiteUnZip !Hi to all, I am using VC++ 2005 and trying to employ LiteUnzip a series of ZIPPED files but once I retrieve the file names within the ZIP I would like to decompress them using an alternate path, so I am trying to override ze.Name and give it a path which has been defined within a String. Take a look at the code below to get an idea where I'm coming from:
private: void UnZIP(String^ file,String^ source, String^ target) { HUNZIP hz; ZIPENTRY ze; String^ inFile; String^ outFile; String^ fileName; DWORD numitems; inFile = source + file; pin_ptr INFILE = PtrToStringChars(inFile); UnzipOpenFile(&hz,INFILE,0); ze.Index = (DWORD)-1; UnzipGetItem(hz,&ze); numitems = ze.Index; for(ze.Index = 0;ze.Index < numitems + 1;ze.Index++) { UnzipGetItem(hz,&ze); // Convert to a System::String String^ systemstring = gcnew String(ze.Name); fileName = Path::GetFileName(systemstring); delete systemstring; outFile = target + "\\" + fileName; **ze.Name = outFile;**
<---- Need to find a way to convert a String to an acceptable type.UnzipItemToFile(hz,ze.Name,&ze); } UnzipClose(hz); }
Cheers Fritzables. -
INSERT - Date/Time INTO SQL ??Wout - you're an absolute legend !!! Yea, it was the missing quotes that put all things back in order. Thanks a million. Fritzables.
-
INSERT - Date/Time INTO SQL ??G'Day Wout, If I was to enter the sting at:
30/05/2007 5:30PM
then the error message goes something like:syntax error near 5.
Ok, so if I was to use theSET DATEFORMAT DMY
, at what point would I define this - sorry for the stupid question. Regards Fritzables. -
INSERT - Date/Time INTO SQL ??Hi All, I am an app in VS C++ 2005 that uses an SQL Server 2005 database. I am having trouble understanding how to enter a date into the database. The field data type is:
smalldatetime
. The date and time has been assigned to a string and would have a value like '30/05/2007 5:30PM
' When I write the query like:INSERT INTO MyTable(Date) VALUES(MySTRING)
I end up with an error and assume it's to do with the way O have formatted the string - am I on the right track ? Fritzables. -
HELP: Fixed Length String ?George, you're a legend.... works a treat. Thanks a million. Regards Pete
-
HELP: Fixed Length String ?Hi all, I have a situation where I need to return a fixed length string regardless of the length of a string that has been assigned to it. For example, if I wanted to have String1 which is made up of 12 spaces, then assing a returned value to a String2 which can be anything from 1 to 12 characters in length, how is this best done ? The following may give you an idea where I'm coming from:
String^ Result; //This needs to be a fixed 12 characters.
String^ s1 = "ABC"; Result = s1;
So I needResult
to return'ABC'
+ 9 spaces. Hope this all makes some sense.... Fritzables. -
Displaying a form Form a Form ?Thanks Chinna, Much appreciated. Pete
-
Displaying a form Form a Form ?G'Day Kotesh, Can you provide sample code on where and how I would achieve this - remember this is all reasonably new to me. Fritzables.
-
Displaying a form Form a Form ?Happy New Year To All, Up until now I have being using VS C++ 2005 to write Console type applications. I have been using VS C++ for about 6 months now. I now have a need to develop a Windows Form application but I am stuck on a issue which most will consider to be pretty basic - but I need to ask anyway. The application I am writing has a main form (Form1) and needs to show a second modal form (Form2), so to do this I have added a form to the project and in Form1.h I have
#include "Form2.h"
Now under the code for Form1.h there is a lot of code, like:public ref class Form1 : public System::Windows::Forms::Form
andvoid InitializeComponent(void)
to just name a few. Ok... where will be the correct place to declare Form2 so that I can then useForm2->ShowDialog();
? Hope all this makes sense :) Regards Fritzables -
Moving The Mouse/Cursor Then Button Click ?Thanks John, Yep, got the cursor now moving all over the place using the Cursor->Position. I will now concentrate on the mouse clicking now. :-) Thanks again John. Pete
-
Moving The Mouse/Cursor Then Button Click ?Thanks Walter..... have a look at the reply I shot Dave. Pete
-
Moving The Mouse/Cursor Then Button Click ?G'Day Dave, That sounds the GO, but what about getting the Mouse Cursor in the position I want ? Pete
-
Moving The Mouse/Cursor Then Button Click ?Hi all, I am partly through creating a console application that runs a Windows app. All this I have managed to perform, but the following I am unsure of. I now need to bring the form to the current view (which I have achieved), then put the mouse pointer in a certain position then simulate pressing the left mouse button. Can anyone suggest where I need to start looking to allow me to work this one out ? Pete
-
Moving The Mouse Then Clicking It's Button ?Thanks Christian.... I will see how I go. From what I have read it's got something to do with the Cursor and not so much the mouse. Pete
-
Moving The Mouse Then Clicking It's Button ?Hi all, I am partly through creating a console application that runs a Windows app. All this I have managed to perform, but the following I am unsure of. I now need to bring the form to the current view (which I have achieved), then put the mouse pointer in a certain position then simulate pressing the left mouse button. Can anyone suggest where I need to start looking to allow me to work this one out ? Pete
-
Converting a IntPtr to HWND ?G'Day Josh, Yep.... look'n good. Thanks again and have a great Xmas. Pete
-
Converting a IntPtr to HWND ?Ok, on previous posts you may have noticed that I have been playing around with processes and the like. I have created a Console application that fires up NOTEPAD and access the menus but I need to ensure that it remains as the
ForegroundWindow
. To do this I need to acquire the Handle of the process that I started then apply it to theForegroundWindow
property - this is where I am having trouble. The following is how I start NOTEPAD then return it'sMainWindowHandle
which is aIntPtr
:IntPtr Hnd; Process^ Proc = gcnew Process; Proc->StartInfo->FileName = "NOTEPAD.EXE"; Proc->Start(); Proc->WaitForInputIdle(); Hnd = Proc->MainWindowHandle;
Now when I include the following line:SetForegroundWindow(Hnd);
I get the following error when compiling:error C2664: 'SetForegroundWindow' : cannot convert parameter 1 from 'System::IntPtr' to 'HWND'
Can I conver aIntPtr
to aHWND
? Pete -
System::Windows::Forms Namespace ??Hey Girish, I have just tried your suggestion - and I am back up and running. Thanks again and have a great Xmas. Pete