Search:

Type: Posts; User: dichelson

Page 1 of 5 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    21
    Views
    1,626

    Re: graphical APIs

    Plus, I think you inadvertently swapped width and height, so you had to make up for it by using weird correction factors. Here follows the code I would use. Please let me know if you disagree with...
  2. Replies
    21
    Views
    1,626

    Re: graphical APIs

    If so, we should have:


    For i = 0 To 1 Step (1/PHMinus1)


    in your code, I think...
  3. Replies
    21
    Views
    1,626

    Re: graphical APIs

    Technorobbo, would you please explain the following:

    1) Const PHMinus1 = picHeight - 1: why -1?
    2) StretchBlt Me.hdc, Pt(0).X, Pt(0).Y, Pt(1).X - Pt(0).X + 1, 2, Shdc, 0, PHMinus1 * i, picWidth,...
  4. Replies
    21
    Views
    1,626

    Re: graphical APIs

    Thank you Si the Geek. Fortunately enough, it wasn't difficult to sort out. Actually, I don't know why I didn't figure it all out myself...
  5. Replies
    21
    Views
    1,626

    Re: graphical APIs

    Thanks. Would you please add comments to the code? It's totally obscure to me...
  6. Replies
    21
    Views
    1,626

    Re: graphical APIs

    I'll give you the code I'm using. In order for you to use it, you'll need a form, with its Picture property set to a colored bitmap about half the width of your screen and the same height as the...
  7. Replies
    3
    Views
    677

    Re: DoEvents doesn't always work

    This has to be a by-design. They designed the Timer event in such a way that it can only fire after the preceding one's sub has been executed. Isn't it?
  8. Replies
    3
    Views
    677

    DoEvents doesn't always work

    Hello everybody. I used the following code to try the DoEvents function. On a form put Timer1 with Interval=1000 and Timer2 with Interval=5000:



    Dim t As Integer
    Private Sub Timer1_Timer()...
  9. Replies
    21
    Views
    1,626

    Re: graphical APIs

    Thank you guys for your help. Do you think that SetBitmapBits/GetBitmapBits would do? I found this good tutorial: http://www.tannerhelland.com/vb6/vb-graphics-programming-3/
  10. Replies
    21
    Views
    1,626

    Re: graphical APIs

    Actually, somebody sent me a little program that "melts" the screen, and this prompted me to write some code that does the same :)
  11. Replies
    21
    Views
    1,626

    graphical APIs

    Hello everybody. I need to simulate the melting of a solid. In principle, I could do it using the PSet and Point methods, but they're deadly slow. I would need a couple APIs, and they ought to be at...
  12. Replies
    8
    Views
    711

    Re: Const as Variant

    I don't know what ASP is (sorry, I'm a newbie). Do you mean that code might be intended for usage outside VB?
  13. Replies
    8
    Views
    711

    Re: Const as Variant

    Actually I found the code in a MSDN page! http://msdn.microsoft.com/en-us/library/aa480372.aspx. I really can't understand why they use all those variants in place of strings... Can you figure out...
  14. Replies
    8
    Views
    711

    Const as Variant

    Hello everybody. Sometimes I find something like this:



    Const a As Variant = &H1 'or whatever


    What sense does it make? I mean, if the constant is 1, then it should be integer, or long......
  15. Re: How to find out if a UserControl's container is another UC

    I will simply display a form with the code to be pasted and a button to copy it into the clipboard. The code


    Public Property Get hwnd() As Long
    hwnd=UserControl.hWnd
    End Property

    ...
  16. Re: How to find out if a UserControl's container is another UC

    1. In case the control is loaded dynamically, a messagebox appears, saying that the control is in an inappropriate container, so this scenario is under control. Of course, this doesn't happen if the...
  17. Writing code... from code!

    OK guys, now comes the tough part. I wish that, when the user inserts my uc into their uc, some code is automatically written into the client uc module :eek:
    Is there a way to do this? Otherwise,...
  18. Re: How to find out if a UserControl's container is another UC

    It will take me one month to digest the whole thing, but yes, I think my brain is seeing some light at the end of the tunnel...
  19. Re: How to find out if a UserControl's container is another UC

    OK, so I guess your answer to my question is "no". Then, if pValues is a long and remains long, what's the purpose of declaring it as variant? What would happen if I declare it as long?
  20. Re: How to find out if a UserControl's container is another UC

    Are you saying that pValues at the beginning contains a long pointer, but after the API call can contain anything?
  21. Re: How to find out if a UserControl's container is another UC

    LaVolpe, why did you dim pValues as variant? It's a long...
  22. How to find out if a UserControl's container is another UC

    Hello everybody. In order to make my ocx work, there is something the ocx must do if its container is another usercontrol. But how to test it?


    If TypeOf UserControl.Parent Is UserControl Then
    ...
  23. Replies
    10
    Views
    670

    Re: deleting UCs from Word

    Please, you guys, let me know if that is possible. Otherwise, please reply "sorry, this is not possible". Thank you :)
  24. Replies
    10
    Views
    670

    Re: deleting UCs from Word

    Do you think there is something wrong with that code? And, in any case, is there a way to delete the UserControl from Word after the Show event?
  25. Replies
    10
    Views
    670

    Re: deleting UCs from Word

    I'm sending attached the project. In order for it to work, after downloading the .zip file, please copy all the .bmp files to the c:\ directory. The reason why it doesn't work under Word is that in...
  26. Replies
    10
    Views
    670

    Re: deleting UCs from Word

    Yes, my ocx works under VB, and also under Internet Explorer.
  27. Replies
    10
    Views
    670

    Re: deleting UCs from Word

    I don't know the difference between usercontrol and ocx. The only thing I know is that an ocx is a compiled usercontrol, and yes, mine is compiled. It's basically an enhanced RichTextBox, with...
  28. Replies
    10
    Views
    670

    Re: deleting UCs from Word

    Oh excuse me, I meant UserControl (ocx).
  29. Replies
    10
    Views
    670

    deleting UCs from Word

    Hello everybody. I hope you can help me with this. My UC doesn't work under Word, so I would like that, on the Show event, a message box would pop up and the control would be deleted. Do you know how...
  30. Thread: cdlPDCollate

    by dichelson
    Replies
    1
    Views
    693

    cdlPDCollate

    Hello everybody. As per MSDN documentation, this flag is supposed to return the status of the Collate checkbox set by the user in the printer commondialog. However, it doesn't work. Anybody knows why...
  31. Replies
    15
    Views
    20,200

    Re: Type and paste unicode into textbox

    This works in locale 1033 for greek characters. It's probably locale-independent, although limited to greek characters.

    Form1's code (at least two textboxes + whatever additional control you would...
  32. Replies
    15
    Views
    20,200

    Re: Type and paste unicode into textbox

    I checked Cube8's code and it only works for the beta greek character. It fails for any other greek character. Changing font charset didn't help. Plus, that code messes up characters around chr$(150).
  33. Replies
    9
    Views
    1,386

    Re: raising errors from a UC

    1) I can't simply state If Not TypeOf Usercontrol.Parent Is Form, b/c in case the parent is an MDI, then TypeOf Usercontrol.Parent Is Form, plus it is MDIForm.

    2) I wrote my code in such a way...
  34. Replies
    9
    Views
    1,386

    Re: raising errors from a UC

    No, MDI is NOT valid :)
  35. Replies
    9
    Views
    1,386

    Re: raising errors from a UC

    Also, concerning licensing, I forgot to say that if I rem out my error message and do the same as above, i. e. two instances of the uc, one in form1 and the other one in usercontrol1, no error occurs...
  36. Replies
    9
    Views
    1,386

    Re: raising errors from a UC

    1) I added messageboxes to the various events and found that InitProperties fires, then Resize fires, then the error is raised. I can try logging the events to a file, as you said, and see what...
  37. Replies
    9
    Views
    1,386

    Re: raising errors from a UC

    Maybe my directions are not clear enough. I'll give you more detailed directions then.

    1) Download the RTB2.zip file
    2) Extract all the .bmp files into your local c:\ directory, leaving names...
  38. Replies
    9
    Views
    1,386

    Re: raising errors from a UC

    I realized that my project couldn't be opened correctly. I'm sending attached the revised version. Plus, I updated the first post, to make it clear that the UC needs to be compiled into an ocx first,...
  39. Replies
    9
    Views
    1,386

    raising errors from a UC

    Hello everybody. I have an UC that raises errors when certain conditions are met. It works fine if there is only one instance of the UC, otherwise there is trouble. I'm sending attached the project....
  40. Replies
    5
    Views
    854

    Re: printing to file

    Here is some sample code I tried. Actually it's not mine. I simply filled in the information about the document name and the output file name




    Option Explicit
    Private Declare Function...
Results 1 to 40 of 196
Page 1 of 5 1 2 3 4



Click Here to Expand Forum to Full Width