

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.
2201. |
Solve : Portable Apps? |
Answer» I want to create portable applications in VB6 like other available portable applications on net. It all depends on what you wanna make. I want to create CD autorun menu with the few options like to install the software which is presented on CD and run that software if already installed the system. Quote By the in vb6 to make an exe you will need the enterprise edition its under file make exe I know and I have. Quote in the fact that you have an exe and you can put it on your flash drive and load it normally The vb6 application (exe file) needs vb6 runtime files to run. For my above need that's not possible in vb6 even supply exe with runtime files. Why I ask it in vb6. VB6 is very easier than other languages. If you have any guide please reply me. Language is not problem. But it must be cross windows application.I was under the IMPRESSION that the vb runtime was distributed with windows since windows 2000.Quote from: IamError on January 25, 2009, 06:29:21 AM I was under the impression that the vb runtime was distributed with windows since windows 2000. That is correct. However, service pack levels can be an issue. Google is your friend! Make EXE is in the Visual Basic 6 Professional and Enterprise editions, not just enterprise. (Trust me, I collect these things, I have every version back to version 1!) Even pushing the MSVBVM60.dll service pack level issue aside, there is still the likelyhood that additional References or Controls will be needed for the application; if this is the case, it will be necessary to register them either before running the app or before using Controls.Add() or CreateObject() to create instances of the referenced objects.Thanks to ALL. @BC_Programmer: Quote if this is the case, it will be necessary to register them either before running the app ... Can I register them during EXE loading? That means self registering. No. Although if you use Late binding, Controls.Add and CreateObject(), you can manually REGSVR32 the required libraries and the create the objects.Quote you can manually REGSVR32 the required libraries and the create the objects. Manual registration is too waste. Because user need to know about it and it may irritate the user. You may saw the autorun menu on few of Games CD with options like Install, Run, Exit etc... while inserting CD. That menu appeared with out any interaction with the user. We can create like that menu in Flash but not well in coding and it have some limitations. Thanks.I MEANT manually program it in. IE: shell..OK. I Will try this. Are you tried it before?Quote from: CBSk on January 27, 2009, 09:37:45 PM OK. I Will try this. Are you tried it before? Sort of- for a script language interpreter I wrote. it uses the language DLL and a few other components that need to be registered, so it uses late binding and if an error occurs with the createobject() call it will check for the DLL files in it's folder and register them, then try again. I don't use REGSVR32 but rather some calls to Typelib information function to register the type libraries but it's the same EFFECT. |
|
2202. |
Solve : need suggestions? |
Answer» hi, i'm having a bit of a problem Dotrey? Whats that?If Vic62 ever returns, he will understand. |
|
2203. |
Solve : How caan I write a real program with NO .NET junk?? |
Answer» How can I write a real program with NO .NET junk? Sure. Write a program in assembly. OK. I am WILLING. But I need an API list for Windows. I have never done GUI in assembly. Was there Once Upon a Time a Visual ASM The only API I know is the standard console stuff. Do I have to buy an SDK THING to program in ASM? Is there a web site that gives info about doing a simple Windows program in ASM? Quote Do I have to buy an SDK thing to program in ASM No Quote Is there a web site that gives info about doing a simple Here's a simple tutorial. With most operating systems you have to download the ASM interpreter(or whatever you call it). Quote I have never done GUI in assembly. If you aiming at GUI's, don't do assembly. AutoIt is easy. It's good for writing PROGRAMS.. It's practically as easy as batch files. However like ASM, you have to download a special interpreter. However ASM, is more POWERFUL that AutoIt. Quote Was there Once Upon a Time a Visual ASM Never was and never will be. Hope that helped! |
|
2204. |
Solve : Another GDI+ Question? |
Answer» In Visual Basic .net, (using vs 2003 but I have 2008 ASWELL, if I absolutely *have* to use it, I dislike how they removed the "windows form designer generated code" section, but I digress) when you go to draw something the coordinates LOOK like this: |
|
2205. |
Solve : AutoItv3: How to store random numbers in a variable.? |
Answer» In AutoItv3, there is a command random which SPITS out a random NUMBER. How would you STORE the random number it GIVES in a VARIABLE. |
|
2206. |
Solve : Using .bat to copy files to ext HD, dest. folder disappears? |
Answer» Trying to use a simple batch to copy the c:\ to an external harddrive. Trying to use a simple batch to copy the c:\ to an external harddrive. What is the '/d' parameter for? /D:m-d-y Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.When using commands, I'm fairly sure switches have to be in the order displayed in Command /? Quote Copies files and directory trees. Oh and I didn't manually write that out, I just found that you can redirect help to a file! Xcopy /? > file.txtQuote from: Helpmeh on April 07, 2009, 05:11:19 PM When using commands, I'm fairly sure switches have to be in the order displayed in Command /? Not always, and not with xcopy. One gramme of experiment is worth SEVERAL tonnes of guesswork, as Professor Metric might have said. Code: [Select]xcopy /s /l /d:04-01-2009 c:\batch d:\batch xcopy c:\batch d:\batch /s /l /d:04/01/2009 xcopy c:\batch d:\batch /l /s /d:04/01-2009 xcopy /d:04-01-2009 c:\batch /s /l d:\batch all work just the same source and destination have to be in that order but they can be anywhere and the switches can be in any order, and the date separator can be - or / or a mixture ie 04-01/2009 works. The /L switch is very handy when experimenting with xcopy. Quote from: dbrace55 on March 25, 2009, 07:44:18 AM Trying to use a simple batch to copy the c:\ to an external harddrive. If you think that this is going to back up your system you may be in for a nasty shock if you ever need to restore it... Quote If you think that this is going to back up your system you may be in for a nasty shock if you ever need to restore it... Unless your are a network administrator, there is little reason to use DOS for file backup. The best, simple, backup method inside of Windows NT,2000,2003, XP is to just use the backup utility. The problem is that many people just do not take the time to learn how it works. Once you get it, you will never go back doing a batch to backup large file sets. It allows multiple backups, compression, PASSWORD protection, overwrite by date, save if modified, and so on. You can restore a single file, a folder, or part of a folder, several folders, and so one. Bit of coarse, you could do it all in batch. Like using a pair of scissors instead of a lawn mower to cut the grass in the front yard. Quote from: Geek-9pm on April 09, 2009, 01:51:00 PM Unless your are a network administrator, there is little reason to use DOS for file backup. I meant if he thought he was doing the equivalent of Ghosting his C: drive to back up his OS.Quote ...thought he was doing the equivalent of Ghosting his C: drive ...Right. I missed that. Image is easier. Here is a video he should see. Runtime Software DriveImage XML tutorial Even if you do not want their free product, you want to see this video. |
|
2207. |
Solve : Script Which Will Act As An Interactive Front End To An Emailer? |
Answer» I want to write a script that |
|
2208. |
Solve : BIOS and Windows load once in a while!!!!!? |
Answer» I'm a very knowledgeable person of building computer and doing everything myself all though I'm having some problems.. I stayed up till 12:30 one night and turned off my computer and WENT to bed.. when i woke up i tried to turn on computer and the computer started up but the BIOS and Windows did not load... I took out hardware and put it back together, and when i started it it worked but only five minutes then it crashes... it works after an hour of leaving the computer alone... It finally told me to repair windows all though i cant get my CD/DVD ROM/Burner working when i connect it with just a power cable it works but when i plug in the DVD ROM Data cable it does'nt seem to accept the power.. any ideas? does seem to accept the power.. any ideas? Extensive empirical research over many has show there is credible evidence for this factoid: Usable hardware...is.. ah.. unstable! English translation: BAD DVD drive Italian translation is not as polite: Se LA Sony è falsa. ooops i meant doesn't accept power |
|
2209. |
Solve : Java Applications? |
Answer» I heard that its possible to write c code and get programs to run in windows. I only KNOW some java but wondered if you could do the same thing. I have made APPLETS and regualar java files and what ever the thrid format is.yes, you can write windows programs in C. I only know some java but wondered if you could do the same thing. I have made applets and regualar java files and what ever the thrid format is.so- you want to create a windows program in java? where does C come in? |
|
2210. |
Solve : Visual Basic 2008: Writing and Reading? |
Answer» Hey guys, I know you're all really helpfull in the MS-DOS section, let's just hope that's the same here. I'm not quite sure I understand want you want. From I gather, you want to read in from a text file every second. Then, any text that appears in textbox1, would be added to the end of the text file, right? Are you hard coding the name of the text file or will you select it from a dialog window? How do you want the text in textbox1 to be added to the file, automatically or with a button? This is certainly possible. You'll just need to use a timer that is set to 1 second. You're right about what I want to do, and the file will be hard coded into the code (imtp.txt). And as I said before, button1 will send textbox1.text to the file. The only code that I've actually managed to do is change the text of a label on a button click...so this is a bit advanced.I'd post a VB6 equivalent but it would probably be a Pain to convert to .NET; I don't think .NET has the VB6 file access functions/statements.Quote from: BC_Programmer on April 07, 2009, 04:56:18 PM I'd post a VB6 equivalent but it would probably be a Pain to convert to .NET; I don't think .NET has the VB6 file access functions/statements. I'm a bit confused. If I make the program into a .exe in VB2008, will someone need .NET to run it? I don't think the people who will be using this have it...yes, they will need the .NET framework installed to run any applications created in Visual Basic .NET, C# or Managed C++.OK...that is a major setback... Is there any way that they WON'T have to do that in VB2008? If no, is there any way I can make it WITHOUT them downloading .NET? They can't get it...as deepfreeze will just restore it.well, I don't think it's possible- since the forms, buttons, etc are all stored in the .NET framework winforms library. IN fact- the entire program is just a .NET component (assembly) and so needs the .NET loader, mscoree.dll to be present. now if you can get a HOLD of a COPY of an earlier version of Visual Basic, the runtimes for those won't be an issue- they are included in Windows 98SE, windows XP and windows Vista. Unfortunately although there is a "Learning edition" of VB6 it doesn't allow the compiling of executables Quote from: BC_Programmer on April 07, 2009, 05:52:20 PM well, I don't think it's possible- since the forms, buttons, etc are all stored in the .NET framework winforms library. IN fact- the entire program is just a .NET component (assembly) and so needs the .NET loader, mscoree.dll to be present. Grr...And it's against the rules for you to provide me with VB6... I have WinXPsp2...(for some reason I can't update to SP3)... |
|
2211. |
Solve : How to draw Isometric Grid Visual Basic .Net? |
Answer» This isn't exactly a question, more of a statement Hello,Jbscoelho, please start your own topic. Also, dont post your email, we dont work through email, and posting your email publicly on any forum can result in SPAM. |
|
2212. |
Solve : Keyboard input problem using Ncurses in C? |
Answer» Hey there. It's been a while since I've been around here. |
|
2213. |
Solve : Javascript gradient background? |
Answer» Is there any way I can make a background with javascript that would look LIKE this: |
|
2214. |
Solve : VB script help needed? |
Answer» Hi all, sorry if this is something simple, but... What does 09111 mean? In that Jan 11, 2009 ? Quote 09111.txt the last one is YR/Julian day. I'm a bit confused here. The Julian date (JD) is the interval of time in days and fractions of a day, since January 1, 4713 BC. The Julian date for CE 2009 April 4 00:00:00.0 UT is JD 2454925.50000 Julian date is sometimes used as a synonym for day of year, but this is not correct usage. Day of year ranges from 1 to 365 (366 for leap years). Today's day of year (4th April 2009) is 94. So where did the 09111 come from? Here is some date & time stamp vbs code Code: [Select] Dim dd,mm,yy,YYYY,DateStamp,FileName,DayOfYear,DoYstamp dd=Day(Date) mm=Month(Date) yyyy=Year(Date) yy=Mid(yyyy,3,2) DayOfYear=(DatePart("y",Date)) If dd<10 Then dd="0"&dd If mm<10 Then mm="0"&mm If DayOfYear<10 Then DayOfYear="0"&DayOfYear If DayOfYear<100 Then DayOfYear="0"&DayOfYear DateStamp=mm&dd&yyyy wscript.echo "Datestamp "&DateStamp FileName="outputlog."&DateStamp&".txt" wscript.echo "Filename "&FileName DoYstamp=DayOfYear&yy wscript.echo "DoYstamp "&DoYstamp FileName="outputlog."&DoYstamp&".txt" wscript.echo "Filename "&FileName Thanks all. This is what I needed. I do appreciate the help. |
|
2215. |
Solve : UNDO command in VB? |
Answer» hey guyz, im really stuck trying to create an undo command in vb to remove a previous GRAPHIC.... any help WOULD be great SAVE the every CHANGES in graphic to a separate storage(like in file). Then RECALL them at every undo command. |
|
2216. |
Solve : TcpListener only working locally? |
Answer» Ok, so I have some code, a server and a client, which connect together just fine on a LOCAL network or single COMPUTER. But when I try to connect to it over the internet, it just SAYS "The target machine actively refused the connection." |
|
2217. |
Solve : help needed with the pseudocode.plz? |
Answer» Dear all, |
|
2218. |
Solve : help creating a 2 dimensional array! in c++? |
Answer» how to create a w64 structure in c++? |
|
2219. |
Solve : Plz tell, urgent(Assembly language)?? |
Answer» How can we get our name in reverse order in a Assembly LANGUAGE, like Maria...airam |
|
2220. |
Solve : Batch file checking if folder exist then add $foldername$1? |
Answer» Hello, |
|
2221. |
Solve : Duplicate Error/Bug, but not harmful(I Hope) just irritating?? |
Answer» Hi everytime I use a USB thumb drve or flash disk this ALWAYS happen. Ive newly reformatted my computer and installed AVG 8.5 FREE Edition and it still happens. It also started before I reformatted my computer. Also theres a removable drive showing but when SELECTED says "insert disk" when there arent any usb disk drives attached. |
|
2222. |
Solve : learn ois for c++? |
Answer» Lately i have been LOOKING for a SIMPLE input library for C++ and i found ois, but i couldn't find any documentation, and the wiki wasn't WORKING, so can someone tell me where i can learn about it? |
|
2223. |
Solve : Executing different methods in a Jar file? |
Answer» A jar FILE has many METHODS in it. When I run the following: java -jar TheProgram.jar T the main method in TheProgram is executed with a parameter of T. |
|
2224. |
Solve : How Do I change one letter in one string mulitiple times? Help?? |
Answer» Ok for thoes that don't UNDERSTAND the title I want to do this... |
|
2225. |
Solve : Referencing a specific file creation date in a .bat or .vbs? |
Answer» I am attempting to create a script that checks if a file's creation date is x days old. If the file is x days old, then I need to execute the file and delete the script. It is unnecessary to delete the file itself. After spending some time with your suggestions...I've come up with this. What do you think? Lol, you just answer your own question. this is excellent, since you write it yourself, it's easier for you to maintain the code. nice script Assuming you want the script to delete itself, This would need editing if the name changed: Code: [Select]filesys.DeleteFile "C:\documents and settings\administrator\start menu\programs\startup\freezeit.vbs" This would not: Code: [Select]filesys.DeleteFile "Wscript.ScriptFullName"Quote from: Dias de verano on April 03, 2009, 05:17:24 AM Assuming you want the script to delete itself, HA HA! it would so! Code: [Select]filesys.DeleteFile Wscript.ScriptFullName to remove the quotes at least Quote from: BC_Programmer on April 03, 2009, 01:26:09 PM
Indeed. Good catch. |
|
2226. |
Solve : windows XP pro, service doesnot to start!? |
Answer» I created a SERVICE in windows XP and linked it to a batch file that i have created, however whenever i try to start the created service it gives me an error: |
|
2227. |
Solve : VB 2008 MenuStripItem? |
Answer» I have a project that I added a MenuStrip too. 1 of my menu items is SUPPOSED to make a label hide or display. |
|
2228. |
Solve : If case insensitive VB.NET? |
Answer» Is there a way in VB.NET to compare strings with an if statement without case sensitivity. like in MS-DOS batch with the /I switch? 2. StrComp() iterates through each character in the string- the moment it finds a difference based on the given comparison, (also likely involving a UCase/Lcase or equivalent), it breaks out. THIS is important- the strcomp function is specially constructed to break out once it knows the answer to the function- (IE, characters differ).although this is just an assumption that the code break out on first occurance. but i believe the microsoft guys do break the loop on first occurance. how many bytes is one character? if 1 byte, comparing char a-z lower-uppercase is as simple as toggling the 6th bit. if 2 byte, then thus vb.net syntax reminds me of java.it's not an assumption- it's the only explanation for it running faster. Also- it would be dumb to do otherwise. toggling the 6th bit won't work, either. since that is simply subtracting or adding 32. what about non-alphabetic characters? toggling the 6th bit on the exclamation mark, code 33, makes it 1, a control character. All Strings in Visual BASIC, and the .NET languages are Unicode, and thus 2 bytes. They can be treated as ANSI, but dealing with the unicode itself via lenb, chrb and ascb is fully possible. Regarding conversion of case this is provisioned by various mapping routines. Since all ANSI characters are easily converted to unicode by using 0 in the high word of the equivalent unicode character- (for example, ANSI A is chr$(&H41), Unicode A is ChrB$(0) & ChrB$(&H41). Thankfully VB converts to and fro as NECESSARY, which to be honest can be a pain in the *censored*, since in order to pass the string as an actual Unicode string to an API routine one needs to instead pass a Long pointer to the string. Oh well. Quote thus vb.net syntax reminds me of java. That's probably just the object-oriented ness of them both. in a similar vein via my BCFile file library I can do this: Code: [Select]filesystem.CreateFile("C:\Windows\test.dat").OpenAsBinaryStream(GENERIC_WRITE,FILE_SHARE_DELETE+FILE_SHARE_READ,CREATE_NEW,FILE_FLAG_SEQUENTIAL_SCAN).WriteString("text!") given it's a little messier then using the FileSystemObjects, but the FileSystemObjects don't support showing the right-click explorer menu like my library does... as well as a few other things, like alternate Data stream enumeration. Back on topic, however- the StrComp() function is preferable simply because it takes account of unicode differences, for example the special characters that combine other characters such as Æ (ligatures) I believe are compared equal to the expanded version. BC, i bought that explanation. you have put up a good point. i am going to use strcomp() today onwards, especially for intense string-worker loop.It definitely speeds things up, thats for sure. I got lazy in a few comparisons in my Expression evaluator and used Ucase for a few comparisons; after replacing them the routine, although called over 10000 times to parse a complicated expression, decreased it's total time to almost half, even though I was using StrComp() in most places. Also, it looks like .NET has a few overloads for "Compare", to allow for a LocaleID. Another interesting string manipulation is counting the occurences of a string within another string- in one line: Code: [Select]Public Function CountStr(Byval SearchIn as String,SearchFor as String) as Long CountStr = (Len(searchin) - Len(replace$(searchin,searchfor,""))/Len(searchfor) End Function The Replace$() function is so useful. So StringComp is the one i should use?With VB.NET, StrComp() is just in there for compatibility. Use the Static String.Compare or CompareTo() Methods, as I show in my first post. The "old" functions are there purely for compatibility, and in fact the Lcase() function as provided as a subtle bug, in that the Lcase$(nothing)=Nothing, yet the Ucase(nothing)=""... MS won't waste time fixing these bugs- nowadays EVERYTHING must be in a object... *Sigh* as much as I love object oriented programming, Some operations simply don't require instance data. I wonder if the .NET framework version 6 will have replaced all the string static methods with classes. I can see it now. classes like CLStringToUpper,ClStringToLower and so forth, all requiring the passing of the string in the constructor and retrieving the Lcased/Ucased value via a property.Or model it like Batch's If statement with the /I switch, to not compare it by case. Quote from: macdad- on March 31, 2009, 05:39:04 PM Or model it like Batch's If statement with the /I switch, to not compare it by case. wat. No BC, the method you give is not faster. You are so very WRONG. I am disappointed in you. Because he had to read your post and come back and you had to come back, That takes time. Going for minor improvement of run-time execution speed is a poor programming practice unless speed is a know issue. Speed of development and deployment and correct documentation take precedence over a millisecond in a project that takes days. Don't include speculation in your observations without say hing that is an apparent observation. With Microsoft libraries thane is not easy way to know what they were thinking when they did the code. It is not Open Source. We are not allowed to see it. If you could see it, you might take a line from Bill Gates,: "That's the dumbest thing I ever saw!" Also, it's interesting to note that trying to duplicate the StrComp() function with this: Code: [Select]Private Function StrCompA(ByVal StringA As String, ByVal StringB As String, comparemethod As VbCompareMethod) As Integer If comparemethod = vbTextCompare Then StringA = UCase$(StringA) StringB = UCase$(StringB) End If If StringA < StringB Then StrCompA = -1 ElseIf StringA = StringB Then StrCompA = 0 Else StrCompA = 1 End If End Function Is FUNDAMENTALLY broken. If the Option Compare Text is used at the module level, you cannot use this StrComp() replacement to perform Case-sensitive comparisions. Also, just as I said- the call to Ucase twice as well as the use of several comparison operators drags performance down. Trust me- when it comes to Core-level routines- microseconds count, because those microseconds add up, especially in core-level routines. Quote It definitely speeds things up, thats for sure. I got lazy in a few comparisons in my Expression evaluator and used Ucase for a few comparisons; after replacing them the routine, although called over 10000 times to parse a complicated expression, decreased it's total time to almost half, even though I was using StrComp() in most places. THIS was NOT speculation. I saw it with my own eyes. NOTHING else in my library changed except for a accidental "=" that I changed to an StrComp(String,String,vbtextcompare) = 0. it is NOT speculation. note I've stripped the prolog from this dissassembly- or so it seems, anyway. Dissassembly of StrComp in MSVBVM60.dll: Code: [Select] 734E7A2D: 83 7E 14 00 cmp dword ptr [esi+14h],0 734E7A31: 76 39 jbe 734E7A6C 734E7A33: 8B 46 18 mov eax,dword ptr [esi+18h] 734E7A36: 8B 04 B8 mov eax,dword ptr [eax+edi*4] 734E7A39: 85 C0 test eax,eax 734E7A3B: 74 23 je 734E7A60 734E7A3D: 8B 08 mov ecx,dword ptr [eax] 734E7A3F: 8D 55 0C lea edx,[ebp+0Ch] 734E7A42: 52 push edx 734E7A43: 53 push ebx 734E7A44: 50 push eax 734E7A45: FF 11 call dword ptr [ecx] 734E7A47: 85 C0 test eax,eax 734E7A49: 75 15 jne 734E7A60 734E7A4B: 8B 45 0C mov eax,dword ptr [ebp+0Ch] 734E7A4E: 3B 45 FC cmp eax,dword ptr [ebp-4] 734E7A51: 75 07 jne 734E7A5A 734E7A53: C7 45 F8 01 00 00 mov dword ptr [ebp-8],1 00 734E7A5A: 8B 08 mov ecx,dword ptr [eax] 734E7A5C: 50 push eax 734E7A5D: FF 51 08 call dword ptr [ecx+8] 734E7A60: 83 7D F8 00 cmp dword ptr [ebp-8],0 734E7A64: 75 06 jne 734E7A6C 734E7A66: 47 inc edi 734E7A67: 3B 7E 14 cmp edi,dword ptr [esi+14h] 734E7A6A: 72 C7 jb 734E7A33 734E7A6C: 8B 4D FC mov ecx,dword ptr [ebp-4] 734E7A6F: EB 9F jmp 734E7A10 734E7A71: 55 push ebp 734E7A72: 8B EC mov ebp,esp 734E7A74: 83 EC 24 sub esp,24h 734E7A77: 8B 45 24 mov eax,dword ptr [ebp+24h] 734E7A7A: 53 push ebx 734E7A7B: 33 DB xor ebx,ebx 734E7A7D: 56 push esi 734E7A7E: 3B C3 cmp eax,ebx 734E7A80: 57 push edi 734E7A81: 8B F1 mov esi,ecx 734E7A83: 74 06 je 734E7A8B 734E7A85: C7 00 01 00 00 00 mov dword ptr [eax],1 734E7A8B: 8B 06 mov eax,dword ptr [esi] 734E7A8D: 56 push esi 734E7A8E: FF 50 04 call dword ptr [eax+4] 734E7A91: 8B 45 08 mov eax,dword ptr [ebp+8] 734E7A94: 8B 4D 0C mov ecx,dword ptr [ebp+0Ch] 734E7A97: 8B 55 18 mov edx,dword ptr [ebp+18h] 734E7A9A: 89 45 DC mov dword ptr [ebp-24h],eax 734E7A9D: 8B 45 10 mov eax,dword ptr [ebp+10h] 734E7AA0: 89 4D E0 mov dword ptr [ebp-20h],ecx 734E7AA3: 89 45 E4 mov dword ptr [ebp-1Ch],eax 734E7AA6: 8B 45 14 mov eax,dword ptr [ebp+14h] 734E7AA9: 83 F8 02 cmp eax,2 734E7AAC: 89 45 E8 mov dword ptr [ebp-18h],eax 734E7AAF: 89 55 EC mov dword ptr [ebp-14h],edx 734E7AB2: 89 5D F0 mov dword ptr [ebp-10h],ebx 734E7AB5: 89 5D F4 mov dword ptr [ebp-0Ch],ebx 734E7AB8: 89 5D F8 mov dword ptr [ebp-8],ebx 734E7ABB: 89 5D FC mov dword ptr [ebp-4],ebx 734E7ABE: 76 4C jbe 734E7B0C 734E7AC0: 68 57 00 04 60 push 60040057h 734E7AC5: FF 15 C8 11 42 73 call dword ptr ds:[734211C8h] 734E7ACB: 33 DB xor ebx,ebx 734E7ACD: 39 5D F8 cmp dword ptr [ebp-8],ebx 734E7AD0: 74 2D je 734E7AFF 734E7AD2: 33 FF xor edi,edi 734E7AD4: 39 5D 1C cmp dword ptr [ebp+1Ch],ebx 734E7AD7: 76 16 jbe 734E7AEF 734E7AD9: 8B 45 F8 mov eax,dword ptr [ebp-8] 734E7ADC: 8B 04 B8 mov eax,dword ptr [eax+edi*4] 734E7ADF: 3B C3 cmp eax,ebx 734E7AE1: 74 06 je 734E7AE9 734E7AE3: 8B 08 mov ecx,dword ptr [eax] 734E7AE5: 50 push eax 734E7AE6: FF 51 08 call dword ptr [ecx+8] 734E7AE9: 47 inc edi 734E7AEA: 3B 7D 1C cmp edi,dword ptr [ebp+1Ch] 734E7AED: 72 EA jb 734E7AD9 734E7AEF: FF 75 F8 push dword ptr [ebp-8] 734E7AF2: 53 push ebx 734E7AF3: FF 35 CC E7 52 73 push dword ptr ds:[7352E7CCh] 734E7AF9: FF 15 94 12 42 73 call dword ptr ds:[73421294h] 734E7AFF: 8B 06 mov eax,dword ptr [esi] 734E7B01: 56 push esi 734E7B02: FF 50 08 call dword ptr [eax+8] 734E7B05: 5F pop edi 734E7B06: 5E pop esi 734E7B07: 5B pop ebx 734E7B08: C9 leave 734E7B09: C2 24 00 ret 24h unfortunately between the compiler optimizations and the fact that dissassembly cannot preserve the original symbols, the original meaning is hard to determine. There are several jumps that skip large sections; additionally it calls the OLE functions for string comparison, which is not surprising. The fact that StrComp() works AND is faster then a less robust "capitalization" scenario tells us that SOMETHING is different between the two methods. It's fairly apparent that it simply doesn't waste time copying two string variables to be uppercase, analyzing the two strings (possibly determining a difference between them early on, thus causing the time spent on uppercasing (or whatever) to the strings a complete waste of time. The main reason for using StrComp() over some silly Ucase or Lcase kludge would be the fact that Ucase and Lcase aren't Turing complete and fail in several relatively benign scenarios, generally involving the fact that Ucase$() acts on the ANSI value which can cause compare errors with common Unicode symbols that are otherwise compared properly with Strcomp(). An additional fact adding to this is my previously explained ligature comparison ability. So really- aside from the fact that it's both faster and does a better job, and implements Locale-specific functionality I guess there is no reason to use StrComp over capitalizing (or lcasing) both of them. Or, we could use the string comparision Class found on VBSpeed: Code: [Select]' By Chris Lucas, [emailprotected], 20011204/20020607 ' Thanks to Olaf for the class implementation concept Option Explicit Private Declare Function ArrPtr& Lib "msvbvm60.dll" Alias "VarPtr" (ptr() As Any) Private Declare Sub RtlMoveMemory Lib "kernel32" (dst As Any, src As Any, ByVal nBytes&) Private Header1(5) As Long Private Header2(5) As Long Private SafeArray1() As Long Private SafeArray2() As Long Private Sub Class_Initialize() ' Set up our template for looking at strings Header1(0) = 1 ' Number of dimensions Header1(1) = 4 ' Bytes per element (long = 4) Header1(4) = &H7FFFFFFF ' Array size ' Force SafeArray1 to use Header1 as its own header RtlMoveMemory ByVal ArrPtr(SafeArray1), VarPtr(Header1(0)), 4 ' Set up our template for look at search text Header2(0) = 1 ' Number of dimensions Header2(1) = 4 ' Bytes per element (long = 4) Header2(4) = &H7FFFFFFF ' Array size ' Force SafeArray1 to use Header1 as its own header RtlMoveMemory ByVal ArrPtr(SafeArray2), VarPtr(Header2(0)), 4 End Sub Private Sub Class_Terminate() ' Make SafeArray1 once again use its own header ' If this code doesn't run the IDE will crash RtlMoveMemory ByVal ArrPtr(SafeArray1), 0&, 4 RtlMoveMemory ByVal ArrPtr(SafeArray2), 0&, 4 End Sub Friend Function IsSameText03(String1 As String, String2 As String, Compare As VbCompareMethod) As Boolean ' By Chris Lucas, [emailprotected], 20011204 Dim i&, SLen&, tmp1&, tmp2&, tmp3&, tmp4&, alt& SLen = LenB(String1) If SLen <> LenB(String2) Then Exit Function Header1(3) = StrPtr(String1): Header2(3) = StrPtr(String2) If Compare = vbTextCompare Then For i = 0 To SLen \ 4 - 1 tmp1 = SafeArray1(i) tmp2 = (tmp1 And &HFFFF&) tmp3 = SafeArray2(i) tmp4 = (tmp3 And &HFFFF&) Select Case tmp2 Case 97& To 122&: alt = tmp2 - 32 Case 65& To 90&: alt = tmp2 + 32 Case 49&: alt = 185 Case 50&: alt = 178 Case 51&: alt = 179 Case 138&: alt = 154 Case 140&: alt = 156 Case 142&: alt = 158 Case 154&: alt = 138 Case 156&: alt = 140 Case 158&: alt = 142 Case 159&: alt = 255 Case 178&: alt = 50 Case 179&: alt = 51 Case 185&: alt = 49 Case 192& To 214&: alt = tmp2 + 32 Case 216& To 222&: alt = tmp2 + 32 Case 224& To 246&: alt = tmp2 - 32 Case 248& To 254&: alt = tmp2 - 32 Case 255&: alt = 376 Case 338&: alt = 339 Case 339&: alt = 338 Case 352&: alt = 353 Case 353&: alt = 352 Case 376&: alt = 255 Case 381&: alt = 382 Case 382&: alt = 381 End Select If alt <> tmp4 Then If tmp2 <> tmp4 Then Exit Function End If tmp2 = (tmp1 And &HFFFF0000) tmp4 = (tmp3 And &HFFFF0000) Select Case tmp2 Case &H610000 To &H7A0000: alt = tmp2 - &H200000 Case &H410000 To &H5A0000: alt = tmp2 + &H200000 Case &H310000: alt = &HB90000 Case &H320000: alt = &HB20000 Case &H330000: alt = &HB30000 Case &H8A0000: alt = &H9A0000 Case &H8C0000: alt = &H9C0000 Case &H8E0000: alt = &H9E0000 Case &H9B0000: alt = &H8A0000 Case &H9C0000: alt = &H8C0000 Case &H9E0000: alt = &H8E0000 Case &H9F0000: alt = &HFF0000 Case &HB20000: alt = &H320000 Case &HB30000: alt = &H970000 Case &HB90000: alt = &H310000 Case &HC00000 To &HD60000: alt = tmp2 + &H200000 Case &HD80000 To &HDE0000: alt = tmp2 + &H200000 Case &HE00000 To &HF60000: alt = tmp2 - &H200000 Case &HF80000 To &HFE0000: alt = tmp2 - &H200000 Case &HFF0000: alt = &H1780000 Case &H1520000: alt = &H1530000 Case &H1530000: alt = &H1520000 Case &H1600000: alt = &H1610000 Case &H1610000: alt = &H1600000 Case &H1780000: alt = &HFF0000 Case &H17D0000: alt = &H17E0000 Case &H17E0000: alt = &H17D0000 End Select If alt <> tmp4 Then If tmp2 <> tmp4 Then Exit Function End If Next i If (LenB(String1) \ 2 And 1) Then tmp2 = (SafeArray1(i) And &HFFFF&) tmp4 = (SafeArray2(i) And &HFFFF&) Select Case tmp2 Case 97& To 122&: alt = tmp2 - 32 Case 65& To 90&: alt = tmp2 + 32 Case 49&: alt = 185 Case 50&: alt = 178 Case 51&: alt = 179 Case 138&: alt = 154 Case 140&: alt = 156 Case 142&: alt = 158 Case 154&: alt = 138 Case 156&: alt = 140 Case 158&: alt = 142 Case 159&: alt = 255 Case 178&: alt = 50 Case 179&: alt = 51 Case 185&: alt = 49 Case 192& To 214&: alt = tmp2 + 32 Case 216& To 222&: alt = tmp2 + 32 Case 224& To 246&: alt = tmp2 - 32 Case 248& To 254&: alt = tmp2 - 32 Case 255&: alt = 376 Case 338&: alt = 339 Case 339&: alt = 338 Case 352&: alt = 353 Case 353&: alt = 352 Case 376&: alt = 255 Case 381&: alt = 382 Case 382&: alt = 381 End Select If tmp2 <> tmp4 Then If alt <> tmp4 Then Exit Function End If End If IsSameText03 = True Else For i = 0 To SLen \ 4 - 1 If SafeArray1(i) <> SafeArray2(i) Then Exit Function Next i If (LenB(String1) \ 2 And 1) Then If (SafeArray1(i) And &HFFFF&) <> (SafeArray2(i) And &HFFFF&) Then Exit Function End If IsSameText03 = True End If End Function Friend Function IsSameString02(String1 As String, String2 As String) As Boolean ' By Chris Lucas, [emailprotected], 20020607 Dim i&, Len1&, Len2&, tmp& ' Grab the string lengths Len1 = LenB(String1) \ 2: Len2 = LenB(String2) \ 2 ' Make an informed decision as to whether we should continue If Len1 <> Len2 Then GoTo BailOut ' Compare the strings Header1(3) = StrPtr(String1): Header2(3) = StrPtr(String2) tmp = Len1 \ 2 ' The first two characters come cheap If SafeArray1(i) <> SafeArray2(i) Then GoTo BailOut Else i = i + 1 DoLoop: If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If SafeArray1(i) <> SafeArray2(i) Then GoTo NotEqual Else i = i + 1 If i <= tmp Then GoTo DoLoop NotEqual: ' some characters don't match, but we need to check to ' see if it happened after the end of the string, a ' nasty side-effect of cascading ifs If i > tmp Then IsSameString02 = True BailOut: ' Lengths don't match, let's do absolutely nothing End Function this method is twice as fast as StrComp(), which is three times faster then any comparison operator. Since the strCompA() routine I provided earlier implementing the whole uppercasing to test thing uses at LEAST one comparison operator, it will be slower then either of the other methods even in the best case. Of course it would be silly to use this class except in extremely string-manipulation heavy programs/routines, since it has a tendency to crash during debugging (works 100% compiled). |
|
2229. |
Solve : .cab files help? |
Answer» hi i was womdering what cab files are USED for and how to PROGRAM themGoogle came up with: |
|
2230. |
Solve : Automatically create new variables during run in VB.NET? |
Answer» Is it POSSIBLE to create a new sepreate variable during run when neccessary? |
|
2231. |
Solve : 3D Camera Algorithms -- XNA? |
Answer» I am using XNA -- Just in case -- Just asking for some sort of algorithm. |
|
2232. |
Solve : How many lines? |
Answer» install Gawk for windows, then on the command line why install third party solution when you can do this in almost any windows-based PC without installing anything.We don't live in prehistoric times. Given computing technology today, why is one restricted to what you have. If a tool can reduce hours of coding and increase productivity to the business, its best to use them all to our advantage. A computer is bought just to do that. Increase productivity. Your Windows goes out to the internet for auto updates. That's also installing, isn't it?. What's the difference. Quote NT cmd.exe is a powerful interpreter for text based manipulation.yes, its powerful, but not powerful enough. It can only do this much, anything more complex, it becomes ugly. try parsing a file and doing complex string manipulations EASILY using cmd.exe (and *.exe in system32). Try doing automated telnetting with proper error control. try grabbing a web page and getting some information out of it. Doing them in batch? no way.Quote from: ghostdog74 on March 14, 2009, 04:04:14 AM install Gawk for windows, then on the command line indeed, I always find it much more convenient to write a vbscript like this: Code: [Select]set fso = createobject("scripting.filesystemobject") set fstream = fso.getfile(wsh.arguments(1)).OpenAsTextStream wsh.echo fstream.readall fstream.close instead of the ridiculously difficult to understand: Code: [Select]type filename Oh wait- NO I DON'T! if you've seen some threads were I provide a VBScript solution and Dias provides a batch solution- oddly the batch solution is shorter. And if you would like to contest wether VBScript is a programming language you might want to take that up with Eric Lieppert.Quote from: BC_Programmer on March 14, 2009, 09:10:30 AM you are going OT. Quote from: ghostdog74 on March 14, 2009, 09:03:38 AM We don't live in prehistoric times. Given computing technology today, why is one restricted to what you have. If a tool can reduce hours of coding and increase productivity to the business, its best to use them all to our advantage. A computer is bought just to do that. Increase productivity. Your Windows goes out to the internet for auto updates. That's also installing, isn't it?. What's the difference. And I'm the one going off-topic? Don't see much about counting the lines in a file there, mostly just a shameless plug for your ridiculous and UNNECESSARY, if not useful, command-line tool of choice. (And no, unnecessary and useful are not mutually exclusive) Which brings up the fact that windows updates- automatically,, as in, without requiring the user to search for an install a third party tool. This is Reno's Point- you can make a third party tool as powerful as you want- but if it can be done in something that is included in the default install, whats the point of using a separate tool, third party or otherwise? your proposed problems are merely invented scenarios devised for the sole purpose of being difficult- if not impossible- via CMD line batch processing commands; except perhaps the first one- since cscript.exe can be used to perform easy string manip via Jscript or VBScript code from batch; and in fact that goes for most of the other proposed "problems". The funniest part is me and Dias are discussing various ways of performing this task with various levels of compatibility for different newline methods with tools provided in default OS installs and you jump in with a suggestion to install some third party tool and provide some code for it that ACCOMPLISHES nothing more then that which Dias had already provided, except perhaps clutter up their PC with more software installations. Hubris.Although I quite like fooling around with awk, sed, perl, Ruby etc -- I am getting into Python at the moment -- also the Resource Kits can be useful -- I don't tend to push these others on people here because as you say, BC_Programmer, "if it can be done in something that is included in the default install, whats the point of using a separate tool, third party or otherwise?". Especially if people are prevented from installing 3rd party apps. In fact I get a kind of perverse pleasure in seeing what can be done with the default tools. Quote from: BC_Programmer on March 14, 2009, 12:07:02 PM And I'm the one going off-topic? Don't see much about counting the lines in a file there, mostly just a shameless plug for your ridiculous and unnecessary, if not useful, command-line tool of choice. (And no, unnecessary and useful are not mutually exclusive)please read the quote where the reply is directed. A question was asked on "why install a third party ....". I gave the reasons why, mostly for productivity. So where did i go OT? Whereas for your case, since when did i say Vbscript is not a programming language and why should i contest the guy you mentioned? Isn't it going OT ? get your facts right. Quote Which brings up the fact that windows updates- automatically,, as in, without requiring the user to search for an install a third party tool.is searching for a third party tool that difficult? Quote This is Reno's Point- you can make a third party tool as powerful as you want- but if it can be done in something that is included in the default install, whats the point of using a separate tool, third party or otherwise?like i said, productivity. Even in the case of programming tools/languages. If you want to send email in your script, do you write a whole bunch of vbscript code or do you prefer to use things like blat ? That is just an example but if you have ever been a system administrator (or equivalent) that need to perform complex tasks like FTP, telnet to remote and execute jobs etc you will know that you definitely need better tools or Libraries to do your work than using merely cmd.exe Quote your proposed problems are merely invented scenarios devised for the sole purpose of being difficult- if not impossible- via CMD line batch processing commands; except perhaps the first one- since cscript.exe can be used to perform easy string manip via Jscript or VBScript code from batch; and in fact that goes for most of the other proposed "problems".please read my post again. I said "...doing complex string manipulations EASILY...". (sidenote: do you want to have a shot at solving those problems i mentioned using just vbscript.? ) Quote The funniest part is me and Dias are discussing various ways of performing this task with various levels of compatibility for different newline methods with tools provided in default OS installs and you jump in with a suggestion to install some third party tool and provide some code for it that accomplishes nothing more then that which Dias had already provided, except perhaps clutter up their PC with more software installations.It's funny because I was replying to the OP and giving an alternative suggestion (and its cross platform). Why should i be bothered about your discussion with Dias since OP didn't even mentioned he can't install 3rd party tools, or whatever you call it. and wait, so you mean to say i cannot post my suggestions in this forum? I mean, my posts are not meant for you , you know? If my suggestion does not suit the OP, its fine. He has the final say and I am a willing contributor. Its NOT up to you to say anything. Cluttering up the PC? what are you talking about? you mean to say, things like automatic updates which MS downloads from the internet is not cluttering up the PC?? so you mean to say useful tools from the resource kits cannot be used etc?Quote from: Dias DE verano on March 14, 2009, 12:46:10 PM , "if it can be done in something that is included in the default install, whats the point of using a separate tool, third party or otherwise?".if i were to say "its for improving workplace productivity", would you accept that as a reasonable answer. |
|
2233. |
Solve : C# HELP - Factors of a number.? |
Answer» Quote from: Geek-9pm on February 27, 2009, 11:52:31 AM Quotedo not hijack somebody elses ER... That's different, I "ease" the thread innocently in a different direction. And I usually have accomplices.hello guyz... i need your help??? what is wrong in this program>>> when I press N it will go to choice but I can't input any letters because it will terminate help.. me plz.... #include #include main() { int a,d,c,s,H,ls,car,SCIFI,ans; char ch; #define p printf #define g gotoxy #define c cprintf choice: {clrscr(); g(17,2);p(" >>()> JESSAR_AMA VIDEO RENTALS <()<< "); g(25,3);p("CONTACT No.09092957632"); g(15,7);p("PRESS[");textcolor(WHITE+BLINK);c("A");p("]for ACTION:"); g(15,9);p("PRESS[");textcolor(WHITE+BLINK);c("D");p("]for DRAMA:"); g(15,11);p("PRESS[");textcolor(WHITE+BLINK);c("C");p("]for COMEDY"); g(15,13);p("PRESS[");textcolor(WHITE+BLINK);c("S");p("] for SUSPENSE:"); g(15,15);p("PRESS [");textcolor(WHITE+BLINK);c("L");p("] for LOVE STORY:"); g(15,17);p("PRESS [");textcolor(WHITE+BLINK);c("H");p("] for HORROR:"); g(15,19);p("PRESS [");textcolor(WHITE+BLINK);c("F");p("] for FICTION\n"); p("\n Enter your choice:_");gotoxy(33,21); scanf("%c",& ch);} switch(ch) { case 'A': clrscr(); g(29,1);textcolor(BLUE+BLINK);c("***************"); g(29,3);textcolor(BLUE+BLINK);c("***************"); g(43,2);textcolor(BLUE+BLINK);c("*"); g(29,2);textcolor(BLUE+BLINK);c("*"); g(30,2);textcolor(WHITE);c("ACTION MOVIES"); g(30,5);p("Are you sure?[Y/N]"); scanf("%s",&ans); if (ans=='N') { goto choice; } break; case 'D': clrscr(); g(29,1);textcolor(RED+BLINK);c("**************"); g(29,3);textcolor(RED+BLINK);c("**************"); g(42,2);textcolor(RED+BLINK);c("*"); g(29,2);textcolor(RED+BLINK);c("*"); g(30,2);textcolor(WHITE);c("DRAMA MOVIES");break; case 'C': clrscr(); g(29,1);textcolor(YELLOW+BLINK);c("***************"); g(29,3);textcolor(YELLOW+BLINK);c("***************"); g(43,2);textcolor(YELLOW+BLINK);c("*"); g(29,2);textcolor(YELLOW+BLINK);c("*"); g(30,2);textcolor(WHITE);c("COMEDY MOVIES");break; case 'S': clrscr(); g(29,1);textcolor(GREEN+BLINK);c("******************"); g(29,3);textcolor(GREEN+BLINK);c("******************"); g(45,2);textcolor(GREEN+BLINK);c("*"); g(29,2);textcolor(GREEN+BLINK);c("*"); g(30,2);textcolor(WHITE);c("SUSPENSE MOVIES");break; case'L':clrscr(); g(29,1);textcolor(RED+BLINK);c("*******************"); g(29,3);textcolor(RED+BLINK);c("*******************"); g(47,2);textcolor(RED+BLINK);c("*"); g(29,2);textcolor(RED+BLINK);c("*"); g(30,2);textcolor(WHITE);c("LOVE STORY MOVIES");break; case 'H': clrscr(); g(29,1);textcolor(YELLOW+BLINK);c("***************"); g(29,3);textcolor(YELLOW+BLINK);c("***************"); g(43,2);textcolor(YELLOW+BLINK);c("*"); g(29,2);textcolor(YELLOW+BLINK);c("*"); g(30,2);textcolor(WHITE);c("HORROR MOVIES");break; case 'F': clrscr(); g(29,1);textcolor(GREEN+BLINK);c("****************"); g(29,3);textcolor(GREEN+BLINK);c("****************"); g(44,2);textcolor(GREEN+BLINK);c("*"); g(29,2);textcolor(GREEN+BLINK);c("*"); g(30,2);textcolor(WHITE);c("FICTION MOVIES");break; default:gotoxy(17,40);textcolor(RED+BLINK);cprintf(" SORRY THE MOVIE TYPE YOU WANT IS NOT AVAILABLE!!!"); } getch();} I'm not sure what language this is, but why are you entering 'N', the menu should initiate right away and be waiting for your input. Why do you have this line "int a,d,c,s,h,ls,car,scifi,ans;"? Why are these letters type of int? or is that a CONTINUATION of the program?If you want other people to help you, try to avoid this sort of thing: Code: [Select]#define p printf #define g gotoxy #define c cprintf If makes things hard to read and you can make a very bad error. Aldo, it helps if you use a High-Level approach for something that is not going to be used to launch rockets . Make a case block as clean and neat as you can. avoid details. Something like this: Code: [Select]case 'A' : dofirst;(); break; case 'D' : dosecond(); break; case 'E' : dothird(); break ; case 'N' : goto choice; Using inline code makes it hard to debug. Start out with void functions that are 'stubs', they don't do anything, but they are place holders where you will expand the code later as you work out the logic flaws. The concept is to HIDE details the are not relevant to the logic of what you are doing. This way you separate the logic from the decoration. |
|
2234. |
Solve : how to copy entire Visual C# solution?? |
Answer» Is there any way to copy an entire VISUAL C# solution in such a way that it works? If you just copy it and rename it, it gives an error message that it's been renamed and therefore it refuses to work. |
|
2235. |
Solve : Vba6.Dll Issue in Visual Basic 6!!!? |
Answer» Hi everyone!, I'm working with my application code developed in Visual Basic 6, and SOMETIMES the visual basic application fails while I EXECUTE in debbug mode, and REFERS the next DLL: |
|
2236. |
Solve : SendKeys VB .NET? |
Answer» In .NET I can't get caps LOCK, scroll lock, num lock to WORK. I looked AROUND the web and found a lot of people have this PROBLEM but all the different solutions CONFUSED me. Anyone know how to make it work?According to VS 2003 helpfiles you use |
|
2237. |
Solve : collating records from different SQL Server tables? |
Answer» I'm starting to learn SQL Server. As part of that effort, I'm experimenting with accessing AdventureWorks sample databases. |
|
2238. |
Solve : delphi login code? |
Answer» I am just new in delphi and i had a hard time in USING it. One of my problem is the LOGIN form which has 3 users of different privileges. The code I have has plenty of ERRORS and I can't STILL pinpoint the correct code for it. I hope you could check it and give me some FEEDBACK about it. |
|
2239. |
Solve : (VB) Call Form1_Paint after Form1_Load has been called.? |
Answer» I think the title is self-explanatory, but here's some extra: |
|
2240. |
Solve : VB6 File Browser? |
Answer» Hi im in the process of programming my DTR or payroll system.. You use ms access 2003 then vb6? i dont understand but if you are asking about if the api will work on vb6 and will it also work on vba(access2003), then the answer is yes. if you are asking me do i learn access first, then vb6, then the answer is again yes.VBA(msaccess03) that wats i mean heheh sorry for that....SO... i can use listbox or combo box to FIND the directory.. LIKE c:\data\data.txt In short I want to use this: c:\data\data.txt as an input to my txtbox to import that text file... If you dnt get wat i mean just tell me...the above win32 api is to show the windows open dialog. example: open notepad, then press CTRL-O, it popup the open dialog window <--- vb6 will open this kind of window is this what you want?? or are you looking to populate a listbox with the contents of data.txt???I would like to obtain the path and place as a value in a txtbox in order to import it.. example: c:\data\data.txt <----- this path by clicking onlyThanks for your time... I find it already in access library using Application.FileDialog(msoFileDialogFilePicker). I appreaciate your time... thanks a LOT...Option Compare Database Private Sub Command0_Click() Dim fd As FileDialog Set fd = Application.FileDialog(msoFileDialogFilePicker) Dim vrtSelectedItem As Variant With fd .Filters.clear .Filters.Add "All files", "*.*" .Filters.Add "Images", "*.gif; *.jpg; *.jpeg", 1 If .Show = -1 Then For Each vrtSelectedItem In .SelectedItems MsgBox "Path name: " & vrtSelectedItem Next vrtSelectedItem Else End If End With Set fd = Nothing End Sub Thats the code and I check some references... like Microsoft Office 11.0 Object Librarythat's great. glad to see it working now. and sharing your code here is good, you'll never know if someone else with the same problem might need it in the future, and your code have provide some guidance for them. but i have a question: will the program work for computer without ms.office installed?? or if you have to pack it with the setup file, is it going to make the size bigger?i think its not so big... maybe a bit |
|
2241. |
Solve : Delphi problem...? |
Answer» I have a function to get BIOS information, for exapmple BIOS serial number as String. I USE this solution (found it in internet) : |
|
2242. |
Solve : How to make a new wireless connection to connect to the old one? |
Answer» Ok I'm on my IPOD |
|
2243. |
Solve : Passing value from a text box to a C program? |
Answer» hello there, The task of VBScript code would be to call a C program and pass a string variable.yes see below Code: [Select]s=inputbox("Enter argument for c program") wsh.echo s createobject("wscript.shell").run ".\ProgramC.exe " & s,1,false |
|
2244. |
Solve : SQL Server connection problem? |
Answer» I’m trying to learn how to connect to an SQL Server database (I’m using the AdventureWorks sample database), but I’m having problems. |
|
2245. |
Solve : Access database/storing values? |
Answer» Is there a way to store a displayed VALUE in a field that is the result of a calculation? |
|
2246. |
Solve : How to invoke a batch file in C??? |
Answer» I know, i know....USING the system function in C...but it just doesnt work 4 me... |
|
2247. |
Solve : void functions for soccer match? |
Answer» hi |
|
2248. |
Solve : BASIC for web programming?? |
Answer» Quote from: BC_Programmer on March 18, 2009, 01:09:24 PM PHP, like Python or Perl, can be used to run PHP scripts, not necessary in a web environment. PHP provides basic programming constructs, data TYPES such as ARRAYS, loops, FLOW control MUCH like any others. therefore its also a programming language. Code: [Select]# php5 -r 'echo "hello world\n";' hello world Quote from: ghostdog74 on March 18, 2009, 05:59:35 PM PHP, like Python or Perl, can be used to run PHP scripts, not necessary in a web environment. PHP provides basic programming constructs, data types such as arrays, loops, flow control much like any others. therefore its also a programming language. I know! I was being sarcastic, silly if VBScript wasn't a programming language, as some here claim, then PHP couldn't be either Quote from: BC_Programmer on March 19, 2009, 08:51:27 AM I know! I was being sarcastic, sillyoh...i see. |
|
2249. |
Solve : System Format Exception in debug VB 2008? |
Answer» Happy Thursday all.) Tour here again with a question regarding VB 2008 |
|
2250. |
Solve : VB starter? |
Answer» Hello not really. download the manual for more info Quote can VBS files do the same work that EXEs do?yes and no.No. VB Script and Visual Basic are not same. Visual Basic is used to DESIGN windows applications. VBScript uses the Visual Basic syntax. But it is a scripting language developed for scripting in HTML pages. There is different like Java and JavaScript.thank you M.r ghostdog74 thank you M.r CBSk what is the best version in visual basic and from where can I install it? I downloaded VB from microsoft, but it requests to be online while intalling on PC thanks Well you can BUY old VB6 or you COULD get the FREE version of VB.NET 03,05, or 08 |
|