Page 1 of 2 12 LastLast
Results 1 to 40 of 43

Thread: HEY look at this code

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    37

    Smile HEY look at this code

    heloo

    now: this code to copy the project to other place on computer
    Code:
     FileCopy (App.Path & "\" & App.EXEName & ".exe"), ("C:\AsbMay.exe")
    I need code similar that code but it copy form2 only not all the programme

    thanks yooooooooooou

  2. #2
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: HEY look at this code

    if you want to copy a specific form then just use
    vb Code:
    1. FileCopy App.Path & "\Form2.frm", "C:\Form2.frm"
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    37

    Re: HEY look at this code

    thank you ganeshmoorthy for your answer > but this not my demand>
    the code is wrong.
    and i need type of form2 is .exe not .frm
    thaaaaaaaaaaaks you

  4. #4

  5. #5

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    37

    Re: HEY look at this code

    what i do now

  6. #6

  7. #7

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    37

    Re: HEY look at this code

    i need to make programme to email sender.

  8. #8
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: HEY look at this code

    Can't you at least explain why you think you need to copy your exe?
    Making an email program does not require that... I think you're thinking completely in the wrong direction, and simply shouting 'help now' all the time doesn't help at all, so we can't help you!

    Just explain what you are trying to do, in detail! We can't read your mind...

  9. #9
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: HEY look at this code

    im not sure i get your problem, but you have to isolate the form into a single exe that you want to handle independetly. you can remote-control the forms of it, or you can use shared resources like ini files or registry stuff to configure as you wish.

  10. #10

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    37

    Re: HEY look at this code

    please i dont know what i do now>
    please help me

  11. #11
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,427

    Re: HEY look at this code

    Quote Originally Posted by johnser
    please i dont know what i do now>
    please help me
    A post like yours doesn't help you or us. We need details in order to help you and those details can not include "make exe from form" or "copy form from exe". Those are solutions (impossible ones) and not requirements. Give us requirements and maybe we can help.

  12. #12
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: HEY look at this code

    johnser...
    could you please tell us...
    how do you know VB (where did you learn it)?
    what do you know from VB?
    what do you know about email applications? how are you going to build it?

    no offense, but I have the feeling most of us here are getting tired of your help screams...

    if you really want us to help you, please stop screaming for help and give us some useful information like why you need an email application with the copying of a form.
    Delete it. They just clutter threads anyway.

  13. #13

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    37

    Re: HEY look at this code

    look!
    i have project and it incloud too forms, form1 / form2 .
    form1 it have one command . I need code if i click in command1 it make form2 > (c:\form2.exe)

  14. #14
    Frenzied Member
    Join Date
    Jul 2007
    Posts
    1,306

    Re: HEY look at this code

    could you please attach the project ? Zip all *.frm , *.prj and *.frx and attach using the attachments button.

    Attached Images Attached Images  
    IIF(Post.Rate > 0 , , )

  15. #15

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    37

    Re: HEY look at this code

    look at attachment!!!!!1
    Attached Files Attached Files

  16. #16
    Frenzied Member
    Join Date
    Jul 2007
    Posts
    1,306

    Re: HEY look at this code

    Ok this project has no code. Where is the code for Email program?
    IIF(Post.Rate > 0 , , )

  17. #17
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: HEY look at this code

    Am I correct if I say that you want to save the contents of form2 to a file?
    Delete it. They just clutter threads anyway.

  18. #18
    Frenzied Member
    Join Date
    Sep 2006
    Location
    Scotland
    Posts
    1,054

    Re: HEY look at this code

    What I think you want to do is split the single exe you have into 2. One of which only has form2 and its code?

    And may I ask how on earth uploading a blank project helps us?

  19. #19
    Hyperactive Member
    Join Date
    May 2007
    Posts
    278

    Re: HEY look at this code

    Quote Originally Posted by johnser
    look!
    i have project and it incloud too forms, form1 / form2 .
    form1 it have one command . I need code if i click in command1 it make form2 > (c:\form2.exe)
    Everything works exactly like you want:
    1. This project have two forms Form1 and Form2.
    2. There is Command1 button on Form1.
    3. Then you click Command1 button it will creat Form2.exe in C:\ directory.

    Answer.zip

  20. #20

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    37

    Re: HEY look at this code

    thank you Lauriux1 for yor answer. but not this my demand ineedmake form2.exe . if i open it it must open form 2 not anythings
    ok?

  21. #21
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: HEY look at this code

    Quote Originally Posted by johnser
    thank you Lauriux1 for yor answer. but not this my demand ineedmake form2.exe . if i open it it must open form 2 not anythings
    ok?
    Just want to open Form2 on load? See Attached. You just set that in the Project Properties as the Startup form. To make the exe just click File, Make and Name the file "Form2.exe". We cant include exe's in the attachment.

    If you want your code to "make" Form2.exe, cannot do that. You could precompile a Form2.exe and attach it inside the main program, then extract that to the C Drive on load, and run it - BUT, that is too advanced for you right now, start with the basics first.
    Last edited by rory; Oct 2nd, 2007 at 02:47 AM.

  22. #22

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    37

    Re: HEY look at this code

    thanks you rory > but how i can make form2 to exe by code??

  23. #23

  24. #24
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: HEY look at this code

    Quote Originally Posted by johnser
    thanks you rory > but how i can make form2 to exe by code??
    You would need to know how to make a compiler, which is what VB6 has. So basically you cant. Only other way is to make a Form2 project, Make the file (compile Form2.exe), then either include it in the path of your main program (the easy way), or attach it inside the main program (which is much more difficult and im not getting into that) - then copy it to the C drive. Also note that many computers may not have a C drive. Anyway, still cannot "make" the exe from code, at least nothing usable. Essentially what you are asking is not possible in VB6, and what is possible is too advanced for you right now for us to even get into it.

  25. #25
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: HEY look at this code

    sorry, but there's one question still hanging with most of us.
    why do you want to do something like that?

    EDIT:
    and don't tell us it's for an email application...
    Delete it. They just clutter threads anyway.

  26. #26
    Hyperactive Member
    Join Date
    May 2007
    Posts
    278

    Re: HEY look at this code

    Quote Originally Posted by johnser
    thank you Lauriux1 for yor answer. but not this my demand ineedmake form2.exe . if i open it it must open form 2 not anythings
    ok?
    So if I have right understood you...
    You want to do this:


    After "Command1" button click on initial application you want to creat new functional application in "C:\" directory with almost all content and settings of first initial application ?!
    So I think that you want to make something like trojan server builder??!

    And yes i know two and maybe more than only two ways how to creat builder for trojan horse or for other thing like that...

    But if it is true then I WON'T help you to code it because this code can be used for malicious and not ethical purposes!
    Last edited by Lauriux1; Sep 30th, 2007 at 11:08 AM.

  27. #27
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: HEY look at this code

    God...
    No offense to learning_c
    But this is starting to remind me of the AI discussion...
    Delete it. They just clutter threads anyway.

  28. #28

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    37

    Re: HEY look at this code

    can you help me ? yes or no

  29. #29
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: HEY look at this code

    no .
    Delete it. They just clutter threads anyway.

  30. #30
    Hyperactive Member
    Join Date
    May 2007
    Posts
    278

    Re: HEY look at this code

    Quote Originally Posted by johnser
    can you help me? yes or no
    So is it true what I have said in #26 post ? yes or no

  31. #31
    Frenzied Member
    Join Date
    Jul 2007
    Posts
    1,306

    Re: HEY look at this code

    Quote Originally Posted by johnser
    can you help me ? yes or no
    Yes ofcourse. I can help you. If and Only If you tell the real purpose of the progrma. Why I ask this is, the request you are making is too suspicious.

    Send Emails.
    Compile Code by it self
    Copy to locations ....

    Ths only kind of these programs I can think of is some trojan or virus, like Lauriux1 said. (OK if there are other programs of as such I dont know them )


    So could you please tel us the real need of this progarm, the real problem you have?
    Then only we can help.
    IIF(Post.Rate > 0 , , )

  32. #32

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    37

    Re: HEY look at this code

    i make program to send and read masagae but this need to make form2.exe

  33. #33
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: HEY look at this code

    alright, great, now we're getting somewhere
    text message?
    from where to where?
    Delete it. They just clutter threads anyway.

  34. #34

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    37

    Re: HEY look at this code

    thanks

  35. #35

  36. #36
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: HEY look at this code

    Quote Originally Posted by johnser
    thanks
    please answer my questions.
    Delete it. They just clutter threads anyway.

  37. #37
    Hyperactive Member
    Join Date
    May 2007
    Posts
    278

    Re: HEY look at this code

    Quote Originally Posted by johnser
    i make program to send and read masagae but this need to make form2.exe
    You can send and read messages without creation of form2.exe !!!!

    And I think it will be not a message it will be command send from client to trojans server! (Sorry but this is my opinion!)

    P.S
    So if johnser have not told us the real purpose of program in his request, then he has reason for that so in any way I think that reason for lie was malicious purpose.

  38. #38
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    540

    Re: HEY look at this code

    Quote Originally Posted by TheBigB
    God...
    No offense to learning_c
    But this is starting to remind me of the AI discussion...
    LOL!

  39. #39
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: HEY look at this code

    Quote Originally Posted by johnser
    can you help me ? yes or no
    No, unless you can tell us - without using any programming terms - what you want your program to do. Tell us in English and let us translate it into programming.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  40. #40
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    Re: HEY look at this code

    OK.... New player on the field.

    johnser - Let me get this straight.... if I've followed this right, you have a form with two buttons on it. Button 1 and Button 2. When you click Button 2, you want to take what is currently Form2 in your project, and compile it into a working EXE, so that if you then run it, Form 2 shows up. Am I correct?

    If not, then skip the rest of this post.

    If so, OK, great. Progress. Now we're getting somewhere.
    What you want to do is compile a VB6 application on the fly. While technically it is possible (sorry guys, but there really is a way to do it), it is NOT technically FEASIBLE or worth the effort. You simply can't just copy the form's files and compile it and expect it to work. There's also the VBP file to think about, and references to other components. It would take more effort than it's worth to get that all straightened out. Oh, and the biggest barrier to this: it will ONLY work on a PC with VB6 installed. You wouldn't be able to take it to another machine and have it run/work.

    If what you need is an EXE based on form 2, then just make it and quit futzing about trying to figure some other way of doing it. \

    Additionally, you may want to consider letting people know just what you are up to. It's never pretty when the locals get their hackles up... words get said, bon fires get started, windows smashed, next thing you now SWAT shows up, and it's just one big mess that takes days to get sorted out properly.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width