InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1201. |
Solve : XML Data conversion help? |
|
Answer» Hello everyone, |
|
| 1202. |
Solve : passing a variable for CD in ftp script from RPG CL? |
|
Answer» Does anyone KNOW if it is possible to PASS a variable from an RPG cl to an FTP script for command CD? |
|
| 1203. |
Solve : Email Software?? |
|
Answer» Say I wanted to MAKE my own email server system (just for the *censored* of it. I love learning NEW THINGS.) |
|
| 1204. |
Solve : Access Database - Search box? |
|
Answer» In an Access database, I have a form that, after the USER performs a search, displays the name of an employee, the parking tag #(s) that have been assigned to them and their phone extension. I'm using a search box (a combo box) on that form where the user can search using the Tag # to get the results mentioned above. A query showing all the employees and their related Parking Tag numbers is the DATA source used in the combo box. The combo box also has the following code in an After Update event procedure: |
|
| 1205. |
Solve : Turbo C? |
|
Answer» can SOMEONE give the CODE of Turbo C- Lexical Analyzer ( Data Structures ) ROLL Eyes You can try your LUCK with this link |
|
| 1206. |
Solve : unix script programming using awk? |
|
Answer» The awk script is invoked from the command line with an inputfile that contains data on products, associates and sales |
|
| 1207. |
Solve : Inconsistent vb error? |
|
Answer» So I have an FTP client integrated into one of my VB6 programs. The function to send files through FTP is acting inconsistent and I think that it is a problem with VB. So what I am asking is why doesn't the second function work the same way as the first? FTPPutFile doesn't return a boolean- it returns a BOOL, which in the WINDOWS headers is actually an int; additionally, it actually returns 1 for true, and 0 for false; whereas Visual Basic uses -1 for true, and 0 for false. This can cause some problems when you try to mix them around. You could either return a boolean expression LIKE this: Quote Private Declare Function FTPPutFile Lib "wininet.dll" Alias "FtpPutFileA" (ByVal hFtpSession As Long, ByVal lpszLocalFile As String, ByVal lpszRemoteFile As String, ByVal dwFlags As Long, ByVal dwContext As Long) As Long Or you could use CBool() on the return value of FTPPutFile when returning it from the function, or just use the method you did and use an If. In any case, the inconsistency is most likely because of the fact that the function declared doesn't return a OLE Boolean value but rather a Long Integer and VB was interpreting it incorrectly as a RESULT. |
|
| 1208. |
Solve : NMAKE fails repeatedly fails.? |
|
Answer» I'm trying to install wxWidgets 2.8.12 into Microsoft Visual C++ 2010. Whenever I use nmake -f makefile.vc (exactly as in \build\msw\install.txt), it fails repeatedly with ERROR code 0xc0000135. wxWidgets is a C++ library that lets developers create applications for Windows, OS X, Linux and UNIX on 32-bit and 64-bit architectures as well as several mobile platforms including Windows Mobile, IPHONE SDK and embedded GTK+. It has popular language bindings for Python, Perl, Ruby and many other languages. Unlike other cross-platform toolkits, wxWidgets gives its applications a truly native look and feel because it USES the platform's native API rather than emulating the GUI. It's also extensive, free, open-source and mature. Why not give it a try...Mature? The wxWidgets is a work in progress.this may help. |
|
| 1209. |
Solve : Easiest programming language? |
|
Answer» Quote from: ericb82 on March 11, 2011, 06:17:46 AM If you are talking about a program you could learn easily including the syntax and how it works, you could try C or C++. Some languages like python, would be easy to pick up but this is for advance programmers who already know how to formulate logic. None of that makes sense. C and C++ have the most complicated syntax and grammar of most programming languages (to the point where C++ is often poked fun at for this very reason). "formulating logic" is something somebody will have to know how to do to even start programming. It's not something only "advanced programmers" would know, and it's no easier to learn how to "formulate logic" with C/C++ then it is with python. Harder, I would guess, given the extra hoops you have to jump through to do anything useful a lot of the time. Quote C is good because unlike java, which is an object oriented language, it functions as a whole block.That also makes no sense. How does C "function as a whole block" and how does it's not having any Object Oriented constructs whatsoever (aside from the PROGRAMMER being able to create their own virtual method tables in a struct) make it advantageous? There is no doubt that often the additional overhead of having to encapsulate objects in classes and objects can be burdensome for programs designed for simple tasks, but to push it's complete absence as an advantage is ridiculous, especially since such an advantage is completely subjective.BC, I would not add or take waway anything you say. I wish to observe that thenOP has not yet replied. Perhaps he wants a simple quick answer that would require little effort and time. Here is an internet quote about how there is a collective wishbone for 'learn how to program quickly.' Quote Teach Yourself Programming in Ten YearsI REALLY picked up programming from Windows Batch. After I got tired of making scripts to automate some stuff with my computer, I tried PHP and never looked back. The future is on the web. There's more demand for back-end developers so if web developement is something you're looking to do at a career LEVEL, I would start with HTML/CSS/JS and slowly go to the server side languages with PHP as a starting point and then going on to ASP.NET, Python, etc..how i can learn c++ in easy way Quote from: imransindhu on April 24, 2011, 12:55:39 PM how i can learn c++ in easy waySee my post #16. It is always easy if you allow ten years.Quote from: imransindhu on April 24, 2011, 12:55:39 PM how i can learn c++ in easy way read the tutorial from cplusplus.com thoroughly and practice a minimum of 10,000 hours.Quote from: 2x3i5x on April 27, 2011, 01:20:11 PM read the tutorial from cplusplus.com thoroughly and practice a minimum of 10,000 hours.With no disrespect, 2x3i5x, The OP seems to be bright and attentive. I wood say he can do well in - just 9,600 hours of - constant daily practice on C++. After all, it is not too hard. C++ isn't difficult, but it has a lot of complicated rules to learn such as Koenig lookup, SFINAE, RAII, exception safety etc. It is also extremely flexible, allowing such things as template meta-programming, and the main confusion is that when you use C, or C++, you are really working in two languages; the language the preprocessor understands and the language the compiler understands. Either way you only pay for what you use, but when there is so much you can use, it takes a lot if you want to learn it all. But there is never a good reason to "learn it all". Learn only what is applicable to your current need for C++, because if you go gallavanting around learning about template classes when you don't need them, you'll just end up re-learning them when you do.Quote But there is never a good reason to "learn it all". Learn only what is applicable to your current need... Good idea even out of context. I'm not much of a programmer but I did program in 8086 assembly and later BASIC and have kept up with DOS through Win98SE .. and then only run XP and Vista without digging DEEP into them. (I mod the registry is about a far as I go) .. It depends on what you want to do with programming. If it's simply the exercise of learning something in computer language, I really suggest that you go back as far as you can and look over all of the programming 'languages' of which assembly is one and C++ is one of the latest. Every 'thing' has a programming language including genetics, x-y machine shop machines, your automobile, and nearly any thing you can think of. So when you ask which is 'easiest' it depends what you plan to do with it. I do believe that no matter which language you choose you'll be miles and years ahead when you take the time to study the history of all languages. You can limit yourself to those, languages, that are in line with the one you focus on and over time branch out to those which had support roles for the one you focus on. They all had something to contribute. The reason to look at them all is because no language is perfect. You'll find that other languages have benefits to them which the one you use lacks. This won't mean you can combine them but it will mean that when you see the limitations you'll be better prepared to set a course when you get down to actually using your chosen language. Even in English I've learned that it pays, my thinking, to know what words mean in other languages. Most of English came from French, or Greek, a bit from Latin. Knowing where from and why an English word was created makes me that much better at using it. Check out your aptitude and if it's languages then 'any' languages will be of interest to your brain. Stop feeding it and your brain will atrophy. Feed your brain and you can feed everyone else's brain. LovingTheBatchofCookies, I like your post. |
|
| 1210. |
Solve : Iframe not working in Firefox? |
|
Answer» Hi guys, |
|
| 1211. |
Solve : Javascript Loop? |
|
Answer» Is it possible with a javascript for loop to reference one of the PARAMETERS? Here is my CODE: |
|
| 1212. |
Solve : Favorite programming software?? |
|
Answer» Quote from: guss on February 07, 2011, 04:34:17 PM dev-c++ is outdated. Most of the programmers from dev-c++ are working on codeblocks, which is more up-to-date, and better in general, I think.Who says it is outdated? And what part of it is outdated? Why should it matter? I have tools I got over ten years ago and they still work for simple tasks. An why single out Dev C++ as being outdated? They all get very dated after two or three years. Banach files are very dated, people still write them. I was just being informative, no need for hostility. But, if you want to know, the dev-c++ site says: February 21th 2005 : Dev-C++ 5 Beta 9.2 (4.9.9.2) released ! January 13th 2005 : You can now support Dev-C++ by making a donation ! December 1st 2004 : Dev-C++ 5 Beta 9.1 (4.9.9.1) released ! July 31th 2004 : Dev-C++ 5 Beta 9.0 (4.9.9.0) released ! June 9TH 2004 : Dev-C++ 5 Beta 8.10 (4.9.8.10) released ! May 9th 2004 : Dev-C++ 5 Beta 8.9 (4.9.8.9) released ! February 3rd 2004 : Dev-C++ 5 Beta 8.7 (4.9.8.7) released ! November 23th 2003 : Dev-C++ 5 Beta 8.5 (4.9.8.5) released ! October 20th 2003 : Dev-C++ 5 Beta 8.4 (4.9.8.4) released ! It's not only outdated (last updated early 2005) but it's been deprecated by other free offerings- particularly codeblocks. Most of the developers who worked on Dev/C++, as guss stated, are now working on code::blocks- it's unlikely Dev/C++ will be enhanced in the future. This isn't even counting the issues I noted (such as using a User interface dialog from over 20 years ago). Quote Why should it matter?Because people who use compilers usually want their programs to work with recent configurations. An analogous statement could be to ask "why it matters" wether your windows SDK is for windows 95 or windows 7. Of course considering I'm arguing with somebody who still thinks FORTRAN is the bees knees clearly I'm wasting my breath. Quote I have tools I got over ten years ago and they still work for simple tasks.Compiling the code to a project-organized application is ANYTHING but a simple task. The fact is dev/C++ is free. So is Code::Blocks. code::Blocks is better, more compatible, and is still an active project. Thank you BC. I do like to be up of up to date almost. Fortran is old, but not forgotten. Quote ...So they had to have somebody that could still read it. Quote So they had to have somebody that could still read it.Really? that's an interesting assumption, SINCE I ported perl modules to Visual Basic classes years before I knew anything about perl. You are drawing the incorrect implication that because somebody is able to understand code from another programming language they must have had experience using it previously. That is false. You don't need to have been working with FORTRAN for many years to be able to port it to another language. Good point BC. My First Certified computer code was COBOL. Now I can't write even a line of it. BTW, it is now Fortran, not FORTRAN. And if you keep doing that I will call Vista VISTA. Quote from: Geek-9pm on February 07, 2011, 06:27:16 PM BTW, it is now Fortran, not FORTRAN.I had to rewrite that passage, I recall making it proper-case but I REWROTE it and must have written it in caps. They are both valid; FORTRAN refers to the versions before FORTRAN-90 (no doubt, then, you are familiar with the "FORTRAN", rather then the Fortran variants) whereas Fortran refers to later versions. Either way, Fortran is a acronym for FORmula TRANslator, so it's valid anyway; Vista doesn't stand for anything. Quote from: BC_Programmer Vista doesn't stand for anything.Let me quote that in future posts. Quote from: jackworgans on April 25, 2011, 12:55:50 PM I am learning C++ ....It is my favorite programming language. If it is your favorite, that is enough reason. For what it is worth, most modem languages allow you to get into the library of some other language if necessary. So you don't have to switch over to another language just because there is some feature you don't readily have in you favorite language. |
|
| 1213. |
Solve : Difficulty with adding? |
|
Answer» Hi, |
|
| 1214. |
Solve : how do you get a web page load up automatically in visual basic 2008?? |
|
Answer» I was wondering how to have a WEB browser object auto-load a web page (such as google.com.au)... I was wondering how to have a web browser object auto-load a web page (such as google.com.au)... HTTP://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx |
|
| 1215. |
Solve : Random Integer in QBASIC?? |
|
Answer» Is it possible to have a random integer in QBASIC, like %random% in BATCH, but it won't TAKE a number over a certain amount, like in Turing?Got it! If I just use a loop and INTEGERS, pretty simple. |
|
| 1216. |
Solve : computer programming...(I think)? |
|
Answer» I recently got a computer. It was sold to my FRIEND from her work... SINCE it is a work computer there is a default backround and SCREENSAVER. I have TRIED to change them but all the areas are greyed out so i cannot select them.. All i want is to have a personalised computer.. What must I do to be able to change it??? please help me.. Thanks a mil.You need to get admin privileges to do that. It sounds like that system is still set up in a 'business account mode.' You need to get admin privileges to do that. It sounds like that system is still set up in a 'business account mode.'Yeah. A fresh install would allow you to access full admin accounts and other options. |
|
| 1217. |
Solve : Batch File/Script Help needed!!!? |
| Answer» | |
| 1218. |
Solve : Need help with Search and replace VBS? |
|||
|
Answer» Hi
.writeLn ("") .writeLn ("") End With .visible= True End With WScript.sleep 100 CreateObject("wscript.shell").appActivate _ usTitle please helpQuote from: emilware on May 19, 2009, 06:54:25 PM please helpPlease don't double post, this thread is still pretty high up and someone who knows VBS more than me will help you.judging from your script above, isn't something like this should be simple: Code: [Select]f=objdialog.filename datfilename=fso.getparentfoldername(f) & "\" & fso.getbasename(f) & ".dat" wsh.echo datfilename use fso to open src and dat file and then replace on each file. your script already contain sample on opening file, replacing text and rewrite the file with new text. |
||||
| 1219. |
Solve : Icon associated dll? |
|
Answer» i mean I want to create an icon associated dll file. Clearly SPEAKING I want to put the icon file into the dll file.put it in a resource in the dll.Quote from: BC_Programmer on May 18, 2009, 01:22:03 PM put it in a resource in the dll.Which you will need RESHacker for right?not necessarily; Visual STUDIO 6 can open executables/DLLs and edit their resources (I think) and of course if they are the creator of the DLL they can simply change the resources themselves. Eitherway, resource hacker is a far better alternative to trying to get Visual Studio to cooperate, exporting the dll's RES file, decompiling the RES file, extracting the resources to change, changing them, recompiling the RC file,etc... reshacker is far easier.Quote from: BC_Programmer on May 19, 2009, 07:52:56 PM not necessarily; Visual Studio 6 can open executables/DLLs and edit their resources (I think) and of course if they are the creator of the DLL they can simply change the resources themselves.I used res hacker to modify my start menu button text...then I changed it back... I think I used it a while back to ENHANCE the VB6 associated icons for classes, modules, forms and so forth to use the equivalent .NET icons that looked the same. I also used it to remove the ads from MSN messenger.Quote from: BC_Programmer on May 19, 2009, 08:03:05 PM I think I used it a while back to enhance the VB6 associated icons for classes, modules, forms and so forth to use the equivalent .NET icons that looked the same.Lol nice...And of course- inserting Common control manifest in programs that refuse to use the Luna look... such as VB6. I did lose the use of the colour palette in the properties window but that was fairly inconsequential. |
|
| 1220. |
Solve : QBASIC Download Link?? |
|
Answer» As the title suggests, I am looking for a link to download QBASIC 1.1 (which I was told is the easiest VERSION to learn). I don't want anyone telling me how much Such-and-such language is better than QBASIC, I just want QBASIC. Thank you in advance.http://www.qbcafe.net/cgi-bin/downloads/download.pl?dlid=caT8KNMrODZPM&compiler/interpreter=qb11.zip http://www.qbcafe.net/cgi-bin/downloads/download.pl?dlid=caT8KNMrODZPM&compiler/interpreter=qb11.zipRequest Denied. This file is only AVAILABLE at Quick Basic Cafe. *Redirects to Quick Basic Cafe*http://www.qbcafe.net/qbc/english/download/compiler/qbasic_interpreter.shtml try DOWNLOADING from there instead. (same file, but it's at that site... they must be checking the referrer)Quote from: BC_Programmer on May 19, 2009, 08:01:44 PM http://www.qbcafe.net/qbc/english/download/compiler/qbasic_interpreter.shtmlJust did (beat you to it lol). |
|
| 1221. |
Solve : Regular Expressions - VBscript? |
|
Answer» I have a config file that passes Parameters to a VBscript, in this VBscript I want to confirm that the Parameter is correct. |
|
| 1222. |
Solve : Put icon into the .dll file? |
|
Answer» I WANT to write a .dll file. I want to put an icon file into that dll file. Please help me to write |
|
| 1223. |
Solve : creating a .dll file that associates icon? |
|
Answer» I have an icon file ,say abc.ico. I want to create a .DLL file which associates this ico file. |
|
| 1224. |
Solve : Qbasic key repeat? |
|
Answer» Im making a game in qb where the arrow keys control a sprite on screen. I currently use: k$ = INKEY$. Then check k$ to change to x/y coordinates of the sprite by +/- 10. |
|
| 1225. |
Solve : File size separating? |
|
Answer» I have some txt files and i want them all to be separated in text files less than 10 kb (9.9 kb or something like that). I'd like a batch FILE but it could be USEFUL even if it is in c++ or c#. I want the program to create NEW files with similar names like: |
|
| 1226. |
Solve : QBASIC Programming for Kids? |
|
Answer» Some of use do not like the .NET method because it requires so much additional changes to be made to the system. The older BASIC compilers had a single RUN TIME library that did not have to be pushed into the system. The magic of QBASIC is that you did not have to declare anything, except in real TOUGH applications. Just $ to identify a string and everything else was a floating point number. Great for Kids and ANYBODY starting out. Even simple arrays were automatic.many other modern programming languages, eg Python have better data structures such as dictionaries and far much better than QBasic in terms of libraries / modules, string parsing engines, etc... and definitely suited for kids as well...Quote from: Geek-9pm on May 14, 2009, 05:37:03 PM Some of use do not like the .NET method because it requires so much additional changes to be made to the system. The older BASIC compilers had a single run time library that did not have to be pushed into the system. True and you have to install the NET framework on the COMPUTER to run .NET apps. To bad they can't let you just build it into a stand-alone(no framework) EXE. |
|
| 1227. |
Solve : C++ Header File? |
|
Answer» Im teaching myself how to program with c++ so im not so good at it, Im trying to get my header file to work, and the compiler comes up with an error saying Yes, did you not try the Sorry, Im new to c++ so i haven't learned about #pragma yet if you could explain how to use it in my case to help me Ill be greatly thankful Quote from: Ashutosh32 on May 01, 2009, 02:32:52 PM Sorry, cant do much right now, on a mobile phone.and yes I am using Dev C++Remove the #ifndef mess, just add the line Code: [Select]#pragma once in the top of your source file. Quote from: Ashutosh32 on May 02, 2009, 11:22:06 PM Remove the #ifndef mess, just add the linethanks for the information but I ENDED up getting the same errorSo is there an error in my code or is it my compilerIf it's any help, I got the same errors trying to compile with Visual C++ 6. |
|
| 1228. |
Solve : How can I display specific data?? |
|
Answer» Dear Sir |
|
| 1229. |
Solve : Programming help? |
|
Answer» im having trouble understanding this programing class i have and how to complete it so if you COULD PLEASE help it would be greatly appreciated. im not sure how to create the constructor and complete the data in exercise 1, and in exercise 2 i dont understand what to complete and how to complete it. |
|
| 1230. |
Solve : Programming question? |
|
Answer» I have a question for the programmers....Can someone advise me as to the the best MS software which would help me LEARN to program....I have free access to all titles for another week or so and I saw Patios' reference to Windows 7, so I'm downloading that as I type, but I see alot of titles I know would be useful but I'm just not sure what I need. Any suggestions for basic programming?It depends on your objectives. Any suggestions for basic programming?if you want to learn programming, you can try Python. It easy to learn, can not only be used on Linux, but also Mac, and of course windows. Quote from: gh0std0g74 on May 03, 2009, 07:21:31 PM if you want to learn programming, you can try Python. It easy to learn, can not only be used on Linux, but also Mac, and of course windows. Thank you....Quote from: Geek-9pm on May 03, 2009, 11:08:21 AM You can download the entire Visual Studio. Is it free now? Did I miss that? No Dias, the technical college I'm attending has an agreement with M$ that allows us to download most any M$ product free of charge.....full complete programs.........and we are instructed to make use of the service as much as possibe, so I've basically more than covered the tuition costs with the free programs I have downloaded. Only program I would have to pay for would be Office 2007, which they sell for $65.Quote from: Karnac the technical college I'm attending has an agreement with M$ Ah, I understand. But outside of such agreements, people can't just "download the entire Visual Studio" legally, I THINK. At least not without paying M$ some serious money. Quote from: Karnac on May 04, 2009, 08:31:06 AM Only program I would have to pay for would be Office 2007, which they sell for $65.why waste your $$ when you can have it free.? Open Office is definitely a good alternative if you don't want to spend the money for Microsoft Office.Quote from: Dias de verano on May 04, 2009, 06:52:40 AM Is it free now? Did I miss that?Yes and No. http://www.microsoft.com/Express/ You can use the 'express' version as atrial. For useful commercial work you would pay some serious money.I am transferring files from windows to unix, with this i want to include inside my batch file , to LOG error if any or if successful, then write at a certain file. PLEASE advise.My advice is to start a new topic. |
|
| 1231. |
Solve : Call pdf file from visual basic 6.0? |
|
Answer» Help me! iPath = "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe filename " Change the line to Code: [Select]iPath = "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe" & " " & filename You can't use Variables inside double quotes. Only String values are represented by double quotes. your inserting the filename within the string: Code: [Select]Private Sub Command1_Click() Dim iResult As Double Dim iPath As String Dim filename filename = "d:\2009calendar.pdf" 'iPath = "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe filename " 'Fixed line below: iPath = "C:\Program FIles\Adobe\Acrobat 7.0\Reader\AcroRd32.exe " & filename iResult = Shell(iPath, vbMaximizedFocus) End Sub That should work. However, while I'm here- how about I GIVE you some suggestions for improvement? As an example, instead of EXECUTING Acrobat reader directly, it's possible to instead execute the pdf file itself, which opens the program that is set to open PDF files. To do this, Place this code in the Declarations section of the form (the very top, underneath "Option Explicit" if present. Code: [Select]Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _ (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long And then place this at the bottom of the rest of your code... Code: [Select]Private Function ShowFileDefault(FilePath As String, ownerHwnd As Long) As Boolean Dim dummy As Long 'open the file using the default Editor or viewer. dummy = ShellExecute(ownerHwnd, "Open", FilePath & Chr$(0), Chr$(0), _ Left$(FilePath, InStr(FilePath, "\")), 0) ShowFileDefault=Dummy End Function As for your original code, to use the new routine: Code: [Select]Private Sub Command1_Click() Dim iResult As Double Dim iPath As String Dim filename filename = "d:\2009calendar.pdf" 'replaced this block... 'iPath = "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe filename " 'Fixed line below: 'iPath = "C:\Program FIles\Adobe\Acrobat 7.0\Reader\AcroRd32.exe " & filename 'iResult = Shell(iPath, vbMaximizedFocus) 'with this line: ShowFileDefault Filename, Me.Hwnd End Sub I hope this helps! Thx all!while using the last code in my project and run i got the message Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _ (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long -- i added this option in the general declarations option Private Sub mnuHelpGeneral_Click() Dim iResult As Double Dim iPath As String Dim filename filename = App.Path & "\help.pdf" ShowFileDefault filename, Me.hWnd End Sub -- i Added this in the in the help click option Private Function ShowFileDefault(FilePath As String, ownerHwnd As Long) As Boolean Dim dummy As Long 'open the file using the default Editor or viewer. dummy = ShellExecute(ownerHwnd, "Open", FilePath & Chr$(0), Chr$(0), _ Left$(FilePath, InStr(FilePath, "\")), 0) ShowFileDefault = dummy End Function -- i added this in the bottom of the code but while i run the source and got error messages ByRef argument type mismatch please help me to solve this problemCode: [Select]Dim filename dimensions a Variant type variable. ShowFileDefault wants a String. Either change the Dim to say: Code: [Select]Dim filename as String Or, optionally, change the showFiledefault declaration to: Code: [Select]Private Function ShowFileDefault(Byval FilePath As String, ownerHwnd As Long) As Boolean which will attempt to convert the given argument (in this case, a variant) to the required string. Code: [Select] dummy = ShellExecute(ownerHwnd, "Open", FilePath & Chr$(0), Chr$(0), _ Left$(FilePath, InStr(FilePath, "\")), 0) and if the 5th argument (lpDirectory) means WORKING directory, then InStrRev should be used instead of InStr that returns the root drive??Or, just leave it blank. That works too. Probably change the 0 to vbnormalFocus as well; 0 appears to make it appear on the taskbar but not be able to display the window to the program. I prefer ShellExecuteEx myself, actually.yup, correct, that works too. from msdn reference: http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx Quote lpDirectory ShellExecuteEx API looks complicated, but seems to provides more control on the created process. do you have a wrapper module for ShellExecuteEx?It's not really that complicated... Here's one that uses it to show the Open With dialog for any file: declarations: Code: [Select]Private Declare Function GetCurrentProcess Lib "kernel32.dll" () As Long Private Declare Function ShellExecuteEx Lib "shell32.dll" (ByRef lpExecInfo As SHELLEXECUTEINFOA) As Long Private Type SHELLEXECUTEINFOA cbSize As Long fMask As Long hwnd As Long lpVerb As String lpFile As String lpParameters As String lpDirectory As String nShow As Long hInstApp As Long ' fields lpIDList As Long lpClass As String hkeyClass As Long dwHotKey As Long hIcon As Long hProcess As Long End Type Code: Code: [Select]Public Function OpenWith(ByVal HwndOwner As String, ByVal FilePath As String, Optional ByVal Icon As Long = 0) As Long Dim sei As SHELLEXECUTEINFOA Dim verba As String verba = "openas" sei.hIcon = Icon sei.hProcess = GetCurrentProcess() sei.hInstApp = App.hInstance sei.lpVerb = verba sei.lpFile = FilePath sei.nShow = vbNormalFocus sei.cbSize = Len(sei) OpenWith = ShellExecuteEx(sei) 'Stop End Function 'another option, would be to allow for the verb to be specified as an argument, along with several other PORTIONS of the structure. |
|
| 1232. |
Solve : i have a dell laptop and am inthe command prompt to format windows vista hard dv? |
|
Answer» I need to know what to type the available options are |
|
| 1233. |
Solve : ADD ONS? |
|
Answer» can any ONE TELL me what they are and what to look for and delete the one s that are a PAIN, thank youIn what context?DEFINE "pain." |
|
| 1234. |
Solve : Preventing task manager appearing over a program in VB.Net? |
|
Answer» I have created a full screen PROGRAM in VB.Net that requires a password to exit, however I can still end it using the processes tab in task manager. |
|
| 1235. |
Solve : Correcting a program? |
|
Answer» Can somebody help me fix this program? Thanks! |
|
| 1236. |
Solve : Vista Games? |
|
Answer» :)HI One cant be sure that it would run if you copy directly. You need the installer of the game. You also need to verify whether the game is compatible witg XP. Sorry I hope to READ more attentativly at the Advisory boards. Thanks for informing me with regards to compatability. I am glad that I could help you. Good luck with the game, let us know when your DD is happily gaming. |
|
| 1237. |
Solve : C++ Header problem? |
|
Answer» I am trying to create an "all inclusive" header so i only need to type #include "all.h" at the beginning of a PROGRAM |
|
| 1238. |
Solve : c++ system command? |
|
Answer» Where is the best place to go to learn how to use SYSTEM COMMAND in C++? |
|
| 1239. |
Solve : Make me understand? |
|
Answer» Hi Geeks!! Make me understandWell, I could beat you with a rubber hose and tell you it is for your won good. Should that help? Cloud computer is about taking away your PC and punishing you if you want it back. Read this link before it is banned! http://www.infoworld.com/d/cloud-computing/cloud-computing-inherently-evil-409 Yes, I do a lot of joking here. But this is not a JOKE. Please look over what he says. The infoworld people are good thinkers. Take a look.Hey Guys! Pls don add on to the "Trouble"! I have got the simplest one through FAQ of Panda's Pioneer contribution i.e. their new Cloud- Computing based Antivirus! Just check-out the attachment...! Do not spill more "Bouncers"...please! [attachment deleted by admin] |
|
| 1240. |
Solve : file manipulation C++? |
|
Answer» I was wondering how a person could take a line command, and store it into a data file as text, and then access that text later and MAKE it an actual command within the program later. Any thoughts?you doing this for homework?Sort of. I need to learn how to do this. I want to CONSTRUCT some kind of program where I can do a creative graphically and MUSICALLY INTERACTIVE application. I need someone to help me with SPECIFIC questions when I run into snags. If you can help me with this, then I am at hybridsealy(at)comcast.net Thanks. |
|
| 1241. |
Solve : Creating an Array of a structure? |
|
Answer» Hopefully I can make this as simple as possible. |
|
| 1242. |
Solve : How can I design a program in VB 6.0 to backup all Excel or Word files?? |
|
Answer» Dear Sir |
|
| 1243. |
Solve : how to know minimum system requirement of a c++ programme? |
|
Answer» hi myself MOHAMMAD MIYAN |
|
| 1244. |
Solve : [C++] In the statement -- -- What does i++ mean?? |
|
Answer» -- The statement is i++ mean post increment. equivalent to i=i+1Like in batch, set /a num+=1Quote from: Helpmeh on April 25, 2009, 10:25:19 AM Like in batch, C++ is NOT like batch at all.Quote from: Geek-9pm on April 25, 2009, 06:23:26 PM C++ is NOT like batch at all. I THINK he meant to say that set /a num+=1 is the batch equivalent to the C++ command, does same type of thing. Quote from: x2543 on April 25, 2009, 06:40:59 PM
OK, I see what you mean. On my computer set /a num=+1 gives the value as 1 Maybe he meant set /a num=num+1 Or did I miss something? What did I miss? Quote from: Geek-9pm on April 25, 2009, 06:51:39 PM OK, I see what you mean. On my computerset /a num+=1 and set /a num=%num%+1 are the same thing. It will return 1 because a blank variable is equaled to 0, but also a blank line. In math, it's equaled to 0, but with ECHO it counts as nothing being there.i++; simply mean i=i+1; i++; will just increament value of i by 1. in c,or c++ i++,++i are same if. if they are not used with other variable. in the same way --i,i-- are same. consider i=5; i++; now the value of i is simply 6; i=5 ++i; again value of i is 6; but u just consider statement i=5; c=i++; the value of c is 5, i is 6. i=5; c=++i; the value of c is 6,i is 6;++ is an unary increment operator which INCREMENTS the value of the operand by 1. I'd recommend reading books about C++. Quote books about C++.So if I go to the library and ASK for a BOOK about C++ they will give me a book about D Which comes after C. Is that right? Quote from: Geek-9pm on April 28, 2009, 10:16:02 AM So if I go to the library and ask for a book about C++ very funny Never knew your librarian uses a C++ compiler for everything that is told. Anyways you should get "Expression syntax" because "give" or "me" or "a" or "book" or "about" or "C++" none are valid in C++ syntax. Try Code: [Select]library.getBook("C++ for dummies"); If that fails refer to the manual for that librarian. |
|
| 1245. |
Solve : How to code registry modifier (logic wise)?? |
|
Answer» I am about to finish my first year learning programming, so basics are covered in C#. I would like to code a registry modifying application, but I don't know how to! I'll be able to find the file but that's about it. ... registry modifying application....We wish you the best. But what you have is know as a Programming Paradox. Common usage makes if DIFFICULT to put Logic and Registry in the same paragraph. Or page. If it follows logic, it would not be part of the Windows Registry. That is why the Registry exists, to deal with things that do not follow logic which is brother of reason. Anyway, look here: http://support.microsoft.com/kb/136393 Of course, I could be wrong. That conclusion needs logic and reason. Interesting, I guess it makes sense. Overall I know how to modify registry myself. Thanks for clearing this out.Quote Common usage makes if difficult to put Logic and Registry in the same paragraph. Or page. If it follows logic, it would not be part of the Windows Registry. That is why the Registry exists, to deal with things that do not follow logic which is brother of reason. what? Please explain.Quote from: BC_Programmer on April 28, 2009, 08:17:07 PM
HI BC Can you give me a recommendation as to what source material one would study for the Windows Registry. VISTA preferably. Try Amazon or Barns & Noble and search Windows VISTA registry. Let me know which is the logical, book of reason and I will get it and read. If it is logical, reasonable and mostly complete, I will eat my tail feathers. (With salt.) And if nobody has yet to write such a GUIDE, I rest my case. the fact that there is no guide is because it's simply a heirarchal tree structure. There is nothing illogical or without reason about it- it's a central storage repository for settings. The thing is- it really didn't matter what MS had done- if they had, for example, stayed with INI files, then everybody would be complaining about that.Quote There is nothing illogical or without reason about it- it's a central storage repository for settings.I was hoping you would recommend some light reading. Well, the TS wanted to have a simple guide. Or a step by step. As far as I know the Registry does not give you an error message if you do something dumb. Here is something anybody can try. Modify the drive letter of your BOOT partition. Make if , say D: or E: instead of C: because it is only a setting, not an absolute reference. -Right? Here is a step by step: http://www.petri.co.il/change_system_drive_letter_in_windows_xp.htm Also, notice the links he gives at the end of the article. Must read. For some strange reason MS recommends that your make a backup of the registry. Is that logical? If it is, why don't people do it? Quote For some strange reason MS recommends that your make a backup of the registry. Is that logical? If it is, why don't people do it? people often won't back-up their own work. Only very dutiful users back-up their computer's work. Quote I'll be able to find the file does this mean you want to literally open the DAT files and try to parse their contents? |
|
| 1246. |
Solve : Is it possible to hear sound included in word doc after converting it into pdf? |
|
Answer» I have written a Ms word document where I have included an wav file. When I am converting this file into You cannot put sound in a PDF. Actually you can. I know in Adobe Acrobat Pro there is a Multimedia option. I haven't played with it much, but I know it is there. Quote from: Griff on April 27, 2009, 03:58:31 PM Actually you can. Pretty bold statement from someone who hasn't played with it much... Let me see if I can find something... HTTP://www.youtube.com/watch?v=n16lbi4YEqA he he he... that counts right?Interesting.....But the program isn't free, is it?It's Adobe Acrobat. I don't think there's a free version of that. Then again, I have no idea what program devduttaa is using.... Might help a bit if we knew so we could look into it. PDF does support it, but does his converter? Side thought: It's annoying enough when a web page starts talking to me, but if my BOOK wants to start a conversation? I'm gonna jump off a cliff.... If it was just a few pages and if the PDF options were not needed, LIKE zoom, copy etc. In that case one would just convert the thing into a nice little show in SWF format. Takes, maybe, more file SIZE, but you can have audio like in a power point presentation. The user could only go to the next or back to the start or QUIT. |
|
| 1247. |
Solve : C# -- List.add help? |
|
Answer» I have a list of points that I wish to start ADDING points to -- so how would I do it? |
|
| 1248. |
Solve : Scripting for IRC bots.? |
|
Answer» Can anyone, teach me, or show me, how to script for IRC Bots? I want to make my own . |
|
| 1249. |
Solve : WordBasic Command in Word 2007? |
|
Answer» Hi everyone, I have a .Dot file designed in Word 97, and it includes Macros and get the data from a .DAT file. |
|
| 1250. |
Solve : c++ and ASCII? |
|
Answer» hi, |
|